/* =========================================
   ODISHA ROAD LINES
   RED & WHITE THEME
========================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f7f7f7;
    color: #222;
    min-height: 100vh;
    animation: pageFadeIn 0.5s ease;
}


/* =========================================
   COLORS
========================================= */

:root {
    --red: #d90429;
    --red-dark: #a8001d;
    --red-light: #ffe6ea;

    --white: #ffffff;
    --light: #f7f7f7;
    --border: #e5e5e5;

    --text: #222222;
    --muted: #777777;

    --success-bg: #e8f7ed;
    --success-text: #18753c;

    --warning-bg: #fff4d6;
    --warning-text: #8a6400;

    --danger-bg: #fde4e7;
    --danger-text: #a11226;
}


/* =========================================
   ANIMATIONS
========================================= */

@keyframes pageFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes navbarSlideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

@keyframes sectionRise {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes alertSlide {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes warningPop {
    from {
        opacity: 0;
        transform: scale(0.92);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* =========================================
   TOP NAVIGATION
========================================= */

.sidebar {
    width: 100%;
    height: 76px;

    position: sticky;
    top: 0;
    left: 0;

    background: var(--white);

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 0 38px;

    border-bottom: 3px solid var(--red);

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);

    z-index: 1000;

    animation: navbarSlideDown 0.45s ease;
}


/* =========================================
   LOGO
========================================= */

.logo {
    padding: 0;
    border: none;

    min-width: 190px;
}

.logo h2 {
    color: var(--red);
    font-size: 25px;
    letter-spacing: 2px;
    line-height: 1;
}

.logo p {
    color: var(--text);
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 4px;
    margin-top: 5px;
}


/* =========================================
   MENU
========================================= */

.menu {
    list-style: none;

    display: flex;
    align-items: center;

    gap: 8px;
}

.menu li {
    margin: 0;
}

.menu li a {
    display: block;

    padding: 12px 17px;

    color: #444;

    text-decoration: none;

    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;

    position: relative;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.menu li a:hover {
    background: var(--red-light);
    color: var(--red);
    transform: translateY(-2px);
}

.menu li a::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 3px;

    width: 0;
    height: 2px;

    background: var(--red);

    transform: translateX(-50%);

    transition: width 0.25s ease;
}

.menu li a:hover::after {
    width: 55%;
}

.menu li.active a {
    background: var(--red);
    color: var(--white);

    box-shadow: 0 5px 15px rgba(217, 4, 41, 0.22);
}

.menu li.active a::after {
    width: 0;
}


/* =========================================
   MAIN CONTENT
========================================= */

.main {
    max-width: 1600px;

    margin: 0 auto;

    padding: 32px;

    min-height: calc(100vh - 76px);
}


/* =========================================
   TOP BAR
========================================= */

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 28px;

    animation: sectionRise 0.5s ease;
}

.topbar h1 {
    color: var(--red);
    font-size: 31px;
}

.topbar p {
    color: var(--muted);
    font-size: 14px;
    margin-top: 6px;
}

.date {
    background: var(--white);

    color: var(--red);

    padding: 12px 18px;

    border-radius: 9px;

    border: 1px solid var(--border);

    font-size: 14px;
    font-weight: bold;

    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.date:hover {
    transform: translateY(-2px);

    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.10);
}


/* =========================================
   DASHBOARD CARDS
========================================= */

.cards {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 20px;

    margin-bottom: 30px;
}

.card {
    position: relative;

    background: var(--white);

    border-radius: 12px;

    padding: 24px;

    border-top: 4px solid var(--red);

    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);

    overflow: hidden;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;

    animation: sectionRise 0.5s ease;
}

.card::before {
    content: "";

    position: absolute;

    top: 0;
    left: -100%;

    width: 100%;
    height: 100%;

    background: linear-gradient(110deg,
            transparent,
            rgba(217, 4, 41, 0.06),
            transparent);

    transition: left 0.55s ease;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-6px);

    box-shadow: 0 12px 30px rgba(217, 4, 41, 0.10);
}

.card h3 {
    color: var(--muted);

    font-size: 14px;

    font-weight: 600;

    margin-bottom: 12px;
}

.card h2 {
    color: var(--red);

    font-size: 31px;

    margin-bottom: 8px;
}

.card p {
    color: #999;

    font-size: 12px;
}


/* =========================================
   SECTIONS
========================================= */

.section {
    background: var(--white);

    border-radius: 12px;

    padding: 24px;

    margin-bottom: 25px;

    border: 1px solid var(--border);

    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);

    animation: sectionRise 0.5s ease;

    transition:
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.section:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
}

.section-header {
    border-bottom: 2px solid var(--red-light);

    padding-bottom: 14px;

    margin-bottom: 20px;
}

.section-header h2 {
    color: var(--red);

    font-size: 19px;
}


/* =========================================
   QUICK ACTION BUTTONS
========================================= */

.quick-actions {
    display: flex;
    flex-wrap: wrap;

    gap: 14px;
}

.action-btn {
    display: inline-block;

    background: var(--red);

    color: var(--white);

    padding: 13px 20px;

    border-radius: 8px;

    text-decoration: none;

    font-size: 14px;
    font-weight: bold;

    transition:
        background 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.action-btn:hover {
    background: var(--red-dark);

    transform: translateY(-3px);

    box-shadow: 0 7px 18px rgba(217, 4, 41, 0.24);
}


/* =========================================
   FORMS
========================================= */

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;

    margin-bottom: 7px;

    font-size: 14px;
    font-weight: bold;

    color: #444;
}

.form-control {
    width: 100%;
    height: 44px;

    padding: 9px 12px;

    background: var(--white);

    border: 1px solid #d7d7d7;

    border-radius: 8px;

    outline: none;

    font-size: 14px;

    transition:
        border 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.form-control:hover {
    border-color: #bbbbbb;
}

.form-control:focus {
    border-color: var(--red);

    box-shadow: 0 0 0 3px rgba(217, 4, 41, 0.10);

    transform: translateY(-1px);
}

textarea.form-control {
    height: 105px;

    resize: vertical;
}


/* =========================================
   FORM GRID
========================================= */

.form-row {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 20px;
}


/* =========================================
   BUTTONS
========================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    border: none;

    min-height: 42px;

    padding: 11px 20px;

    border-radius: 8px;

    cursor: pointer;

    font-size: 14px;
    font-weight: bold;

    text-decoration: none;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--red);

    color: var(--white);
}

.btn-primary:hover {
    background: var(--red-dark);

    box-shadow: 0 6px 16px rgba(217, 4, 41, 0.23);
}

.btn-dark {
    background: #333;

    color: var(--white);
}

.btn-dark:hover {
    background: #111;

    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.20);
}


/* =========================================
   SEARCH SECTION
========================================= */

.trip-search-form {
    width: 100%;

    margin-bottom: 20px;
}

.trip-search-box {
    width: 100%;

    display: grid;

    grid-template-columns: minmax(300px, 1fr) auto auto;

    align-items: center;

    gap: 12px;

    background: #fff7f8;

    border: 1px solid #ffd4da;

    border-radius: 10px;

    padding: 14px;
}

.trip-search-box .form-control {
    max-width: none;

    width: 100%;

    background: var(--white);
}

.trip-search-box .btn {
    min-width: 100px;

    white-space: nowrap;
}


/* optional search result text */

.search-result-info {
    margin-bottom: 18px;

    padding: 11px 14px;

    border-left: 4px solid var(--red);

    background: #fff7f8;

    border-radius: 6px;

    color: #555;

    font-size: 14px;
}

.search-result-info strong {
    color: var(--red);
}


/* =========================================
   TABLE
========================================= */

.table-container {
    width: 100%;

    overflow-x: auto;

    border-radius: 10px;

    border: 1px solid var(--border);
}

table {
    width: 100%;

    border-collapse: collapse;

    background: var(--white);
}

table th,
table td {
    padding: 13px 12px;

    text-align: left;

    border-bottom: 1px solid #eeeeee;

    font-size: 13px;
}

table th {
    background: var(--red);

    color: var(--white);

    font-weight: 600;

    position: sticky;

    top: 0;

    z-index: 5;
}

table tbody tr {
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

table tbody tr:nth-child(even) {
    background: #fffafa;
}

table tbody tr:hover {
    background: #ffecef;
}


/* =========================================
   STATUS
========================================= */

.status {
    display: inline-block;

    padding: 6px 10px;

    border-radius: 20px;

    font-size: 11px;

    font-weight: bold;

    transition: transform 0.2s ease;
}

.status:hover {
    transform: scale(1.05);
}

.status-pending {
    background: var(--warning-bg);

    color: var(--warning-text);
}

.status-success {
    background: var(--success-bg);

    color: var(--success-text);
}

.status-danger {
    background: var(--danger-bg);

    color: var(--danger-text);
}


/* =========================================
   EMPTY DATA
========================================= */

.empty-data {
    text-align: center;

    padding: 40px 20px;

    background: #fffafa;

    border: 1px dashed #e4bfc5;

    border-radius: 10px;
}

.empty-data h3 {
    color: var(--red);

    font-size: 17px;

    margin-bottom: 7px;
}

.empty-data p {
    color: var(--muted);

    font-size: 13px;
}


/* =========================================
   ALERT MESSAGE
========================================= */

.alert-message {
    animation: alertSlide 0.4s ease;
}


/* =========================================
   DESKTOP MODE BLOCKER
========================================= */

#desktopModeBlocker {
    position: fixed;

    inset: 0;

    width: 100%;
    height: 100%;

    background: var(--red);

    z-index: 999999;

    display: flex;

    justify-content: center;
    align-items: center;

    padding: 20px;
}

.desktop-warning-box {
    width: 100%;
    max-width: 480px;

    background: var(--white);

    padding: 32px 26px;

    border-radius: 14px;

    text-align: center;

    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.28);

    animation: warningPop 0.4s ease;
}

.desktop-warning-box h2 {
    color: var(--red);

    font-size: 26px;

    margin-bottom: 14px;
}

.desktop-warning-box p {
    color: #555;

    font-size: 14px;

    line-height: 1.6;

    margin-bottom: 12px;
}

.desktop-help {
    background: #fff6f7;

    border: 1px solid #ffd5db;

    border-radius: 8px;

    padding: 16px;

    margin: 20px 0;

    color: #444;

    text-align: left;

    font-size: 14px;

    line-height: 1.7;
}

.desktop-warning-box button {
    border: none;

    background: var(--red);

    color: var(--white);

    padding: 12px 22px;

    border-radius: 8px;

    font-size: 14px;
    font-weight: bold;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        background 0.2s ease;
}

.desktop-warning-box button:hover {
    background: var(--red-dark);

    transform: translateY(-2px);
}


/* =========================================
   TABLET
========================================= */

@media (max-width: 1150px) {

    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .sidebar {
        padding: 0 20px;
    }

    .menu li a {
        padding: 11px 12px;

        font-size: 13px;
    }

}


/* =========================================
   MOBILE - DESKTOP MODE REQUIRED
========================================= */

@media (max-width: 999px) {

    body {
        min-width: 1000px;

        overflow-x: auto;
    }

    .sidebar {
        min-width: 1000px;
    }

    .main {
        min-width: 1000px;
    }

    .cards {
        grid-template-columns: repeat(4, 1fr);
    }

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .trip-search-box {
        grid-template-columns: minmax(300px, 1fr) auto auto;
    }

}