@import url('https://fonts.googleapis.com/css2?family=Alexandria:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #071b35;
    --navy-2: #0c294d;
    --blue: #278eea;
    --cyan: #55d8ef;
    --cream: #f7f8fb;
    --paper: #fff;
    --ink: #12213b;
    --muted: #75839a;
    --line: #e5ebf3;
    --green: #13a56a;
    --orange: #f0923b;
    --red: #d94d67;
    --radius: 18px;
    --shadow: 0 15px 45px #08264412
}

* {
    box-sizing: border-box
}

html,
body,
#root {
    min-height: 100%
}

body {
    margin: 0;
    color: var(--ink);
    background: #f4f7fb;
    font-family: Alexandria, Tahoma, Arial, sans-serif;
    font-size: 14px
}

button,
input,
select,
textarea {
    font: inherit
}

button {
    cursor: pointer
}

button:disabled {
    cursor: not-allowed;
    opacity: .55
}

.ambient {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 999px;
    filter: blur(80px);
    opacity: .2;
    pointer-events: none;
    z-index: -1
}

.ambient-a {
    top: -150px;
    right: -120px;
    background: var(--cyan)
}

.ambient-b {
    bottom: -170px;
    left: -100px;
    background: #9d6cff
}

.auth {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    background: var(--navy)
}

.auth-visual {
    position: relative;
    overflow: hidden;
    padding: 64px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: linear-gradient(145deg, #062a52, #07162f 66%, #0a335e)
}

.auth-visual:before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 70% 25%, #4ee7ee44, transparent 25%), linear-gradient(120deg, transparent 55%, #ffffff08)
}

.brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff
}

.brand-symbol {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #3dd8ee, #2479dc);
    font-size: 28px;
    font-weight: 800;
    box-shadow: 0 12px 30px #29b9d755
}

.brand-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: .2px
}

.brand small {
    display: block;
    font-size: 11px;
    color: #a5d5ea;
    margin-top: 3px
}

.visual-copy {
    position: relative;
    max-width: 620px;
    color: #fff
}

.eyebrow {
    color: var(--cyan);
    font-weight: 700;
    letter-spacing: .8px;
    font-size: 12px
}

.visual-copy h1 {
    font-size: clamp(30px, 4vw, 53px);
    line-height: 1.35;
    margin: 17px 0;
    font-weight: 800
}

.visual-copy p {
    font-size: 16px;
    line-height: 2;
    color: #b5cce0;
    margin: 0;
    max-width: 570px
}

.feature-row {
    position: relative;
    display: flex;
    gap: 11px;
    flex-wrap: wrap
}

.feature-pill {
    border: 1px solid #ffffff27;
    color: #d9f1ff;
    background: #ffffff10;
    padding: 10px 13px;
    border-radius: 999px;
    font-size: 12px
}

.auth-card-wrap {
    background: #f6f8fc;
    display: grid;
    place-items: center;
    padding: 32px
}

.auth-card {
    width: min(420px, 100%);
    background: #fff;
    border: 1px solid #e5ebf2;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 15px 45px #061b3614
}

.auth-card h2 {
    font-size: 24px;
    margin: 0 0 8px
}

.auth-card p {
    color: var(--muted);
    line-height: 1.8;
    margin: 0 0 26px
}

.field {
    display: grid;
    gap: 7px;
    margin: 0 0 16px
}

.field label {
    font-size: 12px;
    color: #40516a;
    font-weight: 700
}

.field input,
.field select,
.field textarea {
    border: 1px solid #dbe4ee;
    border-radius: 11px;
    padding: 12px 13px;
    background: #fff;
    outline: 0;
    color: var(--ink);
    transition: .2s
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px #278eea15
}

.field textarea {
    min-height: 90px;
    resize: vertical
}

.primary,
.secondary,
.ghost,
.danger {
    border: 0;
    border-radius: 11px;
    padding: 11px 15px;
    font-weight: 700;
    transition: .2s
}

.primary {
    background: linear-gradient(135deg, #2388e6, #1d6ed1);
    color: white;
    box-shadow: 0 8px 18px #1c76d93b
}

.primary:hover {
    transform: translateY(-1px);
    filter: brightness(1.04)
}

.secondary {
    background: #e8f4ff;
    color: #1767b3
}

.ghost {
    background: #fff;
    border: 1px solid #d7e2ec;
    color: #263b55
}

.danger {
    background: #fff0f3;
    color: #c13855
}

.full {
    width: 100%
}

.form-help {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.7;
    margin-top: 15px
}

.demo-link {
    display: block;
    background: none;
    border: 0;
    color: #1767b3;
    padding: 8px 0 0;
    text-decoration: underline;
    margin: auto
}

.app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
    background: #f5f8fc
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 22px 15px;
    background: var(--navy);
    color: #d5e8f8
}

.sidebar .brand {
    padding: 4px 8px 26px
}

.sidebar .brand-symbol {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 22px
}

.sidebar .brand-title {
    font-size: 15px
}

.nav {
    display: grid;
    gap: 5px
}

.nav-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: #adc3d8;
    text-align: right;
    padding: 12px 13px;
    font-family: inherit;
    font-weight: 600
}

.nav-button:hover {
    background: #ffffff0d;
    color: #fff
}

.nav-button.active {
    color: #fff;
    background: linear-gradient(90deg, #ffffff15, #1c96e740);
    box-shadow: inset -3px 0 0 var(--cyan)
}

.nav-icon {
    width: 22px;
    text-align: center;
    color: var(--cyan);
    font-size: 16px
}

.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid #ffffff18;
    padding: 15px 8px 0
}

.user-card {
    display: flex;
    gap: 9px;
    align-items: center
}

.avatar {
    flex: 0 0 auto;
    width: 35px;
    height: 35px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #1b72bb;
    color: #fff;
    font-weight: 800
}

.user-card strong {
    font-size: 12px;
    color: #fff;
    display: block
}

.user-card small {
    font-size: 10px;
    color: #85a2bd
}

.signout {
    border: 0;
    background: transparent;
    color: #9cb6cc;
    font-family: inherit;
    font-size: 11px;
    padding: 13px 0 0
}

.shell {
    min-width: 0
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 25px 32px 17px
}

.topbar h1 {
    font-size: 21px;
    margin: 0
}

.topbar .subtitle {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px
}

.top-actions {
    display: flex;
    gap: 9px;
    align-items: center
}

.status {
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    padding: 8px 11px
}

.status.online {
    background: #e7f9f0;
    color: #078551
}

.status.demo {
    background: #fff4df;
    color: #ad6907
}

.page {
    padding: 0 32px 32px
}

.page-section {
    display: none
}

.page-section.active {
    display: block
}

.hero {
    background: linear-gradient(110deg, #0a2a50, #0e4f86);
    border-radius: 22px;
    padding: 27px 28px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px
}

.hero:after {
    content: "";
    position: absolute;
    left: 0;
    top: -50%;
    width: 45%;
    height: 210%;
    background: linear-gradient(90deg, transparent, #55d8ef23);
    transform: rotate(15deg)
}

.hero>* {
    position: relative
}

.hero h2 {
    font-size: 22px;
    margin: 0 0 9px
}

.hero p {
    margin: 0;
    color: #c2ddf0;
    font-size: 12px;
    line-height: 1.8
}

.hero .primary {
    margin-top: 17px;
    background: #fff;
    color: #0b4f89;
    box-shadow: none
}

.metrics {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px
}

.metric {
    background: #fff;
    border: 1px solid #e3eaf2;
    border-radius: 15px;
    padding: 16px;
    box-shadow: var(--shadow)
}

.metric-top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    align-items: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700
}

.metric-icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 9px;
    background: #e9f6ff;
    color: #1573bf
}

.metric strong {
    display: block;
    font-size: 21px;
    margin-top: 13px;
    color: #18314d
}

.metric small {
    font-size: 10px;
    color: #14a36a;
    margin-top: 7px;
    display: block
}

.grid-two {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 17px
}

.card {
    border: 1px solid #e4ebf2;
    background: #fff;
    border-radius: 17px;
    padding: 18px;
    box-shadow: var(--shadow)
}

.card-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px
}

.card h3 {
    margin: 0;
    font-size: 15px
}

.card .hint {
    color: var(--muted);
    font-size: 11px
}

.table-wrap {
    overflow: auto
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 620px
}

.table th {
    text-align: right;
    color: #8490a0;
    font-weight: 700;
    padding: 10px 9px;
    border-bottom: 1px solid #e7edf2;
    background: #fbfcfe
}

.table td {
    padding: 12px 9px;
    border-bottom: 1px solid #eef2f5
}

.table tr:last-child td {
    border-bottom: 0
}

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 5px 8px;
    font-size: 10px;
    font-weight: 700
}

.badge.success {
    color: #0b8859;
    background: #e7f9ef
}

.badge.warning {
    color: #af6b09;
    background: #fff3df
}

.badge.info {
    color: #1767b3;
    background: #e8f4ff
}

.badge.muted {
    color: #66778e;
    background: #f0f3f6
}

.activity {
    display: grid;
    gap: 13px
}

.activity-item {
    display: flex;
    gap: 10px;
    align-items: flex-start
}

.activity-dot {
    margin-top: 4px;
    width: 9px;
    height: 9px;
    border-radius: 9px;
    background: var(--cyan);
    box-shadow: 0 0 0 4px #55d8ef24
}

.activity-item b {
    font-size: 11px;
    display: block
}

.activity-item span {
    font-size: 10px;
    line-height: 1.7;
    color: var(--muted)
}

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap
}

.toolbar h2 {
    margin: 0;
    font-size: 20px
}

.toolbar .copy {
    color: var(--muted);
    font-size: 11px;
    margin-top: 5px
}

.toolbar-actions {
    display: flex;
    gap: 8px
}

.search {
    position: relative;
    flex: 1;
    min-width: 200px
}

.search input {
    width: 100%;
    padding: 11px 39px 11px 12px;
    border: 1px solid #dbe5ee;
    border-radius: 11px;
    outline: 0
}

.search:before {
    content: "⌕";
    position: absolute;
    right: 12px;
    top: 6px;
    font-size: 21px;
    color: #6b8095
}

.empty {
    padding: 32px;
    text-align: center;
    color: var(--muted);
    font-size: 12px
}

.lock {
    color: #1972bd;
    font-size: 13px
}

.stock {
    font-weight: 700
}

.low {
    color: #d77719
}

.invoice-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 17px
}

.invoice-search {
    position: relative
}

.result-list {
    display: none;
    position: absolute;
    z-index: 4;
    right: 0;
    left: 0;
    top: 45px;
    border: 1px solid #d4e3ee;
    border-radius: 12px;
    background: white;
    box-shadow: 0 16px 33px #071b3524;
    max-height: 260px;
    overflow: auto
}

.result-list.show {
    display: block
}

.result {
    display: flex;
    justify-content: space-between;
    gap: 9px;
    width: 100%;
    padding: 12px;
    border: 0;
    border-bottom: 1px solid #edf1f5;
    background: #fff;
    text-align: right
}

.result:hover {
    background: #f2f9ff
}

.result code {
    color: #2377c2;
    font-family: inherit
}

.result small {
    color: var(--muted)
}

.invoice-summary {
    background: linear-gradient(160deg, #0b2f55, #10264b);
    color: #fff;
    border-radius: 16px;
    padding: 18px;
    height: max-content
}

.invoice-summary h3 {
    margin: 0 0 20px;
    font-size: 16px
}

.summary-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ffffff1c;
    color: #bad1e3;
    font-size: 12px
}

.summary-line strong {
    color: #fff
}

.summary-total {
    display: flex;
    justify-content: space-between;
    padding: 17px 0 5px;
    font-size: 16px
}

.summary-total strong {
    color: var(--cyan)
}

.invoice-summary .primary {
    background: #45d3ea;
    color: #073054;
    box-shadow: none;
    margin-top: 14px
}

.segmented {
    display: flex;
    padding: 4px;
    border: 1px solid #dce5ed;
    border-radius: 11px;
    background: #f8fafc;
    width: max-content;
    margin-bottom: 14px
}

.segment {
    border: 0;
    background: transparent;
    color: #728197;
    padding: 8px 11px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700
}

.segment.active {
    background: #fff;
    color: #1767b3;
    box-shadow: 0 2px 7px #09325014
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 13px
}

.dialog {
    border: 0;
    border-radius: 19px;
    padding: 0;
    width: min(560px, calc(100vw - 28px));
    box-shadow: 0 24px 80px #041a3180
}

.dialog::backdrop {
    background: #071b3566
}

.dialog-body {
    padding: 22px
}

.dialog-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px
}

.dialog h3 {
    margin: 0;
    font-size: 17px
}

.close {
    border: 0;
    background: #f0f4f8;
    border-radius: 9px;
    width: 32px;
    height: 32px;
    color: #44566d;
    font-size: 20px
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 8px
}

.notice {
    border: 1px solid #cde5f7;
    background: #edf8ff;
    color: #175d94;
    border-radius: 11px;
    padding: 11px;
    font-size: 11px;
    line-height: 1.8;
    margin-bottom: 15px
}

.color-swatch {
    width: 31px;
    height: 31px;
    border-radius: 9px;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px #cedbe6;
    display: inline-block;
    vertical-align: middle;
    margin-left: 7px
}

.toast {
    position: fixed;
    left: 24px;
    bottom: 24px;
    z-index: 10;
    max-width: 330px;
    background: #152d4a;
    color: #fff;
    border-radius: 11px;
    padding: 12px 14px;
    box-shadow: 0 12px 30px #06182f40;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: .25s;
    font-size: 12px
}

.toast.show {
    opacity: 1;
    transform: none
}

.mobile-nav {
    display: none
}

@media(max-width:1050px) {
    .metrics {
        grid-template-columns: repeat(2, 1fr)
    }

    .invoice-layout {
        grid-template-columns: 1fr
    }

    .invoice-summary {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
        align-items: center
    }

    .invoice-summary h3,
    .invoice-summary .primary {
        grid-column: 1/-1
    }

    .summary-line,
    .summary-total {
        padding: 7px
    }

    .grid-two {
        grid-template-columns: 1fr
    }
}

@media(max-width:760px) {
    body {
        padding-bottom: 68px
    }

    .auth {
        display: block
    }

    .auth-visual {
        min-height: 280px;
        padding: 30px 23px
    }

    .visual-copy h1 {
        font-size: 28px
    }

    .visual-copy p {
        font-size: 13px
    }

    .auth-card-wrap {
        padding: 18px
    }

    .auth-card {
        padding: 26px 21px
    }

    .app {
        display: block
    }

    .sidebar {
        display: none
    }

    .topbar {
        padding: 19px 17px 13px
    }

    .topbar h1 {
        font-size: 17px
    }

    .top-actions .ghost {
        display: none
    }

    .page {
        padding: 0 14px 20px
    }

    .hero {
        padding: 20px
    }

    .hero h2 {
        font-size: 18px
    }

    .metrics {
        gap: 10px
    }

    .metric {
        padding: 13px
    }

    .metric strong {
        font-size: 16px
    }

    .grid-two {
        gap: 12px
    }

    .card {
        padding: 14px;
        border-radius: 14px
    }

    .invoice-summary {
        display: block
    }

    .summary-line {
        padding: 9px 0
    }

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

    .mobile-nav {
        position: fixed;
        z-index: 5;
        bottom: 0;
        right: 0;
        left: 0;
        display: flex;
        justify-content: space-around;
        padding: 7px 6px max(7px, env(safe-area-inset-bottom));
        background: #071b35;
        border-top: 1px solid #ffffff12
    }

    .mobile-nav .nav-button {
        width: auto;
        display: grid;
        gap: 2px;
        padding: 5px 9px;
        text-align: center;
        font-size: 9px;
        border-radius: 8px
    }

    .mobile-nav .nav-icon {
        font-size: 15px
    }

    .toolbar {
        align-items: flex-start
    }

    .toolbar-actions {
        width: 100%
    }

    .toolbar-actions .primary {
        flex: 1
    }

    .toast {
        bottom: 78px;
        left: 12px;
        right: 12px;
        max-width: none
    }
}

@media print {

@page{
    size:A4;
    margin:6mm;
}

html,
body{
    margin:0;
    padding:0;
    background:#fff;
}

.sidebar,
.topbar,
.mobile-nav,
.toolbar,
.toast,
.no-print{
    display:none!important;
}

.app,
.shell,
.page,
.page-section.active{
    display:block!important;
}

.card{
    border:none!important;
    box-shadow:none!important;
    padding:0!important;
    margin:0!important;
}

.invoice-layout{
    display:flex!important;
    flex-direction:column!important;
    gap:8px!important;
}

.invoice-summary{
    margin-top:8px!important;
    page-break-inside:avoid!important;
    break-inside:avoid!important;
    border:1px solid #ddd!important;
    padding:10px!important;
    background:#fff!important;
}

.table{
    font-size:10px!important;
}

.table th,
.table td{
    padding:5px!important;
}

.search,
.invoice-search label,
#results,
.toolbar,
button,
.search::before{
    display:none!important;
}

input{
    border:none!important;
    background:transparent!important;
    padding:0!important;
}

table{
    width:100%;
    border-collapse:collapse;
}

thead{
    display:table-header-group;
}

tr{
    page-break-inside:avoid;
}

}