:root {
    --brand:#6c4cff;
    --brand-dark:#5536ee;
    --ink:#172033;
    --muted:#758096;
    --line:#e8ebf2;
    --bg:#f6f7fb;
    --card:#fff;
    --shadow:0 14px 40px rgba(30,10,58,.08)
}
* {
    box-sizing:border-box
}
body {
    margin:0;
    background:var(--bg);
    color:var(--ink);
    font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
    font-size:14px
}
.app-shell {
    min-height:100vh
}
.sidebar {
    position:fixed;
    inset:0 auto 0 0;
    width:252px;
    background:#111827;
    padding:24px 18px;
    color:#fff;
    z-index:1030
}
.brand {
    display:flex;
    align-items:center;
    gap:12px;
    color:inherit
}
.brand-mark {
    width:40px;
    height:40px;
    border-radius:13px;
    display:grid;
    place-items:center;
    background:linear-gradient(145deg,#7c5cff,#5b3df5);
    color:#fff;
    box-shadow:0 8px 20px rgba(108,76,255,.32)
}
.brand strong {
    font-size:17px;
    letter-spacing:-.3px
}
.brand small {
    display:block;
    font-size:11px;
    color:#8d98ae;
    margin-top:1px
}
.sidebar .nav-link {
    display:flex;
    align-items:center;
    gap:12px;
    color:#9ba5b8;
    border-radius:12px;
    padding:11px 13px;
    font-weight:600
}
.sidebar .nav-link i {
    font-size:17px
}
.sidebar .nav-link:hover,.sidebar .nav-link.active {
    background:rgba(255,255,255,.08);
    color:#fff
}
.sidebar .nav-link.active {
    box-shadow:inset 3px 0 0 #8c72ff
}
.sidebar-user {
    display:flex;
    align-items:center;
    gap:10px;
    border-top:1px solid rgba(255,255,255,.08);
    padding-top:18px
}
.sidebar-user small {
    color:#8d98ae
}
.avatar {
    width:40px;
    height:40px;
    border-radius:12px;
    background:#eeeaff;
    color:var(--brand);
    display:grid;
    place-items:center;
    font-weight:800;
    flex:0 0 auto
}
.avatar.sm {
    width:34px;
    height:34px;
    border-radius:10px;
    font-size:12px
}
.icon-btn {
    border:0;
    background:#f2f4f8;
    color:#667085;
    width:36px;
    height:36px;
    border-radius:10px;
    display:inline-grid;
    place-items:center;
    transition:.2s
}
.icon-btn:hover {
    background:#e9ecf3;
    color:var(--ink)
}
.sidebar .icon-btn {
    background:rgba(255,255,255,.08);
    color:#c8d0de
}
.icon-btn.danger:hover {
    background:#fff0f0;
    color:#dc3545
}
.main-panel {
    min-height:100vh;
    margin-left:252px
}
.content-wrap {
    padding:32px;
    max-width:1540px;
    margin:0 auto
}
.page-head {
    display:flex;
    align-items:flex-end;
    justify-content:space-between;
    gap:18px;
    margin-bottom:24px
}
.page-head h1 {
    font-size:28px;
    letter-spacing:-.7px;
    margin:4px 0 5px;
    font-weight:800
}
.page-head p,.panel-head p {
    margin:0;
    color:var(--muted)
}
.eyebrow {
    font-size:11px;
    letter-spacing:1.4px;
    font-weight:800;
    color:var(--brand)
}
.btn {
    border-radius:11px;
    font-weight:700;
    padding:.66rem 1rem;
    font-size:14px
}
.btn-primary {
    background:var(--brand);
    border-color:var(--brand);
    box-shadow:0 8px 20px rgba(108,76,255,.18)
}
.btn-primary:hover {
    background:var(--brand-dark);
    border-color:var(--brand-dark)
}
.btn-light {
    background:#fff;
    border:1px solid var(--line)
}
.panel-card,.stat-card {
    background:var(--card);
    border:1px solid #edf0f5;
    border-radius:18px;
    box-shadow:var(--shadow)
}
.stat-card {
    padding:18px;
    display:flex;
    align-items:center;
    gap:13px;
    height:100%
}
.stat-card span {
    display:block;
    color:var(--muted);
    font-size:12px;
    margin-bottom:2px
}
.stat-card strong {
    font-size:24px;
    line-height:1
}
.stat-icon {
    width:44px;
    height:44px;
    border-radius:13px;
    display:grid;
    place-items:center;
    font-size:18px
}
.stat-icon.blue {
    background:#eef5ff;
    color:#3478f6
}
.stat-icon.violet {
    background:#f1edff;
    color:#7654ff
}
.stat-icon.amber {
    background:#fff5df;
    color:#d88a00
}
.stat-icon.green {
    background:#eafaf1;
    color:#13945d
}
.stat-icon.cyan {
    background:#e8f8fb;
    color:#1687a1
}
.panel-head {
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:20px 22px;
    border-bottom:1px solid var(--line)
}
.panel-head h2 {
    font-size:17px;
    margin:0 0 3px;
    font-weight:800
}
.table>:not(caption)>*>* {
    padding:14px 16px;
    border-bottom-color:#eef1f5
}
.table thead th {
    background:#fafbfc;
    color:#768095;
    font-size:11px;
    text-transform:uppercase;
    letter-spacing:.55px;
    font-weight:800;
    white-space:nowrap
}
.person-cell {
    display:flex;
    align-items:center;
    gap:10px;
    min-width:190px
}
.person-cell strong {
    display:block;
    font-size:13px
}
.person-cell small {
    display:block;
    color:var(--muted);
    font-size:11.5px;
    margin-top:2px
}
.status-badge,.source-pill {
    display:inline-flex;
    align-items:center;
    border-radius:999px;
    padding:5px 9px;
    font-size:11.5px;
    font-weight:800;
    white-space:nowrap
}
.status-new {
    background:#eef5ff;
    color:#2868cf
}
.status-in-progress {
    background:#fff4df;
    color:#b46a00
}
.status-won {
    background:#e9f9f0;
    color:#087a49
}
.status-lost {
    background:#fff0f1;
    color:#c63845
}
.source-pill {
    background:#f2f4f7;
    color:#596273
}
.customer-link {
    color:#118957;
    text-decoration:none;
    font-weight:700;
    font-size:12px
}
.filter-bar {
    display:flex;
    gap:10px;
    padding:16px;
    border-bottom:1px solid var(--line);
    flex-wrap:wrap
}
.filter-bar .form-select {
    width:auto;
    min-width:150px
}
.search-control {
    position:relative;
    min-width:240px
}
.search-control i {
    position:absolute;
    left:13px;
    top:50%;
    transform:translateY(-50%);
    color:#98a1b2;
    z-index:2
}
.search-control .form-control {
    padding-left:37px
}
.form-control,.form-select {
    border:1px solid #dfe3eb;
    border-radius:11px;
    min-height:43px;
    font-size:14px;
    box-shadow:none!important
}
.form-control:focus,.form-select:focus {
    border-color:#ac9cff;
    box-shadow:0 0 0 3px rgba(108,76,255,.08)!important
}
.form-label {
    font-size:12px;
    font-weight:800;
    color:#4a5468;
    margin-bottom:7px
}
.form-label span {
    color:#e5484d
}
.form-text {
    font-size:10.5px
}
.table-footer {
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    padding:14px 16px
}
.pagination-wrap {
    display:flex;
    gap:6px
}
.page-btn {
    min-width:34px;
    height:34px;
    border:1px solid var(--line);
    background:#fff;
    border-radius:9px;
    color:#657086;
    font-weight:700
}
.page-btn.active {
    background:var(--brand);
    color:#fff;
    border-color:var(--brand)
}
.page-btn:disabled {
    opacity:.45
}
.empty-state,.loading-state {
    text-align:center!important;
    color:#8a94a6;
    padding:42px!important
}
.action-group {
    display:flex;
    justify-content:flex-end;
    gap:6px
}
.modal-dialog-scrollable {
    max-height:calc(100vh - 2rem)
}
.premium-modal {
    border:0;
    border-radius:20px;
    box-shadow:0 25px 80px rgba(25,20,55,.22);
    max-height:calc(100vh - 2rem);
    overflow:hidden
}
.premium-modal .modal-header {
    flex:0 0 auto;
    padding:20px 22px;
    border-bottom:1px solid var(--line)
}
.premium-modal .modal-title {
    font-size:19px;
    font-weight:800;
    margin-top:3px
}
.premium-modal form {
    display:flex;
    flex:1 1 auto;
    flex-direction:column;
    min-height:0;
    overflow:hidden
}
.premium-modal .modal-body {
    flex:1 1 auto;
    min-height:0;
    padding:22px;
    overflow-y:auto!important;
    overflow-x:hidden;
    overscroll-behavior:contain
}
.premium-modal .modal-body::-webkit-scrollbar {
    width:6px
}
.premium-modal .modal-body::-webkit-scrollbar-thumb {
    background:rgba(23,32,51,.2);
    border-radius:999px
}
.premium-modal .modal-footer {
    flex:0 0 auto;
    padding:14px 22px;
    border-top:1px solid var(--line);
    background:#fff
}
.mobile-topbar {
    height:64px;
    background:#fff;
    border-bottom:1px solid var(--line);
    padding:0 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    position:sticky;
    top:0;
    z-index:1020
}
.brand.compact {
    color:var(--ink)
}
.brand.compact .brand-mark {
    width:34px;
    height:34px;
    border-radius:10px
}
.mobile-nav {
    position:fixed;
    bottom:0;
    left:0;
    right:0;
    height:66px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(12px);
    border-top:1px solid var(--line);
    display:flex;
    z-index:1020;
    padding-bottom:env(safe-area-inset-bottom)
}
.mobile-nav a {
    flex:1;
    display:flex;
    align-items:center;
    justify-content:center;
    flex-direction:column;
    gap:3px;
    text-decoration:none;
    color:#8a94a6;
    font-size:10px;
    font-weight:700
}
.mobile-nav a i {
    font-size:19px
}
.mobile-nav a.active {
    color:var(--brand)
}
.login-page {
    min-height:100vh;
    background:#fff
}
.login-shell {
    min-height:100vh;
    display:grid;
    grid-template-columns:1.05fr .95fr
}
.login-visual {
    position:relative;
    overflow:hidden;
    background:radial-gradient(circle at 20% 15%,rgba(145,119,255,.65),transparent 35%),radial-gradient(circle at 85% 70%,rgba(45,169,255,.35),transparent 35%),#18122b;
    color:#fff;
    align-items:flex-end;
    padding:8vw
}
.login-visual:after {
    content:"";
    position:absolute;
    inset:12% 10% auto auto;
    width:270px;
    height:380px;
    border:1px solid rgba(255,255,255,.1);
    border-radius:32px;
    transform:rotate(9deg);
    box-shadow:0 0 0 25px rgba(255,255,255,.025),0 0 0 50px rgba(255,255,255,.015)
}
.visual-copy {
    position:relative;
    z-index:1;
    max-width:560px
}
.visual-copy h1 {
    font-size:clamp(38px,4.2vw,64px);
    line-height:1.03;
    letter-spacing:-2px;
    font-weight:850;
    margin:12px 0 20px
}
.visual-copy p {
    font-size:17px;
    color:#c6bfd9;
    max-width:500px
}
.mini-stats {
    display:flex;
    gap:28px;
    margin-top:42px
}
.mini-stats strong,.mini-stats span {
    display:block
}
.mini-stats strong {
    font-size:16px
}
.mini-stats span {
    font-size:11px;
    color:#9e96b5;
    margin-top:3px
}
.login-form-wrap {
    display:grid;
    place-items:center;
    padding:30px
}
.login-card {
    width:min(100%,430px)
}
.login-card h2 {
    font-size:28px;
    font-weight:850;
    letter-spacing:-.6px
}
.input-icon {
    position:relative
}
.input-icon i {
    position:absolute;
    left:14px;
    top:50%;
    transform:translateY(-50%);
    color:#8d96a7
}
.input-icon input {
    padding-left:40px
}
.demo-box {
    background:#f7f7fb;
    border:1px dashed #d9dce6;
    border-radius:13px;
    padding:13px;
    color:#697386;
    font-size:12px
}
.demo-box strong {
    display:block;
    color:#3f4859;
    margin-bottom:6px
}
.demo-box code {
    color:#6646ed
}
.min-w-0 {
    min-width:0
}
@media(max-width:991.98px) {
    .main-panel {
        margin-left:0
    }
    .content-wrap {
        padding:20px 16px 88px
    }
    .page-head {
        align-items:flex-start
    }
    .login-shell {
        grid-template-columns:1fr
    }
    .filter-bar .form-select {
        flex:1 1 140px
    }
    .panel-card {
        border-radius:15px
    }
    .stat-card {
        border-radius:15px
    }
}
@media(max-width:575.98px) {
    body {
        font-size:13px
    }
    .page-head {
        margin-bottom:18px
    }
    .page-head h1 {
        font-size:22px
    }
    .page-head p {
        font-size:12px
    }
    .page-head .btn {
        white-space:nowrap
    }
    .content-wrap {
        padding:16px 12px 84px
    }
    .filter-bar {
        padding:12px;
        gap:8px
    }
    .search-control {
        flex-basis:100%;
        min-width:100%
    }
    .filter-bar .form-select {
        min-width:calc(50% - 4px);
        font-size:12px
    }
    .table-footer {
        align-items:flex-start;
        flex-direction:column
    }
    .data-table {
        min-width:920px
    }
    .panel-card {
        box-shadow:0 10px 30px rgba(30,10,58,.07)
    }
    .stat-card {
        padding:14px;
        gap:9px
    }
    .stat-icon {
        width:38px;
        height:38px;
        border-radius:11px
    }
    .stat-card strong {
        font-size:19px
    }
    .stat-card span {
        font-size:10px
    }
    .login-form-wrap {
        padding:24px 18px
    }
    .login-card h2 {
        font-size:24px
    }
    .modal-dialog {
        margin:0;
        min-height:100%;
        max-height:100dvh;
        align-items:flex-end
    }
    .modal-dialog-scrollable {
        height:100dvh;
        max-height:100dvh
    }
    .premium-modal {
        width:100%;
        max-height:94dvh;
        border-radius:22px 22px 0 0
    }
    .premium-modal .modal-body {
        padding:18px;
        padding-bottom:24px
    }
    .premium-modal .modal-header {
        padding:18px
    }
    .premium-modal .modal-footer {
        position:relative;
        z-index:2;
        padding:12px 18px calc(12px + env(safe-area-inset-bottom));
        background:#fff
    }
    .page-head {
        gap:10px
    }
    .page-head .btn {
        font-size:12px;
        padding:.6rem .75rem
    }
}
/* Machine-test login branding */ .company-logo-wrap {
    display: flex;
    align-items: center;
    min-height: 64px;
}
.company-logo {
    display: block;
    width: min(100%, 320px);
    height: auto;
    object-fit: contain;
}
.candidate-card {
    margin-top: 34px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(10px);
}
.candidate-card .candidate-label {
    display: block;
    margin-bottom: 5px;
    color: #9e8cff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.4px;
}
.candidate-card strong {
    display: block;
    font-size: 19px;
}
.candidate-card small {
    display: block;
    margin-top: 3px;
    color: #c7c1d8;
    font-size: 12px;
}
.machine-test-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}
.machine-test-points > div {
    min-height: 84px;
    padding: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .035);
}
.machine-test-points i {
    display: block;
    margin-bottom: 8px;
    color: #a999ff;
    font-size: 18px;
}
.machine-test-points span {
    color: #d2cce0;
    font-size: 11px;
    line-height: 1.45;
}
.invalid-feedback {
    margin-top: 5px;
    font-size: 11px;
    font-weight: 600;
}
.form-control.is-invalid, .form-select.is-invalid {
    border-color: #dc3545;
}
@media (max-width: 1199.98px) {
    .machine-test-points {
        grid-template-columns: 1fr;
    }
    .machine-test-points > div {
        min-height: auto;
    }
}


/* =========================================================
   LOGIN PAGE - DESKTOP NO PAGE SCROLL
========================================================= */

@media (min-width: 992px) {

    html,
    body.login-page {
        width: 100%;
        height: 100%;
        overflow: hidden !important;
    }

    .login-page {
        min-height: 100vh !important;
        height: 100vh !important;
    }

    .login-shell {
        width: 100%;
        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }

    .login-visual,
    .login-form-wrap {
        height: 100vh !important;
        min-height: 0 !important;
        max-height: 100vh !important;
        overflow: hidden !important;
    }


    /* LEFT SIDE */
    .login-visual {
        display: flex !important;
        align-items: center !important;
        padding: 38px clamp(55px, 8vw, 128px) !important;
    }

    .visual-copy {
        width: 100%;
        max-width: 560px;
    }

    .visual-copy h1 {
        font-size: clamp(34px, 3.25vw, 50px) !important;
        line-height: 1.05 !important;
        letter-spacing: -1.3px !important;
        margin: 12px 0 16px !important;
    }

    .visual-copy > p {
        margin-bottom: 0 !important;
        font-size: 16px;
        line-height: 1.55;
    }


    /* AJAY PATIL BLOCK */
    .candidate-card {
        margin-top: 28px !important;
        padding: 15px 20px !important;
    }

    .candidate-name {
        font-size: 22px !important;
    }


    /* FEATURE CARDS */
    .machine-test-points {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
        margin-top: 16px !important;
    }

    .machine-test-points > div {
        min-height: 96px !important;
        padding: 13px 14px !important;
    }

    .machine-test-points i {
        margin-bottom: 6px !important;
        font-size: 17px !important;
    }

    .machine-test-points strong {
        margin-bottom: 3px !important;
    }


    /* RIGHT LOGIN AREA */
    .login-form-wrap {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 28px 50px !important;
    }

    .login-card {
        width: min(100%, 430px) !important;
        max-height: calc(100vh - 56px);
    }

    .company-logo-wrap {
        min-height: auto !important;
        margin-bottom: 26px !important;
    }

    .company-logo {
        max-height: 78px;
        width: 100%;
        object-fit: contain;
    }

    .login-card h2 {
        margin-bottom: 6px;
    }

    .login-card .demo-box {
        margin-top: 20px !important;
    }
}


/* =========================================================
   MOBILE / TABLET
   Allow natural scroll because screen height can be small
========================================================= */

@media (max-width: 991.98px) {

    html,
    body.login-page {
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-shell {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    .login-form-wrap {
        min-height: 100vh;
    }
}