/* assets/css/style.css - Total Redesign (Dashboard & App) */
:root {
    --primary-color: #00A896; /* Teal */
    --primary-hover: #028e7e;
    --secondary-color: #f1f5f9; /* Light Gray for backgrounds */
    --bg-color: #f8fafc; /* Outer background */
    --surface-color: #ffffff; /* Card/App background */
    --text-main: #1e293b; /* Slate 800 */
    --text-muted: #64748b; /* Slate 500 */
    --border-color: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
}

/* --------------------------------------
   Mobile-First Layout (Bottom Nav)
   -------------------------------------- */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid var(--border-color);
    z-index: 1000;
    padding: 0.5rem 0;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
}

.sidebar-header.desktop-only {
    display: none;
}

.nav-links {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    gap: 4px;
    transition: all 0.2s;
    padding: 0.5rem;
    border-radius: 8px;
}

.nav-item i {
    font-size: 1.5rem;
}

.nav-item:hover, .nav-item.active {
    color: var(--primary-color);
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px; /* Space for bottom nav */
}

.topbar.mobile-only {
    background: white;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    background: white;
    padding: 0.5rem 1.5rem;
    border-radius: 99px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.logo-btn:hover {
    transform: translateY(-2px);
}

.logo-btn i {
    font-size: 1.8rem;
}

.main-content {
    padding: 1.5rem;
    width: 100%;
}

/* --------------------------------------
   Desktop Layout (Sidebar)
   -------------------------------------- */
@media (min-width: 768px) {
    body {
        background: linear-gradient(rgba(248, 250, 252, 0.8), rgba(248, 250, 252, 0.8)), url('../bg_scenic.png') center/cover fixed;
    }

    .app-container {
        flex-direction: row;
    }

    .sidebar {
        top: 0;
        bottom: 0;
        left: 0;
        width: 80px;
        border-top: none;
        border-right: 1px solid var(--border-color);
        padding: 0;
        display: flex;
        flex-direction: column;
        background: white;
        box-shadow: 4px 0 15px rgba(0,0,0,0.03);
        transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: width;
        overflow-x: hidden;
        white-space: nowrap;
    }

    .sidebar:hover {
        width: 260px;
    }

    .sidebar-header.desktop-only {
        display: flex;
        padding: 2rem 0;
        border-bottom: 1px solid var(--border-color);
        align-items: center;
    }

    .sidebar-header.desktop-only .logo-btn {
        box-shadow: none;
        background: transparent;
        width: calc(100% - 24px);
        margin: 0 12px;
        padding: 1rem 14px;
        justify-content: flex-start;
        overflow: hidden;
    }

    .sidebar .nav-item span,
    .sidebar .logo-btn > span {
        transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: opacity;
    }

    .sidebar:not(:hover) .nav-item span,
    .sidebar:not(:hover) .logo-btn > span {
        opacity: 0;
        pointer-events: none;
    }

    .nav-links {
        flex-direction: column;
        justify-content: flex-start;
        padding: 1.5rem 0;
        gap: 0.5rem;
    }

    .nav-item {
        flex-direction: row;
        width: calc(100% - 24px);
        margin: 0 12px;
        padding: 1rem;
        font-size: 1rem;
        gap: 1.5rem;
        font-weight: 500;
        border-radius: 12px;
        overflow: hidden;
    }

    .nav-item:hover, .nav-item.active {
        background: var(--secondary-color);
    }

    .main-wrapper {
        margin-left: 80px;
        padding-bottom: 0;
        transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
        will-change: margin-left;
    }

    .sidebar:hover ~ .main-wrapper {
        margin-left: 260px;
    }

    .topbar.mobile-only {
        display: none;
    }

    .main-content {
        padding: 3rem 4rem;
        max-width: 1400px;
    }
}

/* --------------------------------------
   UI Components (Cards, Buttons, Tables)
   -------------------------------------- */
.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    margin-bottom: 1.5rem;
    transition: box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-align: center;
    transition: all 0.2s ease;
    text-decoration: none;
    outline: none;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 150, 0.3);
}

/* Forms */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.8rem 1.2rem;
    background: var(--secondary-color);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-main);
    transition: all 0.3s;
}

.form-control:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 168, 150, 0.1);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: 12px;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    text-align: left;
}

.modern-table th {
    background: var(--secondary-color);
    padding: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

.modern-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--text-main);
}

.modern-table tbody tr:hover {
    background: #f8fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-danger { background: #fee2e2; color: #ef4444; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-info { background: #e0f2fe; color: #0284c7; }
.badge-secondary { background: #f1f5f9; color: #475569; }

/* Grids */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}
.alert-error { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #86efac; }

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-danger { color: #ef4444; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
