@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --primary-blue: #00529C;
    --primary-blue-hover: #003F7A;
    --primary-red: #ED1C24;
    --primary-red-hover: #C5151D;
    --bg-color: #F4F7F6;
    --sidebar-bg: #FFFFFF;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Authentication Page Styles (Split Screen) */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    background: white;
}

.auth-left {
    flex: 1.2;
    background: url('../img/airplane_bg.jpg') no-repeat center center / cover;
    background-color: #8DA9D4; /* Fallback */
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 3rem;
    color: white;
}

.auth-left-content {
    z-index: 2;
    margin-top: 2rem;
}

.auth-left-title {
    font-size: 3rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.auth-left-subtitle {
    font-size: 1.5rem;
    font-weight: 500;
    opacity: 0.9;
}

.auth-left-footer {
    position: absolute;
    bottom: 2rem;
    left: 3rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-right {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 2rem;
    border-top-left-radius: 40px;
    border-bottom-left-radius: 40px;
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    z-index: 5;
    margin-left: -20px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    animation: fadeInRight 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInRight {
    0% { opacity: 0; transform: translateX(40px); }
    100% { opacity: 1; transform: translateX(0); }
}

.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2.5rem;
    gap: 12px;
}
.auth-logo .logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-blue);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 8px 16px rgba(0, 82, 156, 0.2);
}
.auth-logo .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
}

.auth-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.5rem;
}
.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: white;
    transition: var(--transition);
    outline: none;
    font-family: 'Inter', sans-serif;
}
.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(0, 82, 156, 0.1);
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

.checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
}

.forgot-link {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}
.forgot-link:hover {
    text-decoration: underline;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
    gap: 8px;
}
.btn-primary {
    background: var(--primary-blue);
    color: white;
    width: 100%;
}
.btn-primary:hover {
    background: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 82, 156, 0.25);
}
.btn-red {
    background: var(--primary-red);
    color: white;
}
.btn-red:hover {
    background: var(--primary-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(237, 28, 36, 0.25);
}
.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    border-radius: 6px;
}

/* Layout App */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 40;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}
.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.sidebar-menu {
    padding: 1.5rem 1rem;
    flex-grow: 1;
    overflow-y: auto;
}
.menu-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: var(--transition);
    font-weight: 500;
    gap: 12px;
}
.menu-item:hover, .menu-item.active {
    background: rgba(0, 82, 156, 0.05);
    color: var(--primary-blue);
}
.menu-item.active {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 82, 156, 0.2);
}
.menu-item svg {
    width: 20px;
    height: 20px;
    transition: var(--transition);
}
.menu-item:hover svg, .menu-item.active svg {
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: var(--transition);
}

/* Topbar */
.topbar {
    height: 70px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 30;
}
.page-title {
    font-size: 1.25rem;
    color: var(--text-dark);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-blue);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
}
.user-info {
    display: flex;
    flex-direction: column;
}
.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}
.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Content Area */
.content-area {
    padding: 2rem;
    flex-grow: 1;
    animation: fadeIn 0.4s ease-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cards */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}
.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}
.stat-card:hover::after {
    transform: scaleX(1);
}
.stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}
.stat-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.stat-value {
    font-size: 2rem;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
    line-height: 1;
}
.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(0, 82, 156, 0.1);
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.stat-icon svg {
    width: 24px;
    height: 24px;
}
.stat-card:nth-child(2) .stat-icon { background: rgba(237, 28, 36, 0.1); color: var(--primary-red); }
.stat-card:nth-child(2)::after { background: var(--primary-red); }
.stat-card:nth-child(3) .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.stat-card:nth-child(3)::after { background: #10B981; }
.stat-card:nth-child(4) .stat-icon { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.stat-card:nth-child(4)::after { background: #F59E0B; }

/* Charts Area */
.grid-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}
.chart-header {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Tables */
.table-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}
.table-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.table-responsive {
    overflow-x: auto;
}
.custom-table {
    width: 100%;
    border-collapse: collapse;
}
.custom-table th {
    background: #F8FAFC;
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}
.custom-table td {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-dark);
}
.custom-table tbody tr {
    transition: var(--transition);
}
.custom-table tbody tr:hover {
    background: #F8FAFC;
}
.action-btns {
    display: flex;
    gap: 0.5rem;
}
.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: white;
}
.btn-edit { background: var(--primary-blue); }
.btn-edit:hover { background: var(--primary-blue-hover); transform: scale(1.1); }
.btn-view { background: #10B981; }
.btn-view:hover { background: #059669; transform: scale(1.1); }
.btn-delete { background: var(--primary-red); }
.btn-delete:hover { background: var(--primary-red-hover); transform: scale(1.1); }

.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}
.badge-success { background: rgba(16, 185, 129, 0.1); color: #10B981; }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }

/* Coming Soon */
.coming-soon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: calc(100vh - 70px - 4rem);
    text-align: center;
    animation: zoomInFade 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes zoomInFade {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}
.cs-icon {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-20px); }
    60% { transform: translateY(-10px); }
}
.cs-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.cs-desc {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 500px;
}

/* Mobile Responsive */
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-dark);
}
@media (max-width: 992px) {
    .grid-charts { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: block; }
    .page-title { display: none; }
    .auth-card { padding: 2rem; margin: 1rem; }
    .auth-left { display: none; }
    .auth-right { margin-left: 0; border-radius: 0; padding: 1rem; align-items: flex-start; padding-top: 4rem; }
}
