@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-400.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-600.woff") format("woff"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-700.woff") format("woff"); }
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family:
        "Inter",
        "Segoe UI",
        system-ui,
        Arial,
        sans-serif;
    background: #F5F7FA;
    color: #101828;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}


/* =========================================================
   LOGIN
========================================================= */

.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(
            135deg,
            #0b1220 0%,
            #101828 60%,
            #101828 100%
        );
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border-radius: 14px;
    padding: 38px;
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.18);
}

.login-brand {
    text-align: center;
    margin-bottom: 30px;
}

.login-brand h1 {
    margin: 0 0 8px;
    color: #101828;
    font-size: 28px;
}

.login-brand p {
    margin: 0;
    color: #667085;
}

.login-button {
    width: 100%;
    margin-top: 8px;
}

.login-message {
    min-height: 20px;
    margin: 14px 0 0;
    color: #b42318;
    text-align: center;
    font-size: 14px;
}

.login-note {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #EAECF0;
    color: #667085;
    text-align: center;
    font-size: 13px;
}


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

header {
    background: #1E3A5F;
    color: #ffffff;
}

.header-content {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

header h1 {
    margin: 0;
    font-size: 24px;
}

header p {
    margin: 5px 0 0;
    opacity: 0.85;
}

.session-area {
    display: flex;
    align-items: center;
    gap: 18px;
}

.current-user {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.current-user strong {
    font-size: 14px;
}

.current-user span {
    font-size: 12px;
    opacity: 0.8;
    margin-top: 3px;
}

.logout-button {
    width: auto;
    background: #ffffff;
    color: #101828;
}


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

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 10px 24px;
    background: #ffffff;
    border-bottom: 1px solid #EAECF0;
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.04);
}

.nav-btn {
    width: auto;
    background: transparent;
    color: #475467;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
}

.nav-btn:hover {
    background: #EFF4FF;
    color: #101828;
}

.nav-btn.active {
    background: #1E40AF;
    color: #ffffff;
}


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

main {
    width: 100%;
    max-width: 1500px;
    margin: 0 auto;
    padding: 28px;
}

.page {
    display: none;
}

.page.active-page {
    display: block;
}

.page h2 {
    margin-top: 0;
    color: #101828;
}


/* =========================================================
   PANELS
========================================================= */

.panel {
    background: #ffffff;
    border: 1px solid #EAECF0;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.04);
}

.panel h3 {
    margin-top: 0;
    color: #344054;
}


/* =========================================================
   DASHBOARD CARDS
========================================================= */

.cards {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: #ffffff;
    border: 1px solid #EAECF0;
    border-radius: 10px;
    padding: 22px;
    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.04);
}

.card h3 {
    margin: 0 0 12px;
    color: #667085;
    font-size: 14px;
    font-weight: 600;
}

.card p {
    margin: 0;
    color: #101828;
    font-size: 24px;
    font-weight: 700;
}


/* =========================================================
   FORMS
========================================================= */

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.form-row > * {
    flex: 1 1 180px;
}

.form-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
}

input,
select {
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid #D0D5DD;
    border-radius: 7px;
    background: #ffffff;
    color: #101828;
    outline: none;
}

input:focus,
select:focus {
    border-color: #1E40AF;
    box-shadow:
        0 0 0 3px rgba(30, 64, 175, 0.12);
}

button {
    min-height: 42px;
    padding: 9px 16px;
    border: 0;
    border-radius: 7px;
    background: #1E40AF;
    color: #ffffff;
    font-weight: 600;
}

button:hover {
    background: #1E3A8A;
}

.secondary-button {
    background: #EFF4FF;
    color: #101828;
}

.secondary-button:hover {
    background: #DBEAFE;
}

.danger-button {
    background: #b42318;
}

.danger-button:hover {
    background: #912018;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.helper-text {
    margin-bottom: 0;
    color: #667085;
    font-size: 13px;
}


/* =========================================================
   TRANSACTION USER INFO
========================================================= */

.transaction-user-info {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    padding: 14px 16px;
    margin: 18px 0;
    border: 1px solid #DBEAFE;
    border-radius: 8px;
    background: #F9FAFB;
}

.transaction-user-info > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    color: #667085;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}


/* =========================================================
   JOURNAL LINES
========================================================= */

.journal-lines-header,
.journal-line {
    display: grid;
    grid-template-columns:
        1.3fr 1.5fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
}

.journal-lines-header {
    margin: 20px 0 8px;
    color: #475467;
    font-size: 13px;
}

.journal-line {
    margin-bottom: 10px;
}

.remove-line {
    background: #f2f4f7;
    color: #344054;
}

.remove-line:hover {
    background: #e4e7ec;
}

.totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 28px;
    margin: 20px 0;
    padding-top: 16px;
    border-top: 1px solid #e4e7ec;
}


/* =========================================================
   TABLES
========================================================= */

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

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

th,
td {
    padding: 11px 12px;
    border-bottom: 1px solid #eaecf0;
    text-align: left;
    vertical-align: middle;
}

th {
    background: #F5F7FA;
    color: #344054;
    font-size: 13px;
    font-weight: 700;
}

td {
    color: #475467;
    font-size: 14px;
}

tbody tr:hover {
    background: #F9FAFB;
}


/* =========================================================
   LEDGER
========================================================= */

.ledger-account {
    overflow-x: auto;
}

.ledger-title {
    color: #101828;
}


/* =========================================================
   MESSAGE
========================================================= */

#message {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1000;
    display: none;
    max-width: 380px;
    padding: 14px 18px;
    border-radius: 8px;
    background: #101828;
    color: #ffffff;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.18);
}


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

@media (max-width: 1000px) {

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

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

    .session-area {
        width: 100%;
        justify-content: space-between;
    }

    .current-user {
        text-align: left;
    }
}

@media (max-width: 760px) {

    main {
        padding: 18px;
    }

    nav {
        padding: 8px;
    }

    .nav-btn {
        flex: 1 1 auto;
    }

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

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

    .journal-lines-header {
        display: none;
    }

    .journal-line {
        grid-template-columns: 1fr;
        padding: 14px;
        border: 1px solid #e4e7ec;
        border-radius: 8px;
        margin-bottom: 12px;
    }

    .login-card {
        padding: 28px 22px;
    }
}

/* Byvant Solutions Ltd brand additions */
.byv-brand-logo { display: block; height: 44px; width: auto; margin: 0 0 12px; }
.byv-product-line { font-size: 12px; color: #667085; margin: 4px 0 0; }
.byv-footer { text-align: center; font-size: 12px; color: #667085; padding: 20px 16px; border-top: 1px solid #EAECF0; margin-top: 32px; }

/* Byvant intro splash on the sign-in page (once per browser session; tap to skip) */
#intro {
  position: fixed; inset: 0; z-index: 1000; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #0b1220; color: #fff;
  animation: intro-out .5s ease 2s forwards;
}
#intro .mark {
  width: 76px; height: 76px; border-radius: 18px; background: #fff;
  display: grid; place-items: center; padding: 10px; box-sizing: border-box;
  animation: intro-rise .8s cubic-bezier(.22, .61, .36, 1) both;
}
#intro .mark img { width: 100%; height: auto; display: block; }
#intro .name {
  margin-top: 22px; font-size: clamp(20px, 4.5vw, 28px); font-weight: 600; letter-spacing: .04em; text-align: center;
  animation: intro-rise .8s .15s both;
}
#intro .sub {
  margin-top: 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .24em;
  opacity: .7; animation: intro-rise .8s .3s both; text-align: center;
}
#intro::after {
  content: ""; position: absolute; bottom: 18vh; left: 50%; width: 120px; height: 2px; margin-left: -60px;
  background: #2fa89b; transform: scaleX(0); transform-origin: left center;
  animation: intro-line 1.2s .4s cubic-bezier(.22, .61, .36, 1) forwards;
}
.intro-hidden #intro { display: none; }
@keyframes intro-rise { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes intro-line { to { transform: scaleX(1); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  #intro { animation: intro-out .3s ease .6s forwards; }
  #intro .mark, #intro .name, #intro .sub { animation: none; }
  #intro::after { animation: none; transform: scaleX(1); }
}

header .byv-product-line { color: #DBEAFE; }
