/**
 * TukTuk Rental Management System Stylesheet
 * Professional, responsive design with modern UI
 */

/* ========== Global Styles ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #007bff;
    --primary-dark: #0056b3;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --secondary-color: #6c757d;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --text-muted: #6c757d;
    --sidebar-width: 250px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
}

/* ========== Login Page ========== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #ffffff;
    padding: 40px 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.login-card {
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.08);
    padding: 48px 36px;
    text-align: center;
}

.login-logo img {
    max-width: 140px;
    margin-bottom: 20px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.login-subtitle {
    color: #64748b;
    font-size: 15px;
    margin-bottom: 28px;
}

.login-form {
    text-align: left;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
}

.link-primary {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.link-primary:hover {
    color: var(--primary-dark);
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    color: #ffffff;
    font-weight: 600;
    padding: 12px 18px;
    border-radius: 10px;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 16px rgba(0, 123, 255, 0.3);
}

@media (max-width: 576px) {
    .login-card {
        padding: 36px 24px;
        border-radius: 16px;
    }

    .login-title {
        font-size: 22px;
    }

    .login-subtitle {
        font-size: 14px;
    }
}

/* ========== Layout ========== */
.wrapper {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

/* ========== Sidebar ========== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    left: 0;
    top: 0;
    transition: transform 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-header h3 {
    font-size: 20px;
    margin: 0;
    flex: 1;
}

.sidebar-close {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 28px;
    width: 35px;
    height: 35px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-close span {
    line-height: 1;
    display: block;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 30px;
}

.sidebar-menu li.active a {
    background: var(--primary-color);
    color: white;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-footer p {
    margin: 5px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

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

/* ========== Sticky Header ========== */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    border-bottom: 1px solid var(--border-color);
}

.sticky-header .mobile-menu-toggle {
    display: none;
    flex-shrink: 0;
}

.header-content {
    flex: 1;
}

.header-content h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin: 0 0 5px 0;
    font-weight: 600;
}

.header-content p {
    color: var(--text-muted);
    font-size: 16px;
    margin: 0;
}

.content-wrapper {
    flex: 1;
    padding: 30px;
}

.content-header {
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.content-header p {
    color: var(--text-muted);
    font-size: 16px;
}

/* ========== Cards ========== */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    color: var(--dark-color);
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* ========== Statistics Cards ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.stat-icon {
    font-size: 48px;
    margin-right: 20px;
    opacity: 0.8;
}

.stat-details h3 {
    font-size: 32px;
    margin: 0 0 5px 0;
}

.stat-details p {
    color: var(--text-muted);
    margin: 5px 0;
    font-size: 14px;
}

.stat-details small {
    color: var(--text-muted);
    font-size: 12px;
}

.stat-card-primary { border-left: 4px solid var(--primary-color); }
.stat-card-success { border-left: 4px solid var(--success-color); }
.stat-card-warning { border-left: 4px solid var(--warning-color); }
.stat-card-info { border-left: 4px solid var(--info-color); }

/* ========== Section Grid ========== */
.section-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ========== TukTuk Lists ========== */
.tuktuk-list {
    display: grid;
    gap: 10px;
}

.tuktuk-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.tuktuk-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.tuktuk-item.available {
    background: #d4edda;
    border-color: #c3e6cb;
}

.tuktuk-number {
    font-weight: bold;
    color: var(--dark-color);
}

.tuktuk-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tuktuk-item.available .tuktuk-status {
    background: var(--success-color);
    color: white;
}

/* ========== Booked TukTuks ========== */
.booked-list {
    display: grid;
    gap: 10px;
}

.booked-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid;
}

.booked-item.normal {
    background: #fff3cd;
    border-color: var(--warning-color);
}

.booked-item.warning {
    background: #ffe5d0;
    border-color: #ff8800;
}

.booked-item.urgent {
    background: #f8d7da;
    border-color: var(--danger-color);
}

.booked-info strong {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-color);
}

.booked-info p {
    margin: 0;
    font-size: 13px;
    color: var(--text-muted);
}

.booked-return {
    text-align: right;
}

.booked-return p {
    margin: 0 0 5px 0;
    font-size: 13px;
}

.booked-return small {
    color: var(--text-muted);
    font-size: 12px;
}

/* ========== Upcoming Bookings ========== */
.upcoming-bookings-list {
    display: grid;
    gap: 15px;
}

.upcoming-booking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px;
    border-radius: 8px;
    border-left: 4px solid;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.upcoming-booking-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.upcoming-booking-item.normal {
    border-color: var(--info-color);
    background: linear-gradient(to right, #e7f3ff 0%, #ffffff 5%);
}

.upcoming-booking-item.warning {
    border-color: #ff8800;
    background: linear-gradient(to right, #fff3e0 0%, #ffffff 5%);
}

.upcoming-booking-item.urgent {
    border-color: var(--danger-color);
    background: linear-gradient(to right, #ffebee 0%, #ffffff 5%);
    animation: pulse-urgent 2s ease-in-out infinite;
}

@keyframes pulse-urgent {
    0%, 100% {
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    }
    50% {
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }
}

.upcoming-booking-info {
    flex: 1;
}

.upcoming-booking-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.upcoming-booking-header strong {
    font-size: 16px;
    color: var(--dark-color);
}

.reminder-badge {
    font-size: 18px;
    animation: bell-ring 2s ease-in-out infinite;
}

.reminder-badge.active {
    opacity: 1;
}

@keyframes bell-ring {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20% {
        transform: rotate(10deg);
    }
}

.upcoming-booking-info p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.upcoming-booking-info p strong {
    color: var(--dark-color);
    font-weight: 600;
}

.upcoming-booking-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-left: 20px;
}

.upcoming-booking-date {
    text-align: right;
}

.upcoming-booking-date .days-count {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 5px 0;
    color: var(--dark-color);
}

.upcoming-booking-item.urgent .upcoming-booking-date .days-count {
    color: var(--danger-color);
}

.upcoming-booking-item.warning .upcoming-booking-date .days-count {
    color: #ff8800;
}

.upcoming-booking-date small {
    color: var(--text-muted);
    font-size: 12px;
}

.reminder-form {
    margin: 0;
    display: inline-block;
}

.reminder-form .btn {
    white-space: nowrap;
    min-width: 140px;
}

.reminder-form .btn:hover {
    transform: translateY(-1px);
}

.upcoming-booking-actions > div {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.upcoming-booking-actions .btn {
    white-space: nowrap;
}

/* ========== Tables ========== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table thead th {
    background: var(--light-color);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table tbody td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background: #f8f9fa;
}

.actions-cell {
    white-space: nowrap;
}

/* ========== Forms ========== */
.form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-color);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-input-wrapper .form-control {
    padding-right: 42px;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #495057;
    transition: all 0.2s ease;
    outline: none;
    z-index: 10;
    width: 24px;
    height: 24px;
    margin: 0;
    line-height: 0;
    border-radius: 2px;
    flex-shrink: 0;
}

.password-toggle:hover {
    color: #212529;
    background: rgba(0, 0, 0, 0.03);
}

.password-toggle:active {
    background: rgba(0, 0, 0, 0.06);
    transform: translateY(-50%) scale(0.95);
}

.password-toggle:focus {
    color: var(--primary-color);
    outline: none;
}

.password-toggle:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 1px;
    border-radius: 3px;
}

.password-toggle .eye-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

.password-toggle svg {
    width: 100%;
    height: 100%;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--text-muted);
}

.required {
    color: var(--danger-color);
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

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

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

.btn-primary:hover {
    background: var(--primary-dark);
}

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

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

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

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

.btn-warning {
    background: var(--warning-color);
    color: #333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* ========== Badges ========== */
.badge {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 20px;
    text-align: center;
}

.badge-success {
    background: var(--success-color);
    color: white;
}

.badge-warning {
    background: var(--warning-color);
    color: #333;
}

.badge-danger {
    background: var(--danger-color);
    color: white;
}

.badge-info {
    background: var(--info-color);
    color: white;
}

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

.badge-secondary {
    background: var(--secondary-color);
    color: white;
}

/* ========== Alerts ========== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert ul {
    margin: 5px 0 0 20px;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success-color);
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: var(--danger-color);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning-color);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info-color);
    color: #0c5460;
}

/* ========== TukTuk Selection ========== */
.tuktuk-groups {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.tuktuk-group h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.tuktuk-option {
    display: block;
    padding: 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.tuktuk-option:hover {
    border-color: var(--primary-color);
    background: #f8f9fa;
}

.tuktuk-option input[type="radio"] {
    margin-right: 10px;
}

.tuktuk-option input[type="radio"]:checked + .tuktuk-option-label {
    font-weight: bold;
}

.tuktuk-option.selected {
    border-color: var(--primary-color);
    background: #e7f1ff;
}

.addon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.addon-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.addon-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 3px 12px rgba(0, 123, 255, 0.15);
}

.addon-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.addon-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
}

.addon-name {
    font-weight: 600;
    color: var(--dark-color);
}

.addon-price {
    font-size: 13px;
    color: var(--primary-dark);
    font-weight: 600;
}

/* ========== Booking Summary ========== */
.summary-grid {
    display: grid;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: var(--light-color);
    border-radius: 5px;
}

.summary-label {
    font-weight: 500;
    color: var(--dark-color);
}

.summary-value {
    font-weight: 600;
    color: var(--primary-color);
}

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

.summary-total .summary-label,
.summary-total .summary-value {
    color: white;
    font-size: 18px;
}

/* ========== Invoice Styles ========== */
.invoice-page {
    background: #f5f6fa;
    padding: 20px;
}

.invoice-container {
    max-width: 900px;
    margin: 0 auto;
}

.invoice-content {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.company-info h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 10px;
}

.company-info p {
    margin: 5px 0;
    color: var(--text-muted);
}

.invoice-title {
    text-align: right;
}

.invoice-title h2 {
    font-size: 32px;
    color: var(--dark-color);
    margin-bottom: 10px;
}

.invoice-section {
    margin-bottom: 30px;
}

.invoice-section h3 {
    font-size: 18px;
    color: var(--dark-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 5px;
}

.info-table,
.invoice-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 8px;
    border-bottom: 1px solid var(--border-color);
}

.info-table td:first-child {
    width: 150px;
}

.invoice-table th,
.invoice-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.invoice-table thead {
    background: var(--light-color);
}

.invoice-table tfoot {
    background: var(--light-color);
    font-weight: bold;
}

.text-right {
    text-align: right;
}

.terms-list {
    list-style: disc;
    margin-left: 20px;
}

.terms-list li {
    margin-bottom: 8px;
    color: var(--text-muted);
}

.thank-you {
    margin-top: 30px;
    text-align: center;
    padding: 20px;
    background: var(--light-color);
    border-radius: 8px;
}

.signature-section {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
}

.signature-box {
    text-align: center;
}

.signature-box p:first-child {
    margin-bottom: 5px;
}

.invoice-actions {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    body.invoice-page {
        background: #ffffff !important;
    }

    .invoice-container {
        max-width: none;
        width: 100%;
        margin: 0;
    }

    .invoice-content {
        padding: 10mm;
        box-shadow: none;
        border-radius: 0;
    }

    .invoice-actions {
        display: none !important;
    }
}

/* ========== Utility Classes ========== */
.text-muted {
    color: var(--text-muted);
}

.text-center {
    text-align: center;
}

.loading-message {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
}

.info-text {
    color: var(--text-muted);
    margin-bottom: 15px;
}

/* ========== Mobile Menu Toggle (Hamburger Icon) ========== */
.mobile-menu-toggle {
    display: none;
    background: var(--primary-color);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 8px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.mobile-menu-toggle:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transform: scale(1.05);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active {
    background: var(--danger-color);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1001;
    opacity: 0;
    transition: opacity 0.3s ease;
    cursor: pointer;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* Desktop: Sidebar always visible */
@media (min-width: 769px) {
    .sticky-header .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-overlay {
        display: none !important;
    }
    
    .sidebar {
        transform: translateX(0) !important;
    }
    
    .sidebar-close {
        display: none !important;
    }
    
    .main-content {
        margin-left: var(--sidebar-width) !important;
    }
}

/* ========== Responsive Design ========== */
/* Tablet Styles (768px and below) */
@media (max-width: 768px) {
    .sticky-header .mobile-menu-toggle {
        display: flex;
    }

    .sidebar-close {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }

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

    .main-content {
        margin-left: 0 !important;
    }

    .sticky-header {
        padding: 15px 20px;
    }

    .header-content h1 {
        font-size: 24px;
    }

    .header-content p {
        font-size: 14px;
    }

    .content-wrapper {
        padding: 20px 15px;
    }

    .content-header {
        margin-bottom: 20px;
    }

    .content-header h1 {
        font-size: 24px;
    }

    .content-header p {
        font-size: 14px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-icon {
        font-size: 32px;
    }

    .stat-details h3 {
        font-size: 24px;
    }

    .stat-details p {
        font-size: 13px;
    }

    .section-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }

    .card-header h2 {
        font-size: 18px;
    }

    .card-body {
        padding: 15px;
    }

    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
        font-size: 13px;
    }

    .table th,
    .table td {
        padding: 10px 8px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 12px;
    }

    .upcoming-booking-item {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px;
    }

    .upcoming-booking-info {
        width: 100%;
        margin-bottom: 15px;
    }

    .upcoming-booking-actions {
        width: 100%;
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .upcoming-booking-date {
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--border-color);
    }

    .upcoming-booking-actions > div {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        width: 100%;
    }

    .upcoming-booking-actions .btn {
        flex: 1;
        min-width: 120px;
    }

    .booked-item {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .booked-info,
    .booked-return {
        width: 100%;
        text-align: left;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .invoice-header {
        flex-direction: column;
        gap: 20px;
    }

    .invoice-title {
        text-align: left;
    }

    .signature-section {
        flex-direction: column;
        gap: 30px;
    }

    .tuktuk-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .tuktuk-item {
        padding: 12px;
        font-size: 13px;
    }
}

/* Mobile Styles (576px and below) */
@media (max-width: 576px) {
    .sticky-header .mobile-menu-toggle {
        display: flex;
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle span {
        width: 20px;
        height: 2px;
    }

    .sidebar-close {
        display: flex;
        width: 32px;
        height: 32px;
        font-size: 24px;
    }

    .sidebar {
        width: 280px;
        transform: translateX(-100%);
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }

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

    .main-content {
        margin-left: 0 !important;
    }

    .sticky-header {
        padding: 12px 15px;
    }

    .header-content h1 {
        font-size: 20px;
    }

    .header-content p {
        font-size: 13px;
    }

    .content-wrapper {
        padding: 15px 10px;
    }

    .content-header h1 {
        font-size: 20px;
        padding-left: 45px;
        margin-bottom: 5px;
    }

    .content-header p {
        font-size: 13px;
        padding-left: 45px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 12px;
        flex-direction: row;
        align-items: center;
    }

    .stat-icon {
        font-size: 28px;
        margin-right: 15px;
        margin-bottom: 0;
    }

    .stat-details h3 {
        font-size: 22px;
    }

    .stat-details p {
        font-size: 12px;
    }

    .stat-details small {
        font-size: 11px;
    }

    .card {
        margin-bottom: 15px;
        border-radius: 6px;
    }

    .card-header {
        padding: 12px;
        gap: 10px;
    }

    .card-header h2 {
        font-size: 16px;
    }

    .card-body {
        padding: 12px;
    }

    .table {
        min-width: 700px;
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px 6px;
    }

    .table th {
        font-size: 11px;
        white-space: nowrap;
    }

    .btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .btn-sm {
        padding: 5px 8px;
        font-size: 11px;
    }

    .upcoming-booking-item {
        padding: 12px;
    }

    .upcoming-booking-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .upcoming-booking-header strong {
        font-size: 14px;
    }

    .upcoming-booking-info p {
        font-size: 12px;
        margin: 4px 0;
    }

    .upcoming-booking-date .days-count {
        font-size: 18px;
    }

    .upcoming-booking-actions .btn {
        font-size: 11px;
        padding: 6px 10px;
        min-width: 100px;
    }

    .reminder-form {
        width: 100%;
    }

    .reminder-form .btn {
        width: 100%;
        margin-left: 0;
        margin-top: 5px;
    }

    .booked-list {
        gap: 10px;
    }

    .booked-item {
        padding: 12px;
    }

    .tuktuk-list {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .tuktuk-item {
        padding: 10px;
        font-size: 12px;
    }

    .alert {
        padding: 12px 15px;
        font-size: 13px;
    }

    .alert h3 {
        font-size: 16px;
        margin-bottom: 8px;
    }

    .alert p {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .tuktuk-groups {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .invoice-header {
        flex-direction: column;
        gap: 20px;
    }

    .invoice-title {
        text-align: left;
    }

    .signature-section {
        flex-direction: column;
        gap: 30px;
    }
}

/* Extra Small Mobile (400px and below) */
@media (max-width: 400px) {
    .main-content {
        padding: 10px 8px;
        padding-top: 60px;
    }

    .content-header h1 {
        font-size: 18px;
        padding-left: 40px;
    }

    .content-header p {
        font-size: 12px;
        padding-left: 40px;
    }

    .stat-card {
        padding: 10px;
    }

    .stat-icon {
        font-size: 24px;
        margin-right: 12px;
    }

    .stat-details h3 {
        font-size: 20px;
    }

    .card-header h2 {
        font-size: 14px;
    }

    .table {
        min-width: 800px;
        font-size: 11px;
    }

    .btn-sm {
        padding: 4px 6px;
        font-size: 10px;
    }

    .upcoming-booking-actions .btn {
        font-size: 10px;
        padding: 5px 8px;
        min-width: 90px;
    }
}

/* ========== Security Code Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.modal-overlay.active {
    display: flex !important;
}

.modal-content {
    background: white;
    border-radius: 12px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: var(--dark-color);
    font-size: 20px;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-body p {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.modal-body input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
    text-align: center;
    letter-spacing: 4px;
    font-weight: bold;
}

.modal-body input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-error {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 10px;
    display: none;
}

.modal-error.show {
    display: block;
}

/* Pricing page – tier rows */
.pricing-form .pricing-tiers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.pricing-tier-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.pricing-tier-row label {
    font-weight: 500;
    margin: 0;
}
.pricing-tier-input {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pricing-tier-input .form-control {
    width: 100px;
}
.pricing-tier-input .per-day {
    color: var(--text-muted, #6c757d);
}

/* Pricing page – professional layout */
.pricing-intro {
    margin-bottom: 1.5rem;
}
.pricing-intro-text {
    margin: 0;
    color: var(--text-muted, #5a6c7d);
    line-height: 1.6;
}
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 900px) {
    .pricing-grid {
        grid-template-columns: 1fr;
    }
}
.pricing-card {
    display: flex;
    flex-direction: column;
}
.pricing-card-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
}
.pricing-card-header .pricing-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}
.pricing-card-header h2 {
    margin: 0;
    font-size: 1.25rem;
}
.pricing-card-subtitle {
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
    font-weight: normal;
}
.pricing-form-actions {
    margin-top: 1rem;
}
.pricing-form-actions .btn-lg {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
}

/* Read-only pricing (Add/Edit TukTuk, Vehicle details) */
.card-subtle {
    background: var(--card-bg-subtle, #f8f9fa);
    border: 1px solid var(--border-light, #e9ecef);
}
.card-subtle .card-header h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.1rem;
}
.card-desc {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted, #6c757d);
}
.pricing-readonly-box {
    margin-top: 1.25rem;
}
.pricing-readonly-type {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light, #e9ecef);
    opacity: 0.6;
    transition: opacity 0.2s;
}
.pricing-readonly-type:last-child {
    border-bottom: none;
}
.pricing-readonly-type.active {
    opacity: 1;
    background: var(--highlight-bg, rgba(13, 110, 253, 0.06));
    margin: 0 -1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border-bottom: none;
}
.pricing-readonly-type .tier-badge {
    display: inline-block;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted, #5a6c7d);
}
.pricing-readonly-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pricing-readonly-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-light, #e9ecef);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.pricing-readonly-list li:last-child {
    border-bottom: none;
}
.view-tuktuks .pricing-cell {
    font-size: 0.875rem;
}
.pricing-summary {
    color: var(--text-muted, #5a6c7d);
}
