/* Admin Panel Premium Styles - Reference Match Redesign */

:root {
    --sidebar-width: 280px;
    --topbar-height: 80px;
    --bg-body: #F4F7FE;
    --bg-card: #FFFFFF;
    --text-primary: #2B3674;
    --text-secondary: #A3AED0;
    --color-primary: #FF6B35;
    /* Brand Orange */
    --color-primary-light: #FFF1EB;
    --shadow-soft: 0px 18px 40px rgba(112, 144, 176, 0.12);
    --radius-card: 20px;
}

body {
    background-color: var(--bg-body);
    font-family: 'Cairo', sans-serif;
    color: var(--text-primary);
    overflow-x: hidden;
}

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

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-card);
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    z-index: 50;
    padding: 30px;
    display: flex;
    flex-direction: column;
    border-left: 1px solid rgba(0, 0, 0, 0.02);
    /* Subtle separator */
}

.admin-main {
    flex: 1;
    margin-right: var(--sidebar-width);
    /* RTL */
    padding: 30px;
    transition: margin-right 0.3s ease;
}

@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(100%);
        transition: transform 0.3s ease;
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-right: 0;
    }
}

/* --- Sidebar Styling --- */
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 40px;
    border-bottom: 1px solid #F4F7FE;
    margin-bottom: 30px;
}

.sidebar-logo img {
    height: 40px;
}

.sidebar-logo span {
    font-size: 20px;
    font-weight: 900;
    color: var(--text-primary);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-radius: 12px;
    /* Slightly less rounded than full pill */
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
}

.nav-item.active {
    color: var(--color-primary);
    background: transparent;
    /* Reference style often uses border-right or bold text */
    font-weight: 800;
}

.nav-item.active::after {
    content: '';
    position: absolute;
    right: -30px;
    /* Stick to edge */
    top: 50%;
    transform: translateY(-50%);
    height: 36px;
    width: 4px;
    background: var(--color-primary);
    border-radius: 4px 0 0 4px;
}

.nav-icon {
    font-size: 22px;
}

/* --- Topbar Styling --- */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(244, 247, 254, 0.8);
    /* Glassy background matching body */
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 40;
    padding: 10px 0;
}

.search-bar {
    background: var(--bg-card);
    border-radius: 30px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-soft);
    width: 300px;
}

.search-input {
    border: none;
    outline: none;
    background: transparent;
    width: 100%;
    font-family: inherit;
    font-size: 14px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    color: var(--text-secondary);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    color: var(--color-primary);
    transform: translateY(-2px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    padding: 6px 16px 6px 6px;
    border-radius: 30px;
    box-shadow: var(--shadow-soft);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* --- Dashboard Widgets --- */

/* Stats Card */
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon-box {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-info h4 {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 4px;
}

.stat-info h3 {
    color: var(--text-primary);
    font-size: 24px;
    font-weight: 800;
}

/* Booking/Ticket Card (Horizontal Scroll) */
.booking-scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    margin-bottom: 30px;
    scrollbar-width: none;
    /* Firefox */
}

.booking-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.ticket-card {
    min-width: 300px;
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 20px;
    box-shadow: var(--shadow-soft);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
}

.ticket-route {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.route-code {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
}

.route-plane {
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.route-line {
    height: 2px;
    width: 60px;
    background: repeating-linear-gradient(90deg, var(--text-secondary) 0, var(--text-secondary) 4px, transparent 4px, transparent 8px);
}

.ticket-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.ticket-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.status-paid {
    background: #E6F7F0;
    color: #05CD99;
}

.status-pending {
    background: #FFF8E6;
    color: #FFB547;
}

.status-cancelled {
    background: #FEEFEF;
    color: #EE5D50;
}

/* Chart Placeholder */
.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    height: 100%;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0) 0%, rgba(255, 107, 53, 0.1) 100%);
    border-bottom: 2px solid var(--color-primary);
    position: relative;
    border-radius: 0 0 10px 10px;
}

.chart-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 50" preserveAspectRatio="none"><path d="M0,50 Q25,10 50,30 T100,20" fill="none" stroke="%23FF6B35" stroke-width="2"/></svg>');
    background-size: 100% 100%;
}

/* Table Styling */
.soft-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.soft-table th {
    color: var(--text-secondary);
    font-weight: 600;
    padding: 10px 20px;
    text-align: right;
    font-size: 14px;
}

.soft-table td {
    background: var(--bg-card);
    padding: 16px 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.soft-table tr td:first-child {
    border-radius: 0 15px 15px 0;
}

.soft-table tr td:last-child {
    border-radius: 15px 0 0 15px;
}

.soft-table tr:hover td {
    transform: scale(1.01);
    transition: transform 0.2s;
    box-shadow: var(--shadow-soft);
}