
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --ink: #182536;
    --ink-soft: #344256;
    --muted: #8490a0;
    --blue: #2367d1;
    --blue-dark: #174fae;
    --blue-light: #edf4ff;
    --green: #16845e;
    --red: #c34e4e;
    --amber: #a66b13;
    --line: #e9edf2;
    --surface: #ffffff;
    --background: #f7f9fc;
    --radius: 12px;
    --shadow: 0 3px 12px rgba(27, 45, 70, .035);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--background);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

button, input, select {
    font: inherit;
}

button {
    cursor: pointer;
}

.hidden {
    display: none !important;
}

.muted {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.eyebrow {
    color: var(--blue);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.8px;
    margin-bottom: 7px;
}

/* =====================================
   LOGIN SCREEN
===================================== */

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: #fff;
}

.brand-panel {
    background: #f5f7fa;
    padding: 55px 8%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 450px;
    height: 450px;
    border: 1px solid rgba(35, 103, 209, .07);
    border-radius: 50%;
    right: -230px;
    bottom: -200px;
    box-shadow:
        0 0 0 45px rgba(35, 103, 209, .025),
        0 0 0 90px rgba(35, 103, 209, .018);
    pointer-events: none;
}

.brand-content {
    margin: auto 0;
    max-width: 470px;
    position: relative;
    z-index: 1;
}

.ksrtc-brand {
    display: flex;
    align-items: center;
    gap: 17px;
    margin-bottom: 34px;
}

.ksrtc-brand img {
    width: 105px;
    height: 105px;
    object-fit: contain;
}

.ksrtc-brand span {
    color: #c52b2b;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
}

.brand-line {
    width: 40px;
    height: 3px;
    background: #c52b2b;
    margin-bottom: 26px;
    border-radius: 5px;
}

.brand-content h1 {
    font-family: 'Manrope', sans-serif;
    font-size: clamp(43px, 5vw, 66px);
    font-weight: 800;
    letter-spacing: -3.5px;
    margin-bottom: 16px;
}

.brand-description {
    max-width: 390px;
    color: #758194;
    font-size: 14px;
    line-height: 1.9;
}

.brand-panel footer {
    color: #929baa;
    font-size: 10px;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.brand-panel footer strong {
    color: #35445a;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
}

.login-box {
    width: 100%;
    max-width: 390px;
}

.login-box h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    letter-spacing: -.9px;
}

.login-box > .muted {
    margin: 8px 0 32px;
}

/* Forms */

label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #475569;
    margin: 20px 0 8px;
}

input, select {
    width: 100%;
    min-height: 45px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff;
    color: var(--ink);
    font-size: 13px;
    outline: none;
    transition: border .2s, box-shadow .2s;
}

input::placeholder {
    color: #aab3bf;
}

input:focus, select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(35, 103, 209, .09);
}

.primary-button {
    width: 100%;
    min-height: 46px;
    padding: 13px 16px;
    border: 0;
    border-radius: 8px;
    background: var(--blue);
    color: white;
    font-size: 12px;
    font-weight: 700;
    margin-top: 23px;
    transition: background .2s, transform .2s, box-shadow .2s;
}

.primary-button:hover {
    background: var(--blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(35, 103, 209, .2);
}

.primary-button span {
    float: right;
}

.error-message {
    color: var(--red);
    font-size: 12px;
    margin-top: 10px;
    min-height: 15px;
}

.demo-credentials {
    background: #f7f9fc;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 15px;
    margin-top: 28px;
    font-size: 11px;
    line-height: 2;
    color: #657187;
}

.demo-credentials strong {
    color: #43516a;
    font-size: 10px;
    letter-spacing: 1px;
}

code {
    color: var(--blue);
    background: #eaf1fc;
    padding: 3px 6px;
    border-radius: 4px;
}

/* =====================================
   DASHBOARD STRUCTURE
===================================== */

.dashboard {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 255px;
    background: #fff;
    border-right: 1px solid var(--line);
    padding: 25px 16px;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 3px 10px 25px;
    border-bottom: 1px solid var(--line);
}

.dashboard-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-brand h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.5px;
}

.sidebar-brand small {
    display: block;
    color: #9aa4b2;
    font-size: 8px;
    letter-spacing: 1.1px;
    margin-top: 3px;
}

.sidebar-section {
    padding-top: 28px;
}

.sidebar-label {
    font-size: 9px;
    color: #a0aab8;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 0 11px 13px;
}

.nav-button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 0;
    padding: 12px 12px;
    background: transparent;
    color: #778396;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: background .2s, color .2s;
}

.nav-button span:first-child {
    font-size: 17px;
    width: 20px;
    text-align: center;
}

.nav-button:hover {
    color: var(--blue);
    background: #f5f8fd;
}

.nav-button.active {
    color: var(--blue);
    background: #edf4ff;
    font-weight: 700;
}

.nav-count {
    margin-left: auto;
    background: #f0f2f5;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10px;
    color: #66758b;
}

.nav-button.active .nav-count {
    background: #dceaff;
    color: var(--blue);
}

.sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 17px;
}

.user-mini {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px;
}

.avatar {
    width: 36px;
    height: 36px;
    background: #eaf1fc;
    color: var(--blue);
    display: grid;
    place-items: center;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13px;
}

.user-mini strong {
    display: block;
    font-size: 11px;
    color: #334155;
}

.user-mini small {
    color: var(--muted);
    font-size: 10px;
}

.logout-button {
    width: 100%;
    text-align: left;
    border: 0;
    background: none;
    color: #b34c4c;
    font-size: 11px;
    font-weight: 600;
    padding: 14px 8px 5px;
    transition: color .2s;
}

.logout-button:hover {
    color: #8f2828;
}

.main-area {
    margin-left: 255px;
    width: calc(100% - 255px);
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* =====================================
   KSRTC WATERMARK
===================================== */

.main-area::before {
    content: "";
    position: fixed;
    left: calc(255px + (100% - 255px) / 2);
    top: 54%;
    transform: translate(-50%, -50%);
    width: min(430px, 48vw);
    height: min(430px, 48vw);
    background-image: url("assets/ksrtc.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: .045;
    pointer-events: none;
    z-index: 0;
}

/* =====================================
   HEADER
===================================== */

.topbar {
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--line);
    min-height: 82px;
    padding: 16px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-title img {
    width: 46px;
    height: 46px;
    object-fit: contain;
}

.topbar h1 {
    font-family: 'Manrope', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.6px;
}

.topbar .eyebrow {
    margin-bottom: 3px;
    font-size: 9px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #67758a;
    font-size: 11px;
    font-weight: 600;
}

.status-dot {
    width: 7px;
    height: 7px;
    background: #20a16c;
    border-radius: 50%;
    box-shadow: 0 0 0 4px #e8f6ef;
}

/* =====================================
   CONTENT
===================================== */

.content-area {
    max-width: 1550px;
    padding: 32px 35px;
    margin: auto;
    position: relative;
    z-index: 1;
}

.welcome-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.welcome-row h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.date-display {
    color: var(--muted);
    font-size: 11px;
    background: white;
    border: 1px solid var(--line);
    padding: 9px 13px;
    border-radius: 7px;
}

/* =====================================
   STATISTIC CARDS
===================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 21px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(27, 45, 70, .07);
}

.stat-card::after {
    content: "";
    position: absolute;
    width: 65px;
    height: 65px;
    right: -25px;
    top: -25px;
    border-radius: 50%;
    background: #edf4ff;
}

.stat-card:nth-child(2)::after {
    background: #fff4e3;
}

.stat-card:nth-child(3)::after {
    background: #e8f6ee;
}

.stat-card:nth-child(4)::after {
    background: #f0edff;
}

.stat-card p {
    color: #7e8a9c;
    font-size: 11px;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

.stat-card h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 28px;
    font-weight: 800;
    margin: 13px 0 5px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.stat-card small {
    color: #a0aaba;
    font-size: 10px;
}

/* =====================================
   PANELS AND TABLES
===================================== */

.panel {
    background: white;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 20px;
    padding: 21px;
    box-shadow: var(--shadow);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.panel h3 {
    font-family: 'Manrope', sans-serif;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: -.2px;
}

.table-wrap {
    overflow-x: auto;
    border: 1px solid #edf0f4;
    border-radius: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

th {
    text-align: left;
    color: #8b97a8;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .7px;
    padding: 14px 15px;
    background: #f8fafc;
    border-bottom: 1px solid var(--line);
}

td {
    padding: 15px;
    border-bottom: 1px solid #f0f2f5;
    font-size: 11px;
    color: #647187;
    transition: background .15s;
}

tbody tr:hover td {
    background: #fafcff;
}

tr:last-child td {
    border-bottom: 0;
}

td strong {
    color: #334155;
    font-weight: 700;
}

/* Status pills */

.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 20px;
    font-size: 9px;
    font-weight: 800;
}

.status.pending {
    background: #fff5e5;
    color: #a66b13;
}

.status.paid {
    background: #e7f6ed;
    color: #16845e;
}

/* Empty table state */

.empty-state {
    text-align: center;
    padding: 32px;
    color: #9ba6b5;
    font-size: 12px;
}

/* =====================================
   PAGE HEADINGS
===================================== */

.page-intro {
    margin-bottom: 23px;
}

.page-intro h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 23px;
    font-weight: 800;
    letter-spacing: -.7px;
}

.page-intro p {
    margin-top: 6px;
}

/* =====================================
   CHARGING INTERFACE
===================================== */

.charging-layout {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 18px;
    align-items: stretch;
}

.charging-form form {
    margin-top: 12px;
}

.charging-form .primary-button {
    margin-top: 22px;
}

.information-panel {
    background: linear-gradient(145deg, #fff 0%, #f7faff 100%);
}

.route-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 17px 5px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    color: #68768a;
}

.route-step:last-child {
    border-bottom: 0;
}

.route-step:first-letter {
    color: var(--blue);
}

/* Action buttons */

.action-button {
    border: 1px solid #d8e9df;
    background: #eef8f1;
    color: #16845e;
    border-radius: 6px;
    padding: 8px 11px;
    font-size: 10px;
    font-weight: 800;
    transition: .2s;
}

.action-button:hover {
    background: #dff2e6;
    border-color: #b8dfc6;
}

/* =====================================
   RESPONSIVE DESIGN
===================================== */

@media (max-width: 1100px) {
    .content-area {
        padding: 25px 22px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charging-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        min-height: auto;
        padding: 25px;
    }

    .brand-content {
        margin: 0;
    }

    .ksrtc-brand img {
        width: 75px;
        height: 75px;
    }

    .ksrtc-brand span {
        font-size: 24px;
    }

    .brand-content h1 {
        font-size: 40px;
    }

    .brand-description {
        font-size: 12px;
    }

    .brand-panel footer {
        margin-top: 25px;
    }

    .login-panel {
        padding: 35px 22px;
    }

    /* Compact mobile sidebar */

    .sidebar {
        width: 66px;
        padding: 15px 8px;
    }

    .sidebar-brand {
        justify-content: center;
        padding: 0 0 20px;
    }

    .sidebar-brand > div:last-child,
    .sidebar-label,
    .user-mini > div:last-child,
    .logout-button {
        display: none;
    }

    .dashboard-logo {
        width: 38px;
        height: 38px;
    }

    .nav-button {
        justify-content: center;
        padding: 12px 5px;
        font-size: 0;
    }

    .nav-button span:first-child {
        font-size: 18px;
    }

    .nav-count {
        display: none;
    }

    .user-mini {
        justify-content: center;
    }

    .main-area {
        margin-left: 66px;
        width: calc(100% - 66px);
    }

    .topbar {
        padding: 13px 14px;
        min-height: 70px;
    }

    .topbar-title {
        gap: 9px;
    }

    .topbar-title img {
        width: 34px;
        height: 34px;
    }

    .topbar h1 {
        font-size: 15px;
    }

    .topbar .eyebrow {
        font-size: 7px;
    }

    .topbar-right {
        font-size: 9px;
    }

    .main-area::before {
        left: calc(66px + (100% - 66px) / 2);
        width: 260px;
        height: 260px;
        opacity: .035;
    }

    .content-area {
        padding: 20px 12px;
    }

    .stats-grid {
        gap: 9px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card h2 {
        font-size: 21px;
    }

    .welcome-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }

    .welcome-row h2 {
        font-size: 18px;
    }

    .panel {
        padding: 13px;
    }

    .panel-heading {
        align-items: flex-start;
    }

    th, td {
        padding: 12px;
    }
}

@media (max-width: 380px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
