

:root {
    --bg: #071018;
    --bg2: #0a151f;
    --bg3: #0d1b27;
    --bg4: #102332;

    --border: rgba(255,255,255,.07);
    --border2: rgba(255,255,255,.12);

    --text: #edf7ff;
    --text2: #9fb1bf;
    --text3: #647988;

    --blue: #4a9ee8;
    --cyan: #00d9ff;
    --green: #3dcc8e;
    --orange: #f0a030;
    --red: #e85a5a;
    --purple: #8888f8;

    --max: 1450px;
}

/* =========================================================
   RESET
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

/* =========================================================
   BACKGROUND
========================================================= */

body::before {
    content: "";
    position: fixed;
    inset: 0;

    background-image:
        linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);

    background-size: 45px 45px;

    pointer-events: none;
    z-index: -1;
}

/* =========================================================
   NAVIGATION
========================================================= */
/* =========================================================
   NAVIGATION
========================================================= */

nav {
    height: 74px;

    border-bottom: 1px solid var(--border);

    background: rgba(7, 16, 24, .88);

    backdrop-filter: blur(18px);

    position: sticky;
    top: 0;

    z-index: 100;
}


/* =========================================================
   NAV CONTAINER
========================================================= */

.nav-container {
    width: min(1150px, calc(100% - 40px));

    height: 100%;

    margin: 0 auto;

    display: flex;
    align-items: center;

    gap: 30px;
}


/* =========================================================
   LOGO
========================================================= */

.logo {
    display: flex;
    align-items: center;

    gap: 12px;

    font-family: Outfit, sans-serif;
    font-weight: 700;

    color: var(--text);

    text-decoration: none;

    flex-shrink: 0;
}

.logo-icon {
    width: 38px;
    height: 38px;

    border-radius: 11px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(135deg, #00e5ff, #006cff);

    box-shadow:
        0 0 18px rgba(0, 200, 255, .35);

    font-size: 18px;
}


/* =========================================================
   NAV LINKS
========================================================= */

.nav-links {
    display: flex;
    align-items: center;

    gap: 26px;

    margin-left: auto;
}

.nav-links a {
    color: var(--text3);

    text-decoration: none;

    font-size: 13px;

    white-space: nowrap;

    transition: .2s;
}

.nav-links a:hover {
    color: var(--text);
}


/* =========================================================
   NAV RIGHT
========================================================= */

.nav-right {
    display: flex;
    align-items: center;

    margin-left: 5px;

    flex-shrink: 0;
}

.live {
    display: flex;
    align-items: center;

    gap: 7px;

    font-size: 11px;

    color: var(--green);

    white-space: nowrap;
}

.live-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--green);

    box-shadow:
        0 0 10px rgba(61, 204, 142, .8);

    animation: pulse 2s infinite;
}


/* =========================================================
   HAMBURGER
========================================================= */

.hamburger {
    display: none;

    width: 40px;
    height: 40px;

    padding: 8px;

    margin-left: auto;

    border: 1px solid var(--border2);

    border-radius: 8px;

    background: var(--bg3);

    cursor: pointer;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;
}

.hamburger span {
    display: block;

    width: 20px;
    height: 2px;

    border-radius: 10px;

    background: var(--text);

    transition: .25s ease;
}


/* =========================================================
   HAMBURGER ACTIVE ANIMATION
========================================================= */

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   PULSE
========================================================= */

@keyframes pulse {

    50% {
        opacity: .35;
        transform: scale(.7);
    }

}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 900px) {

    .nav-container {
        width: calc(100% - 30px);
    }

    .nav-links {
        gap: 16px;
    }

    .nav-links a {
        font-size: 12px;
    }

    .live {
        font-size: 10px;
    }

}


/* =========================================================
   MOBILE HAMBURGER
========================================================= */

@media (max-width: 700px) {

    nav {
        height: 64px;
    }

    .nav-container {
        width: calc(100% - 24px);
    }


    /* Logo */

    .logo {
        gap: 9px;
    }

    .logo-icon {
        width: 34px;
        height: 34px;

        border-radius: 9px;

        font-size: 16px;
    }

    .logo span {
        font-size: 14px;
    }


    /* Hide desktop navigation */

    .nav-links {
        display: none;

        position: absolute;

        top: 64px;
        left: 0;
        right: 0;

        width: 100%;

        padding: 10px;

        margin: 0;

        flex-direction: column;
        align-items: stretch;

        gap: 4px;

        background: rgba(7, 16, 24, .97);

        border-bottom: 1px solid var(--border);

        box-shadow:
            0 15px 30px rgba(0, 0, 0, .25);

        backdrop-filter: blur(18px);
    }


    /* Show menu when active */

    .nav-links.active {
        display: flex;
    }


    /* Mobile links */

    .nav-links a {
        padding: 13px 15px;

        border-radius: 8px;

        font-size: 13px;
    }

    .nav-links a:hover {
        background: var(--bg3);
    }


    /* Hide system status */

    .nav-right {
        display: none;
    }


    /* Show hamburger */

    .hamburger {
        display: flex;
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 400px) {

    .nav-container {
        width: calc(100% - 16px);
    }

    .logo span {
        font-size: 13px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .hamburger {
        width: 38px;
        height: 38px;
    }

}

/* =========================================================
   PAGE
========================================================= */

.container {
    width: min(var(--max), calc(100% - 48px));
    margin: auto;
}

.page-header {
    padding: 55px 0 32px;

    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
}

.eyebrow {
    color: var(--cyan);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

h1 {
    font-family: Outfit;
    font-size: clamp(32px,4vw,48px);
    line-height: 1.05;
    letter-spacing: -1.5px;
}

.page-header p {
    color: var(--text2);
    font-size: 14px;
    margin-top: 12px;
    max-width: 650px;
    line-height: 1.7;
}

.primary-btn {
    border: 0;
    padding: 12px 18px;

    border-radius: 9px;

    color: white;

    background:
        linear-gradient(135deg,#079bd6,#1262e8);

    box-shadow:
        0 8px 25px rgba(0,130,255,.2);

    transition: .25s;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow:
        0 12px 35px rgba(0,130,255,.35);
}

/* =========================================================
   KPI GRID
========================================================= */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 14px;

    margin-bottom: 24px;
}

.kpi {
    position: relative;

    padding: 21px;

    background: linear-gradient(
        145deg,
        rgba(16,35,50,.9),
        rgba(10,21,31,.9)
    );

    border: 1px solid var(--border);

    border-radius: 14px;

    overflow: hidden;

    transition: .25s;
}

.kpi:hover {
    transform: translateY(-3px);
    border-color: rgba(74,158,232,.25);
}

.kpi::after {
    content: "";

    position: absolute;

    width: 100px;
    height: 100px;

    right: -35px;
    top: -35px;

    border-radius: 50%;

    background: rgba(0,217,255,.06);

    filter: blur(10px);
}

.kpi-label {
    color: var(--text3);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .7px;
}

.kpi-value {
    font-family: Outfit;
    font-size: 29px;
    font-weight: 700;

    margin-top: 9px;
}

.kpi-change {
    margin-top: 8px;

    font-size: 11px;
    color: var(--green);
}

.kpi-icon {
    position: absolute;

    right: 18px;
    top: 20px;

    width: 38px;
    height: 38px;

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(74,158,232,.1);
    color: var(--blue);

    font-size: 16px;
}

/* =========================================================
   MAIN GRID
========================================================= */

.main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;

    gap: 18px;

    margin-bottom: 28px;
}

/* =========================================================
   CARD
========================================================= */

.card {
    background: rgba(10,21,31,.92);

    border: 1px solid var(--border);

    border-radius: 15px;

    overflow: hidden;
}

.card-header {
    padding: 18px 20px;

    border-bottom: 1px solid var(--border);

    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;
}

.card-title {
    font-family: Outfit;
    font-size: 16px;
    font-weight: 600;
}

.card-subtitle {
    color: var(--text3);
    font-size: 11px;
    margin-top: 3px;
}

/* =========================================================
   TOOLBAR
========================================================= */

.toolbar {
    padding: 14px 18px;

    display: flex;
    gap: 9px;
    flex-wrap: wrap;

    border-bottom: 1px solid var(--border);
}

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

    background: var(--bg3);

    border: 1px solid var(--border2);

    border-radius: 8px;

    color: var(--text);

    padding: 10px 12px;

    outline: none;
}

.search:focus {
    border-color: var(--blue);
}

.filter {
    background: var(--bg3);

    color: var(--text2);

    border: 1px solid var(--border2);

    border-radius: 8px;

    padding: 9px 12px;

    outline: none;
}

/* =========================================================
   TABLE
========================================================= */

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
}

th {
    text-align: left;

    color: var(--text3);

    font-size: 10px;

    text-transform: uppercase;

    letter-spacing: .7px;

    padding: 13px 18px;

    font-weight: 500;

    background: rgba(255,255,255,.015);
}

td {
    padding: 15px 18px;

    border-top: 1px solid var(--border);

    color: var(--text2);

    font-size: 12px;
}

tr {
    transition: .2s;
}

tbody tr:hover {
    background: rgba(74,158,232,.035);
}

.po-number {
    color: var(--blue);
    font-weight: 600;
}

.supplier {
    color: var(--text);
    font-weight: 500;
}

.amount {
    color: var(--text);
    font-weight: 600;
}

/* =========================================================
   STATUS
========================================================= */

.status {
    display: inline-flex;

    align-items: center;
    gap: 6px;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 10px;
    font-weight: 500;
}

.status::before {
    content: "";

    width: 6px;
    height: 6px;

    border-radius: 50%;
}

.pending {
    color: #f0b85b;
    background: rgba(240,160,48,.1);
}

.pending::before {
    background: var(--orange);
}

.received {
    color: var(--green);
    background: rgba(61,204,142,.1);
}

.received::before {
    background: var(--green);
}

.processing {
    color: var(--blue);
    background: rgba(74,158,232,.1);
}

.processing::before {
    background: var(--blue);
}

.cancelled {
    color: var(--red);
    background: rgba(232,90,90,.1);
}

.cancelled::before {
    background: var(--red);
}

/* =========================================================
   ACTION BUTTON
========================================================= */

.action {
    width: 30px;
    height: 30px;

    border-radius: 7px;

    border: 1px solid var(--border2);

    background: var(--bg3);

    color: var(--text3);

    transition: .2s;
}

.action:hover {
    color: var(--text);
    border-color: var(--blue);
}

/* =========================================================
   SIDE PANEL
========================================================= */

.side-body {
    padding: 20px;
}

.supplier-row {
    display: flex;
    align-items: center;

    gap: 11px;

    padding: 11px 0;

    border-bottom: 1px solid var(--border);
}

.supplier-row:last-child {
    border-bottom: 0;
}

.supplier-avatar {
    width: 36px;
    height: 36px;

    border-radius: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: rgba(74,158,232,.1);

    color: var(--blue);

    font-family: Outfit;
    font-weight: 600;

    font-size: 11px;
}

.supplier-info {
    flex: 1;
}

.supplier-name {
    font-size: 12px;
    color: var(--text);
}

.supplier-orders {
    font-size: 10px;
    color: var(--text3);
    margin-top: 3px;
}

.supplier-total {
    font-size: 11px;
    color: var(--text2);
}

/* =========================================================
   PURCHASE SUMMARY
========================================================= */

.summary {
    margin-top: 25px;
}

.summary-row {
    display: flex;
    justify-content: space-between;

    padding: 9px 0;

    color: var(--text2);

    font-size: 12px;
}

.summary-row.total {
    border-top: 1px solid var(--border2);

    margin-top: 8px;

    padding-top: 15px;

    color: var(--text);

    font-weight: 600;

    font-size: 14px;
}

/* =========================================================
   PROGRESS
========================================================= */

.progress-item {
    margin-bottom: 18px;
}

.progress-head {
    display: flex;
    justify-content: space-between;

    margin-bottom: 7px;

    font-size: 11px;
}

.progress-head span:first-child {
    color: var(--text2);
}

.progress-head span:last-child {
    color: var(--text3);
}

.progress {
    height: 6px;

    border-radius: 10px;

    background: rgba(255,255,255,.05);

    overflow: hidden;
}

.progress-bar {
    height: 100%;

    border-radius: inherit;

    background: linear-gradient(
        90deg,
        var(--blue),
        var(--cyan)
    );
}

/* =========================================================
   BOTTOM SECTION
========================================================= */

.bottom-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;

    margin-bottom: 60px;
}

.activity {
    padding: 20px;
}

.activity-item {
    display: flex;
    gap: 12px;

    padding: 13px 0;

    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: 0;
}

.activity-icon {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    background: rgba(61,204,142,.1);

    color: var(--green);

    font-size: 12px;
}

.activity-text {
    font-size: 11px;
    color: var(--text2);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--text);
}

.activity-time {
    display: block;
    color: var(--text3);
    font-size: 9px;
    margin-top: 3px;
}

/* =========================================================
   MODAL
========================================================= */
.modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 20px;

    background: rgba(0, 0, 0, .65);
    backdrop-filter: blur(8px);

    z-index: 500;

    overflow-y: auto;
}

.modal.active {
    display: flex;
}

.modal-box {
    width: min(600px, 100%);

    max-height: calc(100vh - 40px);
    overflow-y: auto;

    background: #0b1924;

    border: 1px solid var(--border2);
    border-radius: 16px;

    box-shadow: 0 30px 80px rgba(0, 0, 0, .5);

    animation: modalIn .25s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(15px) scale(.98);
    }

    to {
        opacity: 1;
        transform: none;
    }
}


/* =========================================================
   MODAL HEADER
========================================================= */

.modal-header {
    padding: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 15px;

    border-bottom: 1px solid var(--border);
}

.close {
    flex-shrink: 0;

    border: 0;
    background: transparent;

    color: var(--text3);

    font-size: 20px;

    cursor: pointer;
}


/* =========================================================
   FORM
========================================================= */

.form {
    padding: 20px;

    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 15px;
}

.field {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 7px;
}

.field.full {
    grid-column: 1 / -1;
}

.field label {
    color: var(--text3);

    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.field input,
.field select {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;

    background: var(--bg3);

    color: var(--text);

    border: 1px solid var(--border2);
    border-radius: 8px;

    padding: 10px;

    outline: none;
}


/* =========================================================
   MODAL FOOTER
========================================================= */

.modal-footer {
    padding: 16px 20px;

    border-top: 1px solid var(--border);

    display: flex;
    justify-content: flex-end;

    gap: 10px;
}

.secondary-btn {
    padding: 10px 15px;

    background: var(--bg3);

    border: 1px solid var(--border2);

    border-radius: 8px;

    color: var(--text2);

    cursor: pointer;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 600px) {

    .modal {
        padding: 10px;
        align-items: center;
    }

    .modal-box {
        width: 100%;
        max-height: calc(100vh - 20px);

        border-radius: 12px;
    }

    .modal-header {
        padding: 15px;
    }

    .form {
        padding: 15px;

        grid-template-columns: 1fr;
        gap: 14px;
    }

    .field.full {
        grid-column: auto;
    }

    .modal-footer {
        padding: 12px 15px;

        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;
    }
}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 380px) {

    .modal {
        padding: 5px;
    }

    .modal-box {
        max-height: calc(100vh - 10px);
        border-radius: 10px;
    }

    .modal-header {
        padding: 12px;
    }

    .form {
        padding: 12px;
        gap: 12px;
    }

    .field input,
    .field select {
        padding: 9px;
        font-size: 14px;
    }

    .modal-footer {
        padding: 10px 12px;
    }
}




/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1050px) {

    .main-grid {
        grid-template-columns: 1fr;
    }

    .kpi-grid {
        grid-template-columns: repeat(2,1fr);
    }

}

@media(max-width:700px) {

    nav {
        padding: 0 18px;
    }

    .nav-links,
    .live {
        display: none;
    }

    .container {
        width: min(100% - 28px,var(--max));
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

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

    .field.full {
        grid-column: auto;
    }

}
