/**
 * TankLogbook Main CSS
 *
 * Version: 1.0.0
 * Date: 2025-12-28
 */

/* ============================================================================
   ROOT VARIABLES
   ============================================================================ */
:root {
    --tlb-primary: #007bff;
    --tlb-secondary: #6c757d;
    --tlb-success: #28a745;
    --tlb-danger: #dc3545;
    --tlb-warning: #ffc107;
    --tlb-info: #17a2b8;
    --tlb-light: #f8f9fa;
    --tlb-dark: #343a40;

    --tlb-gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    --tlb-border-radius: 8px;
    --tlb-box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    --tlb-transition: all 0.3s ease;
}

/* ============================================================================
   GLOBAL STYLES
   ============================================================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #2d3748;
    background-color: #f7fafc;
}

main {
    min-height: calc(100vh - 200px);
}

/* ============================================================================
   NAVBAR
   ============================================================================ */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

/* ============================================================================
   CARDS
   ============================================================================ */
.card {
    border-radius: var(--tlb-border-radius);
    border: 1px solid #e2e8f0;
    box-shadow: var(--tlb-box-shadow);
    transition: var(--tlb-transition);
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.card-header {
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
}

/* ============================================================================
   BUTTONS
   ============================================================================ */
.btn {
    border-radius: var(--tlb-border-radius);
    font-weight: 500;
    transition: var(--tlb-transition);
}

.btn-primary {
    background: var(--tlb-gradient-primary);
    border: none;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* ============================================================================
   FORMS
   ============================================================================ */
.form-control,
.form-select {
    border-radius: var(--tlb-border-radius);
    border: 1px solid #e2e8f0;
    transition: var(--tlb-transition);
}

.form-control:focus,
.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 500;
    color: #4a5568;
    margin-bottom: 0.5rem;
}

/* ============================================================================
   ALERTS
   ============================================================================ */
.alert {
    border-radius: var(--tlb-border-radius);
    border: none;
}

/* ============================================================================
   MODALS
   ============================================================================ */
.modal-content {
    border-radius: var(--tlb-border-radius);
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.modal-footer {
    background-color: #f7fafc;
    border-top: 1px solid #e2e8f0;
}

/* ============================================================================
   TABLES
   ============================================================================ */
.table {
    background: white;
    border-radius: var(--tlb-border-radius);
}

.table thead {
    background-color: #f7fafc;
}

/* ============================================================================
   BADGES
   ============================================================================ */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
footer a {
    transition: var(--tlb-transition);
}

footer a:hover {
    opacity: 0.8;
}

/* ============================================================================
   UTILITIES
   ============================================================================ */
.text-gradient {
    background: var(--tlb-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm-hover:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
}

/* Loading Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* ============================================================================
   TANK CARDS (Dashboard)
   ============================================================================ */
.tank-card {
    border-radius: 12px;
    overflow: hidden;
    transition: var(--tlb-transition);
}

.tank-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.tank-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #e2e8f0;
}

.tank-card-body {
    padding: 1.25rem;
}

.tank-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.tank-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #718096;
}

.tank-stat i {
    color: #667eea;
}

/* ============================================================================
   MEASUREMENT CHARTS
   ============================================================================ */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* ============================================================================
   PARAMETER BADGES
   ============================================================================ */
.param-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--tlb-border-radius);
    background: white;
    border: 1px solid #e2e8f0;
}

.param-badge.ok {
    border-color: #48bb78;
    background: #f0fff4;
}

.param-badge.warning {
    border-color: #ed8936;
    background: #fffaf0;
}

.param-badge.danger {
    border-color: #f56565;
    background: #fff5f5;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .tank-card-image {
        height: 150px;
    }

    .chart-container {
        height: 250px;
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Future)
   ============================================================================ */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles will go here */
}
