/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00AA13;
    --primary-dark: #008A0F;
    --secondary: #FFC107;
    --danger: #DC3545;
    --warning: #FF9800;
    --info: #17A2B8;
    --dark: #212529;
    --light: #F8F9FA;
    --white: #FFFFFF;
    --gray: #6C757D;
    --gray-light: #E9ECEF;
    --border-radius: 12px;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: var(--white);
}

.login-header h1 {
    font-size: 28px;
    color: var(--dark);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--gray);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 500;
    font-size: 14px;
}

.login-form label i {
    margin-right: 8px;
    color: var(--primary);
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.login-form input:focus,
.login-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 170, 19, 0.1);
}

.login-form select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    background: var(--white);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236C757D' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
}

a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
button.btn,
button.btn:hover,
button.btn:focus,
button.btn:active {
    text-decoration: none !important;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-block {
    width: 100%;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray);
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-error {
    background: #FEE;
    color: #C33;
    border: 1px solid #FCC;
}

.alert-success {
    background: #EFE;
    color: #3C3;
    border: 1px solid #CFC;
}

/* Driver Dashboard - Gojek/Grab Style */
.driver-dashboard {
    background: var(--light);
    min-height: 100vh;
    padding-bottom: 80px;
}

.driver-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px 15px 30px;
    border-radius: 0 0 25px 25px;
    box-shadow: var(--shadow);
}

.driver-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.driver-greeting h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.driver-greeting p {
    font-size: 14px;
    opacity: 0.9;
}

.driver-menu-toggle {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    width: 45px;
    height: 45px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    pointer-events: auto !important;
    z-index: 9999 !important;
    position: relative;
}

.driver-menu-toggle:hover {
    background: rgba(255,255,255,0.3);
}

.driver-menu-toggle:active {
    transform: scale(0.95);
}

/* Driver Profile Dropdown */
.driver-profile-dropdown {
    position: relative;
}

.driver-profile-toggle {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255,255,255,0.3);
    color: var(--white);
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    padding: 0;
    overflow: hidden;
}

.driver-profile-toggle:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

.driver-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.driver-profile-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 700;
    color: var(--white);
}

.driver-profile-toggle i {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: rgba(255,255,255,0.9);
    color: var(--primary);
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.driver-profile-toggle i.rotate {
    transform: rotate(180deg);
}

.driver-profile-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.driver-profile-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.profile-menu-item:last-child {
    border-bottom: none;
}

.profile-menu-item:hover {
    background: rgba(0, 170, 19, 0.1);
    color: var(--primary);
}

.profile-menu-item.logout-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.profile-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.profile-menu-item span {
    font-size: 14px;
    font-weight: 500;
}

/* Driver Menu */
.driver-menu {
    position: fixed;
    top: 0;
    left: -300px;
    width: 280px;
    height: 100vh;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    z-index: 1002;
    transition: left 0.3s ease;
    overflow-y: auto;
    pointer-events: auto;
}

.driver-menu.active {
    left: 0 !important;
    display: block !important;
    visibility: visible !important;
}

.driver-menu-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.driver-menu-header h3 {
    margin: 0;
    font-size: 20px;
}

.driver-menu-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: var(--white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.driver-menu-close:hover {
    background: rgba(255,255,255,0.3);
}

.driver-menu-items {
    padding: 10px 0;
    position: relative;
    z-index: 1003;
    pointer-events: auto;
}

.driver-menu-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
    position: relative;
    pointer-events: auto;
    cursor: pointer;
    z-index: 1003;
}

.driver-menu-item:hover {
    background: var(--gray-light);
    border-left-color: var(--primary);
}

.driver-menu-item.active {
    background: rgba(0, 170, 19, 0.1);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.driver-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 18px;
    color: var(--gray);
}

.driver-menu-item.active i {
    color: var(--primary);
}

.driver-menu-item.logout {
    color: var(--danger);
}

.driver-menu-item.logout i {
    color: var(--danger);
}

.driver-menu-item.logout:hover {
    background: rgba(220, 53, 69, 0.1);
    border-left-color: var(--danger);
}

.driver-menu-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 10px 0;
}

/* Driver Submenu */
.driver-menu-parent {
    position: relative;
    display: block;
    width: 100%;
}

.driver-menu-toggle-sub {
    position: relative;
    display: flex !important;
    width: 100%;
}

.driver-menu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
    -webkit-transition: transform 0.3s ease;
}

.driver-menu-parent.expanded .driver-menu-arrow {
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
}

.driver-submenu {
    display: block;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: max-height 0.3s ease;
    -webkit-transition: max-height 0.3s ease;
}

.driver-menu-parent.expanded .driver-submenu {
    max-height: 500px;
}

.driver-submenu-item {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px 20px 12px 45px;
    color: var(--dark);
    text-decoration: none;
    font-size: 14px;
    border-left: 3px solid transparent;
    transition: all 0.2s ease;
    -webkit-transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.driver-submenu-item:hover {
    background: #e9ecef;
    border-left-color: var(--primary);
}

.driver-submenu-item.active {
    background: rgba(0, 170, 19, 0.1);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.driver-submenu-item i {
    width: 18px;
    min-width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--gray);
    flex-shrink: 0;
}

.driver-submenu-item.active i {
    color: var(--primary);
}

.driver-submenu-item span {
    flex: 1;
}

.menu-badge {
    margin-left: auto;
    background: var(--danger);
    color: var(--white);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.driver-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.driver-menu-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Menu toggle selalu terlihat - tidak disembunyikan di desktop */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 20px;
}

.stat-card {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
}

.stat-card .number {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 5px;
}

.stat-card .label {
    font-size: 12px;
    opacity: 0.9;
}

.driver-content {
    padding: 20px 15px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title i {
    color: var(--primary);
}

.schedule-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.tab-btn {
    padding: 10px 20px;
    background: var(--white);
    border: 2px solid var(--gray-light);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.3s;
}

.tab-btn.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.schedule-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.schedule-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.schedule-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--gray-light);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.schedule-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    white-space: nowrap;
    text-align: center;
    min-width: fit-content;
}

/* Payment Status Badges */
.status-badge.status-paid {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.status-badge.status-partial {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: #856404;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.3);
}

.status-badge.status-paid_on_location {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 5px rgba(23, 162, 184, 0.3);
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
    border: 1px solid #FFC107;
}

.status-accepted {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #28A745;
}

.status-rejected {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #DC3545;
}

.status-confirmed {
    background: #D1ECF1;
    color: #0C5460;
}

.status-in_trip {
    background: linear-gradient(135deg, #B3D9FF 0%, #99CCFF 100%);
    color: #004085;
    border: 1px solid #0066CC;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
    font-weight: 700;
    letter-spacing: 0.3px;
    padding: 7px 14px;
}

/* Vehicle Status */
.status-available {
    background: #d4edda;
    color: #155724;
}

.status-in_use {
    background: #fff3cd;
    color: #856404;
}

.status-maintenance {
    background: #f8d7da;
    color: #721c24;
}

.status-inactive {
    background: #e2e3e5;
    color: #383d41;
}

.status-completed {
    background: #D4EDDA;
    color: #155724;
}

.status-cancelled {
    background: #F8D7DA;
    color: #721C24;
}

.status-success {
    background: #D4EDDA;
    color: #155724;
}

.status-info {
    background: #D1ECF1;
    color: #0C5460;
}

.status-primary {
    background: #D1ECF1;
    color: #0C5460;
}

.schedule-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--dark);
}

.schedule-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 15px;
}

.schedule-detail-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--gray);
}

.schedule-detail-item i {
    width: 20px;
    color: var(--primary);
}

.schedule-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--gray-light);
}

.schedule-date {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state p {
    font-size: 16px;
}

/* Bottom Navigation */
/* Bottom Navigation Badge */
.notification-badge-bottom {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, #e74c3c 0%, #c82333 100%);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 12px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.4);
    animation: pulse-badge 2s ease-in-out infinite;
    border: 2px solid white;
    z-index: 10;
}

@keyframes pulse-badge {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--white);
    border-top: 1px solid var(--gray-light);
    padding: 10px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    color: var(--gray);
    font-size: 12px;
    transition: all 0.3s;
    padding: 5px 15px;
    position: relative;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 20px;
}

/* Admin Dashboard */
.admin-dashboard {
    background: var(--light);
    min-height: 100vh;
    display: flex;
}

/* Admin Sidebar */
.admin-sidebar {
    width: 260px;
    background: var(--white);
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.admin-sidebar.collapsed .logo-text,
.admin-sidebar.collapsed .menu-text,
.admin-sidebar.collapsed .user-details {
    display: none;
}

.admin-sidebar.collapsed .menu-arrow,
.admin-sidebar.collapsed .submenu {
    display: none;
}

.admin-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-light);
    min-height: 70px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary);
    font-size: 24px;
    font-weight: 700;
}

.sidebar-logo i {
    font-size: 28px;
}

.logo-text {
    transition: opacity 0.3s;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.sidebar-toggle:hover {
    background: var(--gray-light);
    color: var(--primary);
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.sidebar-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    color: var(--gray);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: var(--gray-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-menu a.active {
    background: rgba(0, 170, 19, 0.1);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 18px;
}

.menu-text {
    transition: opacity 0.3s;
}

.menu-item-has-children {
    position: relative;
}

.menu-toggle {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.menu-toggle:hover {
    background: var(--gray-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.menu-arrow {
    margin-left: auto;
    font-size: 12px;
    transition: transform 0.3s ease;
}

.menu-item-has-children.expanded .menu-arrow {
    transform: rotate(180deg);
}

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    background: rgba(0, 0, 0, 0.02);
    opacity: 0;
}

.menu-item-has-children.expanded .submenu {
    max-height: 500px;
    opacity: 1;
}

.submenu li {
    margin: 0;
}

.submenu a {
    padding-left: 55px;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 14px;
}

.submenu a i {
    font-size: 16px;
}

.submenu a.active {
    background: rgba(0, 170, 19, 0.15);
    color: var(--primary);
    border-left-color: var(--primary);
    font-weight: 600;
}

.menu-divider {
    height: 1px;
    background: var(--gray-light);
    margin: 10px 20px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-light);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.user-details {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--gray);
    text-transform: capitalize;
}

/* Admin Header */
.admin-header {
    background: var(--white);
    padding: 20px 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 260px;
    right: 0;
    z-index: 999;
    transition: left 0.3s ease;
    min-height: 70px;
    border-bottom: 1px solid var(--gray-light);
}

.admin-dashboard:has(.admin-sidebar.collapsed) .admin-header {
    left: 70px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-title {
    display: flex;
    align-items: center;
}

.header-left h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    line-height: 1.2;
}

.sidebar-toggle-mobile {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.sidebar-toggle-mobile:hover {
    background: var(--gray-light);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
}

.user-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--gray-light);
    border: none;
    border-radius: 25px;
    color: var(--dark);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-dropdown-toggle:hover {
    background: rgba(0, 170, 19, 0.1);
    color: var(--primary);
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
    border: 2px solid rgba(0, 170, 19, 0.2);
}

.user-name {
    white-space: nowrap;
    font-weight: 500;
}

.user-dropdown-toggle i {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.user-dropdown-toggle i.rotate {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.user-dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: var(--primary);
}

.dropdown-item.active {
    background: rgba(0, 170, 19, 0.1);
    color: var(--primary);
    font-weight: 600;
}

.dropdown-item.logout-item:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.dropdown-item span {
    font-size: 14px;
}

.admin-content {
    padding: 30px;
    margin-left: 260px;
    width: calc(100% - 260px);
    transition: all 0.3s ease;
    min-height: calc(100vh - 70px);
    margin-top: 70px;
}

.admin-dashboard:has(.admin-sidebar.collapsed) .admin-content {
    margin-left: 70px;
    width: calc(100% - 70px);
}

/* Admin Overlay for Mobile */
.admin-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.admin-overlay.active {
    display: block;
}

/* Responsive */
@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .admin-sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .admin-header {
        left: 0 !important;
    }
    
    .admin-content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 20px 15px;
        margin-top: 70px;
    }
    
    .sidebar-toggle-mobile {
        display: block;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .user-name {
        display: none;
    }
    
    .user-dropdown-toggle {
        padding: 8px 12px;
        min-width: 40px;
        justify-content: center;
    }
    
    .header-user .user-greeting {
        display: none;
    }
    
    .header-user {
        padding: 8px;
    }
}

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-light);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-light);
    vertical-align: middle;
}

table th {
    background: var(--gray-light);
    font-weight: 600;
    color: var(--dark);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    text-decoration: none !important;
}

/* Ensure all button variants don't have underline */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-info,
.btn-warning,
.btn-sm,
.btn-lg {
    text-decoration: none !important;
}

a.btn-primary,
a.btn-secondary,
a.btn-success,
a.btn-danger,
a.btn-info,
a.btn-warning,
a.btn-sm,
a.btn-lg,
a.btn-primary:hover,
a.btn-secondary:hover,
a.btn-success:hover,
a.btn-danger:hover,
a.btn-info:hover,
a.btn-warning:hover,
a.btn-sm:hover,
a.btn-lg:hover {
    text-decoration: none !important;
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #C82333;
}

.btn-secondary {
    background: var(--gray);
    color: var(--white);
}

.btn-secondary:hover {
    background: #5A6268;
}

.btn-success {
    background: var(--primary);
    color: var(--white);
}

.btn-success:hover {
    background: var(--primary-dark);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-control {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--gray-light);
    border-radius: 8px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group-section {
    background: var(--gray-light);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid var(--primary);
}

.section-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--dark);
    margin: 0 0 15px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-label::before {
    content: '';
    width: 4px;
    height: 20px;
    background: var(--primary);
    border-radius: 2px;
}

/* Modal Styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 2px solid var(--gray-light);
    position: sticky;
    top: 0;
    background: var(--white);
    z-index: 10;
}

.modal-header h2 {
    font-size: 22px;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray);
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 25px;
    border-top: 2px solid var(--gray-light);
    position: sticky;
    bottom: 0;
    background: var(--white);
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    .modal-overlay {
        padding: 0;
    }
    
    .modal-body {
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        padding: 20px;
    }
    
    .form-group-section {
        padding: 15px;
    }
    
    /* Schedules Page Responsive */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .card-header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        width: 100%;
    }
    
    .card-header-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
        font-size: 13px;
        padding: 8px 12px;
    }
    
    .card-header-actions .btn-text {
        display: none;
    }
    
    .filter-section {
        padding: 15px;
        background: var(--gray-light);
        border-radius: 8px;
        margin-bottom: 20px;
    }
    
    .filter-form {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .filter-form .form-group {
        margin-bottom: 0;
    }
    
    .filter-form label {
        font-size: 12px;
        margin-bottom: 5px;
        display: block;
        color: var(--gray);
        font-weight: 500;
    }
    
    /* Table to Card Layout for Mobile */
    .table-responsive {
        overflow-x: visible;
    }
    
    .table-responsive table,
    .table-responsive thead,
    .table-responsive tbody,
    .table-responsive th,
    .table-responsive td,
    .table-responsive tr {
        display: block;
    }
    
    .table-responsive thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .table-responsive tr {
        background: white;
        border: 2px solid var(--gray-light);
        border-radius: 12px;
        margin-bottom: 15px;
        padding: 15px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
    }
    
    .table-responsive tr:hover {
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
        transform: translateY(-2px);
    }
    
    .table-responsive td {
        border: none;
        padding: 12px 0;
        position: relative;
        padding-left: 45%;
        text-align: left;
        border-bottom: 1px solid var(--gray-light);
    }
    
    .table-responsive td:last-child {
        border-bottom: none;
    }
    
    .table-responsive td:before {
        content: attr(data-label);
        position: absolute;
        left: 0;
        width: 40%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: 600;
        color: var(--dark);
        font-size: 13px;
        text-transform: uppercase;
        letter-spacing: 0.3px;
    }
    
    .table-responsive td[data-label="Item"] {
        padding-left: 0;
        padding-bottom: 15px;
        border-bottom: 2px solid var(--primary);
        margin-bottom: 10px;
    }
    
    .table-responsive td[data-label="Item"]:before {
        display: none;
    }
    
    .table-responsive td[data-label="Item"] strong {
        display: block;
        font-size: 16px;
        color: var(--primary);
        margin-bottom: 5px;
    }
    
    .table-responsive td[data-label="Item"] small {
        display: block;
        font-size: 13px;
        color: var(--gray);
        line-height: 1.4;
    }
    
    .table-responsive td[data-label="Status"] {
        padding-left: 0;
        padding-top: 15px;
        border-top: 2px solid var(--gray-light);
        margin-top: 10px;
    }
    
    .table-responsive td[data-label="Status"]:before {
        display: none;
    }
    
    .table-responsive td[data-label="Aksi"] {
        padding-left: 0;
        padding-top: 15px;
        border-top: 2px solid var(--gray-light);
        margin-top: 10px;
    }
    
    .table-responsive td[data-label="Aksi"]:before {
        display: none;
    }
    
    .table-responsive td[data-label="Aksi"] .btn {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .table-responsive td[data-label="Aksi"] form {
        width: 100%;
    }
    
    .table-responsive td[data-label="Aksi"] .btn-sm {
        padding: 10px;
        font-size: 14px;
    }
    
    /* Payment info styling in mobile */
    .table-responsive td[data-label="Harga & Pembayaran"] {
        background: var(--gray-light);
        padding: 15px;
        border-radius: 8px;
        margin: 10px 0;
    }
    
    .table-responsive td[data-label="Harga & Pembayaran"]:before {
        font-size: 14px;
        margin-bottom: 10px;
        display: block;
        position: static;
        width: 100%;
        padding-bottom: 8px;
        border-bottom: 1px solid var(--gray);
    }
    
    /* Empty state */
    .table-responsive tr.empty-row {
        text-align: center;
        padding: 40px 20px;
    }
    
    .table-responsive tr.empty-row td {
        padding: 0 !important;
        padding-left: 0 !important;
        border: none !important;
    }
    
    .table-responsive tr.empty-row td:before {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .card-header-actions .btn {
        min-width: 100%;
        font-size: 12px;
        padding: 10px;
    }
    
    .table-responsive td {
        padding-left: 0;
        padding-top: 35px;
    }
    
    .table-responsive td:before {
        position: absolute;
        top: 12px;
        left: 0;
        width: 100%;
        font-size: 12px;
    }
    
    .table-responsive td[data-label="Item"] {
        padding-top: 0;
    }
    
    .table-responsive td[data-label="Status"],
    .table-responsive td[data-label="Aksi"] {
        padding-top: 35px;
    }
    
    /* Login Page Responsive */
    .login-page {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header .logo {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    /* Print Schedule Page Responsive */
    body {
        padding: 10px;
        font-size: 11px;
    }
    
    .no-print {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 15px;
    }
    
    .no-print button {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
    
    .header {
        margin-bottom: 20px;
        padding-bottom: 10px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .header p {
        font-size: 11px;
        margin: 3px 0;
    }
    
    table {
        font-size: 10px;
    }
    
    th, td {
        padding: 6px 4px;
    }
    
    th {
        font-size: 9px;
    }
    
    /* Verify Ratings Page Responsive */
    .filter-tabs {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }
    
    .filter-tab {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .rating-card-simple {
        margin-bottom: 20px;
    }
    
    .rating-card-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .rating-card-left {
        width: 100%;
    }
    
    .rating-card-header > div:last-child {
        text-align: left;
        width: 100%;
    }
    
    .rating-info h4 {
        font-size: 16px;
        margin-bottom: 8px;
    }
    
    .rating-info p {
        font-size: 13px;
        margin: 5px 0;
    }
    
    .rating-value-small {
        font-size: 32px;
    }
    
    .rating-stars-small {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Login Page */
    .login-card {
        padding: 25px 15px;
    }
    
    .login-header .logo {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    /* Print Schedule Page */
    body {
        padding: 5px;
        font-size: 10px;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    table {
        font-size: 9px;
    }
    
    th, td {
        padding: 4px 2px;
    }
    
    th {
        font-size: 8px;
    }
    
    /* Verify Ratings Page */
    .rating-card-simple {
        padding: 15px;
    }
    
    .rating-info h4 {
        font-size: 14px;
    }
    
    .rating-info p {
        font-size: 12px;
    }
    
    .rating-value-small {
        font-size: 28px;
    }
    
    .input-rating-star {
        font-size: 28px !important;
    }
}

/* Admin Container Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.admin-main {
    flex: 1;
    min-height: 100vh;
    background: #f5f7fa;
}

body:has(.admin-container) {
    background: #f5f7fa;
}

/* Font Size Controls for Driver Pages */
body.font-size-small {
    font-size: 12px;
}

body.font-size-small .driver-content {
    font-size: 12px;
}

body.font-size-small .driver-content * {
    font-size: calc(12px * 0.875) !important;
}

body.font-size-small .driver-menu,
body.font-size-small .driver-menu *,
body.font-size-small .bottom-nav,
body.font-size-small .bottom-nav * {
    font-size: calc(14px * 0.875) !important;
}

body.font-size-normal {
    font-size: 14px;
}

body.font-size-normal .driver-content {
    font-size: 14px;
}

body.font-size-normal .driver-content * {
    font-size: calc(14px * 1) !important;
}

body.font-size-large {
    font-size: 16px;
}

body.font-size-large .driver-content {
    font-size: 16px;
}

body.font-size-large .driver-content * {
    font-size: calc(16px * 1.125) !important;
}

body.font-size-large .driver-menu,
body.font-size-large .driver-menu *,
body.font-size-large .bottom-nav,
body.font-size-large .bottom-nav * {
    font-size: calc(14px * 1.125) !important;
}

/* Smooth transition for font size changes */
.driver-content,
.driver-content *,
.driver-menu,
.driver-menu *,
.bottom-nav,
.bottom-nav * {
    transition: font-size 0.3s ease;
}
