/* ==========================================================================
   Automann — interface identity
   --------------------------------------------------------------------------
   Loaded after style.css. style.css stays the framework's generic base so a
   future update from master can still be merged; everything that makes this
   look like Automann rather than a boilerplate lives here.

   The palette comes from the logo: a cyan snowflake on deep navy with a green
   centre, an azure wordmark, a red rule. Tokens are defined in style.css.
   ========================================================================== */

/* ==========================================================================
   Base
   ========================================================================== */

body {
    /* A cold, faint wash behind the frost background — the room this app is
       about is a cold room. */
    background-color: var(--bg);
    background-image:
        radial-gradient(1200px 500px at 100% -10%, rgba(255, 93, 1, .06), transparent 60%),
        radial-gradient(900px 400px at -10% 0%, rgba(25, 27, 24, .04), transparent 55%);
    background-attachment: fixed;
    letter-spacing: -.01em;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    letter-spacing: -.02em;
}

a { color: var(--ba-cyan-600); }
a:hover { color: var(--ba-cyan); }

::selection {
    background: rgba(255, 93, 1, .20);
    color: var(--ba-navy);
}

/* Focus is a brand ring, not the browser's default outline. */
:focus-visible {
    outline: 3px solid rgba(255, 93, 1, .45);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* ==========================================================================
   Navbar — white and frosted, because the wordmark has black in it and needs
   a light ground to read against.
   ========================================================================== */

.navbar {
    position: sticky;
    top: .75rem;
    z-index: 1030;
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(180%) blur(14px);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    border: 1px solid rgba(255, 255, 255, .7);
    box-shadow: 0 1px 2px rgba(13, 35, 58, .04), 0 10px 30px rgba(13, 35, 58, .07);
    border-radius: var(--radius-lg);
    padding: .45rem .5rem;
}

/* The framework wraps the logo in a bordered box; the wordmark reads better
   free-standing. */
.navbar .logo {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}
.nav-logo {
    max-height: 34px;
    width: auto;
    display: block;
}
.navbar-brand {
    padding: .25rem .5rem .25rem .35rem;
    margin-right: .5rem;
    border-radius: var(--radius);
    transition: background-color var(--transition);
}
.navbar-brand:hover { background: var(--ba-frost); }

.navbar-nav .nav-link {
    color: var(--ba-navy);
    font-weight: 500;
    font-size: .93rem;
    padding: .5rem .85rem !important;
    border-radius: 999px;
}
.navbar-nav .nav-link:hover {
    background: var(--ba-frost);
    color: var(--ba-cyan-600);
}
.navbar-nav .nav-link.active {
    background: linear-gradient(135deg, var(--ba-cyan) 0%, var(--ba-azure) 100%);
    color: #fff;
    box-shadow: var(--shadow-brand);
}
.navbar-nav .dropdown-toggle::after { margin-left: .4em; opacity: .55; }

.navbar-nav .dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .4rem;
    min-width: 15rem;
}
.navbar-nav .dropdown-item {
    border-radius: var(--radius-sm);
    padding: .55rem .85rem;
    font-size: .9rem;
    color: var(--text);
}
.navbar-nav .dropdown-item:hover {
    background: var(--ba-frost);
    color: var(--ba-cyan-600);
}

/* The account chip on the right. */
#user_logged_in .dropdown-toggle {
    background: #fff !important;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    font-weight: 500;
    font-size: .88rem;
    color: var(--ba-navy) !important;
    padding: .4rem .95rem;
}
#user_logged_in .dropdown-toggle:hover {
    background: var(--ba-frost) !important;
    border-color: var(--ba-cyan-300);
}
#user_logged_in .dropdown-toggle i { color: var(--ba-cyan); }
#user_logged_in .dropdown-menu {
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}
#user_logged_in .list-group-item { background: transparent; padding: .45rem .75rem; }

/* Direct Sign In / Login button in top navbar */
#user_logged_in .nav-login-btn,
#user_logged_in .button1,
#user_logged_in .btn-primary {
    background: linear-gradient(135deg, var(--ba-cyan) 0%, var(--ba-azure) 100%) !important;
    border: none !important;
    color: #ffffff !important;
    box-shadow: var(--shadow-brand) !important;
    font-weight: 600 !important;
    font-size: .88rem;
    padding: .42rem 1.15rem !important;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
#user_logged_in .nav-login-btn:hover,
#user_logged_in .button1:hover,
#user_logged_in .btn-primary:hover {
    background: linear-gradient(135deg, var(--ba-cyan-600) 0%, #0b86cc 100%) !important;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(27, 176, 206, .42) !important;
}
#user_logged_in .nav-login-btn i,
#user_logged_in .button1 i,
#user_logged_in .btn-primary i {
    color: #ffffff !important;
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: .35rem .6rem;
}
.navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(27, 176, 206, .3); }

/* ==========================================================================
   Hero / page header — deep navy with the snowflake showing faintly through,
   the way the logo tile looks.
   ========================================================================== */

.hero-section {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 380px at 88% -30%, rgba(27, 176, 206, .38), transparent 62%),
        linear-gradient(135deg, var(--ba-navy) 0%, var(--ba-navy-700) 55%, #0b2d4a 100%);
    border-radius: var(--radius-lg);
    padding: 48px 0 52px;
    text-align: left;
    margin-top: 1.25rem;
    box-shadow: 0 18px 44px rgba(13, 35, 58, .22);
}

/* A single outsized snowflake, bled off the right edge. Decorative only. */
.hero-section::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -70px;
    width: 340px;
    height: 340px;
    transform: translateY(-50%);
    opacity: .10;
    pointer-events: none;
    background: no-repeat center / contain
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cg%3E%3Cline x1='50' y1='6' x2='50' y2='94'/%3E%3Cline x1='11' y1='28' x2='89' y2='72'/%3E%3Cline x1='11' y1='72' x2='89' y2='28'/%3E%3Cline x1='50' y1='18' x2='40' y2='28'/%3E%3Cline x1='50' y1='18' x2='60' y2='28'/%3E%3Cline x1='50' y1='82' x2='40' y2='72'/%3E%3Cline x1='50' y1='82' x2='60' y2='72'/%3E%3Cline x1='21' y1='34' x2='21' y2='47'/%3E%3Cline x1='21' y1='34' x2='33' y2='31'/%3E%3Cline x1='79' y1='66' x2='79' y2='53'/%3E%3Cline x1='79' y1='66' x2='67' y2='69'/%3E%3Cline x1='21' y1='66' x2='21' y2='53'/%3E%3Cline x1='21' y1='66' x2='33' y2='69'/%3E%3Cline x1='79' y1='34' x2='79' y2='47'/%3E%3Cline x1='79' y1='34' x2='67' y2='31'/%3E%3C/g%3E%3C/svg%3E");
}

.hero-section > .container,
.hero-section > .container-xl { position: relative; z-index: 1; }

.hero-section h1,
.hero-section h2,
.hero-section h3 {
    color: #fff;
    font-weight: 600;
    letter-spacing: -.03em;
}
.hero-section h1 { font-size: clamp(1.75rem, 3vw, 2.4rem); }
.hero-section p { color: rgba(255, 255, 255, .74); font-size: .95rem; }

/* A short cyan rule under the page title, echoing the red rule in the logo. */
.hero-section h1::after,
.hero-section h3::after {
    content: "";
    display: block;
    width: 52px;
    height: 3px;
    margin-top: .7rem;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--ba-cyan), var(--ba-azure));
}

.hero-section-mini { color: var(--text); }
.hero-section-mini::after { display: none; }

/* Breadcrumbs sit inside the hero. */
.hero-section .breadcrumb { justify-content: flex-start; margin-bottom: 0; }
.hero-section .breadcrumb a { color: var(--ba-cyan-300); }
.hero-section .breadcrumb .active { color: rgba(255, 255, 255, .65); }
.hero-section .breadcrumb-item + .breadcrumb-item::before { color: rgba(255, 255, 255, .4); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    border-radius: 999px;
    font-weight: 500;
    font-size: .9rem;
    padding: .5rem 1.15rem;
    transition: transform var(--transition), box-shadow var(--transition),
                background-color var(--transition), border-color var(--transition);
}
.btn:active { transform: translateY(1px); }

.btn-primary,
.button1,
.submit-btn,
.create-btn {
    background: linear-gradient(135deg, var(--ba-cyan) 0%, var(--ba-azure) 100%);
    border: none;
    color: #fff !important;
    box-shadow: var(--shadow-brand);
}
.btn-primary:hover,
.button1:hover,
.submit-btn:hover,
.create-btn:hover {
    background: linear-gradient(135deg, var(--ba-cyan-600) 0%, #0b86cc 100%);
    box-shadow: 0 10px 24px rgba(27, 176, 206, .42);
    transform: translateY(-1px);
    color: #fff !important;
}
.btn-primary:disabled, .button1:disabled, .btn:disabled {
    background: #c9d6e0;
    box-shadow: none;
    color: #fff !important;
}

.btn-success {
    background: linear-gradient(135deg, #1eb85c 0%, var(--ba-green) 100%);
    border: none;
    box-shadow: 0 6px 16px rgba(22, 163, 74, .28);
}
.btn-success:hover {
    background: linear-gradient(135deg, #15994b 0%, #128a3e 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--ba-navy);
    border: none;
}
.btn-secondary:hover { background: var(--ba-navy-600); transform: translateY(-1px); }

.btn-outline-primary {
    border: 1px solid var(--ba-cyan);
    color: var(--ba-cyan-600);
    background: #fff;
}
.btn-outline-primary:hover {
    background: var(--ba-cyan);
    border-color: var(--ba-cyan);
    color: #fff;
}

.btn-outline-secondary {
    border: 1px solid var(--border-color);
    color: var(--ba-navy);
    background: #fff;
}
.btn-outline-secondary:hover {
    background: var(--ba-navy);
    border-color: var(--ba-navy);
    color: #fff;
}

.btn-outline-danger { border-color: #f3c0c0; color: var(--ba-red); background: #fff; }
.btn-outline-danger:hover { background: var(--ba-red); border-color: var(--ba-red); color: #fff; }

.btn-link { color: var(--ba-cyan-600); text-decoration: none; font-weight: 500; }
.btn-link:hover { color: var(--ba-cyan); text-decoration: underline; }

.btn-sm { padding: .35rem .8rem; font-size: .82rem; }
.btn-lg { padding: .7rem 1.5rem; font-size: 1rem; }

/* ==========================================================================
   Cards and panels
   ========================================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

.card-header {
    background: #fff !important;
    border-bottom: 1px solid var(--border-color);
    padding: .95rem 1.15rem;
    border-radius: var(--radius) var(--radius) 0 0 !important;
}
.card-header strong {
    font-weight: 600;
    color: var(--ba-navy);
    letter-spacing: -.01em;
}
.card-footer { background: #fbfdfe !important; border-top: 1px solid var(--border-color); }
.card-body { padding: 1.15rem; }

/* Stat tiles. The cyan edge is the tell that this is a live figure and not
   just a box of text. */
.card-dashboard-two {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.card-dashboard-two::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--ba-cyan), var(--ba-azure));
}
.card-dashboard-two:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--ba-cyan-300);
}
.card-dashboard-two h3 {
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--ba-navy);
    margin-bottom: .15rem;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}
.card-dashboard-two p {
    font-size: .82rem;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 0;
}
.card-dashboard-two p a { color: var(--ba-cyan-600) !important; font-weight: 600; }

/* A tile whose number is a problem rather than a fact. */
.card-dashboard-two.tile-alert::before { background: linear-gradient(180deg, var(--ba-orange), #f97316); }
.card-dashboard-two.tile-alert h3 { color: #b45309; }

/* ==========================================================================
   Tables
   ========================================================================== */

.table { margin-bottom: 0; color: var(--text); }
.table > :not(caption) > * > * { padding: .8rem 1.15rem; }

.table thead th {
    background: #f7fafc;
    border-bottom: 1px solid var(--border-color);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}
.table tbody tr { border-color: #eef4f8; }
.table tbody tr:hover { background: rgba(230, 247, 250, .55); }
.table tbody td { vertical-align: middle; font-size: .9rem; }
.table td.text-end, .table th.text-end { font-variant-numeric: tabular-nums; }
.table tfoot { background: #f7fafc; }

/* ==========================================================================
   Badges — quiet, tinted pills instead of Bootstrap's saturated blocks.
   ========================================================================== */

.badge {
    font-weight: 600;
    font-size: .72rem;
    letter-spacing: .01em;
    padding: .34em .7em;
    border-radius: 999px;
}
.badge.bg-primary   { background: var(--ba-frost) !important; color: var(--ba-cyan-600) !important; }
.badge.bg-secondary { background: #eef2f6 !important; color: #475569 !important; }
.badge.bg-success   { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-info      { background: #e0f2fe !important; color: #0369a1 !important; }
.badge.bg-warning   { background: #fef3c7 !important; color: #b45309 !important; }
.badge.bg-danger    { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-dark      { background: var(--ba-navy) !important; color: #fff !important; }
.badge.bg-light     { background: #eef2f6 !important; color: #475569 !important; }

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: .55rem .8rem;
    font-size: .92rem;
    color: var(--text);
    background-color: #fff;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--ba-cyan);
    box-shadow: 0 0 0 4px rgba(27, 176, 206, .16);
}
.form-control::placeholder { color: #9fb0c0; }
.form-label { font-weight: 500; color: var(--ba-navy); }

.form-check-input:checked {
    background-color: var(--ba-cyan);
    border-color: var(--ba-cyan);
}
.form-check-input:focus { box-shadow: 0 0 0 4px rgba(27, 176, 206, .16); }

.input-group-lg > .form-control { font-size: 1rem; }

/* ==========================================================================
   Alerts
   ========================================================================== */

.alert {
    border: none;
    border-left: 4px solid transparent;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    box-shadow: var(--shadow-sm);
}
.alert-success { background: #f0fdf4; border-left-color: var(--ba-green); color: #14532d; }
.alert-danger  { background: #fef2f2; border-left-color: var(--ba-red);   color: #7f1d1d; }
.alert-warning { background: #fffbeb; border-left-color: var(--ba-orange); color: #78350f; }
.alert-info    { background: var(--ba-frost); border-left-color: var(--ba-cyan); color: #0c4a6e; }

/* ==========================================================================
   The command console — the app's front door, so it gets the most attention.
   ========================================================================== */

.console .hero-section { padding-bottom: 42px; }

.console .input-group {
    border-radius: 999px;
    background: #fff;
    padding: .3rem;
    box-shadow: 0 10px 30px rgba(6, 20, 35, .28);
    transition: box-shadow var(--transition);
}
.console .input-group:focus-within {
    box-shadow: 0 0 0 4px rgba(111, 216, 234, .35), 0 12px 34px rgba(6, 20, 35, .32);
}

/* The command box is one continuous pill: the field and its two buttons all
   sit inside the same white capsule. */
.console #commandInput {
    border: none;
    border-radius: 999px !important;
    padding: .7rem 1.25rem;
    font-size: 1rem;
    background: transparent;
    box-shadow: none;
}
.console #commandInput:focus { box-shadow: none; }
.console #commandInput::placeholder { color: #a8b8c6; }

.console #micBtn {
    border: none;
    background: transparent;
    color: var(--muted);
    border-radius: 999px;
    padding: .5rem .85rem;
}
.console #micBtn:hover { background: var(--ba-frost); color: var(--ba-cyan-600); }
.console #micBtn.btn-danger {
    background: var(--ba-red) !important;
    color: #fff;
    animation: ba-listening 1.2s ease-in-out infinite;
}
@keyframes ba-listening {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .5); }
    50%      { box-shadow: 0 0 0 9px rgba(220, 38, 38, 0); }
}

.console #interpretBtn { border-radius: 999px !important; padding-inline: 1.5rem; }

/* Suggested phrasings under the box. */
.console .hero-section .small em {
    font-style: normal;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    padding: .18rem .6rem;
    margin: 0 .1rem;
    display: inline-block;
    color: rgba(255, 255, 255, .82);
}

/* The interpretation preview — the confirm step, so it should feel like a
   card that has just landed on the desk. */
#previewCard {
    border: 1px solid var(--ba-cyan-300);
    border-left: 4px solid var(--ba-cyan);
    box-shadow: var(--shadow);
    animation: ba-preview-in .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes ba-preview-in {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
}
#previewText { color: var(--ba-navy); font-weight: 600; letter-spacing: -.02em; }
#previewIntent {
    background: linear-gradient(135deg, var(--ba-cyan), var(--ba-azure)) !important;
    color: #fff !important;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .68rem;
}

/* Feed rows: sites, proof, follow-ups. */
.card-body .border-bottom:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* ==========================================================================
   Payslip — printed and handed to someone, so it reads as a document.
   ========================================================================== */

.payslip-doc { box-shadow: var(--shadow); }
.payslip-doc h4 { color: var(--ba-navy); letter-spacing: -.02em; }
.payslip-doc .table thead th { background: transparent; border-bottom: 1px solid var(--border-color); }
.payslip-doc .table tbody tr:hover { background: transparent; }

@media print {
    .navbar, .footer, .d-print-none, #toast-container { display: none !important; }
    body { background: #fff !important; }
    .card { box-shadow: none !important; border: none !important; }
    .payslip-doc { border: 1px solid #ccc !important; }
}

/* ==========================================================================
   Auth pages — navy ground with the snowflake behind a single white card.
   ========================================================================== */

.account-body {
    min-height: 100vh;
    background:
        radial-gradient(1000px 520px at 78% -10%, rgba(27, 176, 206, .34), transparent 60%),
        linear-gradient(150deg, var(--ba-navy) 0%, #0b2b47 48%, #08304f 100%);
    background-attachment: fixed;
}

/* A faint snowflake field, so the sign-in page is unmistakably this company. */
.account-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: .055;
    background: repeat center / 190px 190px
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'%3E%3Cline x1='50' y1='10' x2='50' y2='90'/%3E%3Cline x1='15' y1='30' x2='85' y2='70'/%3E%3Cline x1='15' y1='70' x2='85' y2='30'/%3E%3Cline x1='50' y1='22' x2='41' y2='31'/%3E%3Cline x1='50' y1='22' x2='59' y2='31'/%3E%3Cline x1='50' y1='78' x2='41' y2='69'/%3E%3Cline x1='50' y1='78' x2='59' y2='69'/%3E%3C/svg%3E");
}

.account-body .card,
.account-body .auth-card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(4, 16, 28, .45);
}

.auth-brand { text-align: center; margin-bottom: 1.25rem; }
.auth-brand img { max-width: 200px; height: auto; }
.auth-tagline {
    color: rgba(255, 255, 255, .62);
    font-size: .82rem;
    text-align: center;
    margin-top: 1.15rem;
    letter-spacing: .01em;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.footer {
    margin-top: 3rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    color: var(--muted);
    font-size: .82rem;
    text-align: center;
}
.footer p { margin-bottom: 0; }

/* ==========================================================================
   Small helpers used by the app's own screens
   ========================================================================== */

.text-muted { color: var(--muted) !important; }
.list-group-item.active {
    background: linear-gradient(135deg, var(--ba-cyan), var(--ba-azure));
    border-color: transparent;
    color: #fff;
}
.list-group-item {
    border-color: var(--border-color);
    font-size: .9rem;
    padding: .7rem 1rem;
}
.list-group-item-action:hover { background: var(--ba-frost); color: var(--ba-cyan-600); }

/* Reports: the missing-proof flag has to catch the eye in a wall of figures. */
.table td.text-danger.fw-bold { color: var(--ba-red) !important; }

@media (max-width: 991.98px) {
    .navbar { position: static; border-radius: var(--radius); }
    .hero-section { padding: 34px 0 38px; border-radius: var(--radius); }
    .hero-section::after { display: none; }
}

/* --------------------------------------------------------------------------
   Auth card details. The wordmark is wide and already has its own white
   space, so it does not want the framework's boxed treatment.
   -------------------------------------------------------------------------- */

.account-logo {
    max-width: 230px;
    background: transparent;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.az-card-signin {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 70px rgba(4, 16, 28, .45);
    padding: 2.5rem 2.25rem;
    max-width: 27rem;
    width: 100%;
}
.az-signin-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.5rem;
}
.az-signin-header h2 {
    color: var(--ba-navy);
    font-weight: 600;
    letter-spacing: -.02em;
}

/* The framework marks these fields up as bordered input groups. */
.az-card-signin .input-group {
    border-color: var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.az-card-signin .input-group:focus-within {
    border-color: var(--ba-cyan) !important;
    box-shadow: 0 0 0 4px rgba(27, 176, 206, .16);
}
.az-card-signin .input-group-text i { color: var(--muted); }
.az-card-signin .show-p { cursor: pointer; }
.az-card-signin .show-p:hover { color: var(--ba-cyan); }

.auth-link { color: var(--ba-cyan-600); font-size: .86rem; text-decoration: none; }
.auth-link:hover { color: var(--ba-cyan); text-decoration: underline; }

/* Quick Login 1-Click Role Pills */
.quick-login-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.quick-login-btn {
    font-size: 0.76rem !important;
    font-weight: 500;
    padding: 5px 11px !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 999px !important;
    color: var(--ba-navy) !important;
    transition: all var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1.25;
}
.quick-login-btn:hover {
    background: var(--ba-frost) !important;
    border-color: var(--ba-cyan) !important;
    color: var(--ba-cyan-700) !important;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(27, 176, 206, 0.2);
}
.quick-login-btn:active {
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Refinements found by looking at the rendered pages
   -------------------------------------------------------------------------- */

/* "My Day" was wrapping onto two lines and breaking the navbar's rhythm. */
.navbar-nav .nav-link { white-space: nowrap; }

/* The role beside a user's name is a status, not an alarm — the framework
   rendered it in warning orange. */
.role-chip {
    display: inline-block;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    border-radius: 999px;
    padding: .2rem .7rem;
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .02em;
    vertical-align: middle;
}

/* An eyebrow above a page title, for context the heading itself shouldn't carry. */
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: var(--ba-cyan-300);
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    margin-bottom: .6rem;
}
.hero-eyebrow i { font-size: .85rem; }

/* Money figures deserve more presence than a count. */
.money-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background:
        linear-gradient(135deg, rgba(27, 176, 206, .06) 0%, rgba(255, 255, 255, 0) 55%),
        #fff;
}
.money-card .money-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .82rem;
    font-weight: 500;
    color: var(--muted);
    margin-bottom: .35rem;
}
.money-card .money-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--ba-navy);
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
    margin-bottom: 0;
}
.money-card .money-icon {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: .82rem;
}
.money-card.money-out .money-icon { background: #fef3c7; color: #b45309; }
.money-card.money-in  .money-icon { background: #dcfce7; color: #15803d; }

/* Stat tiles carry a small icon so the four of them are scannable by shape. */
.card-dashboard-two .tile-icon {
    position: absolute;
    top: .9rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ba-frost);
    color: var(--ba-cyan-600);
    font-size: .8rem;
}
.card-dashboard-two.tile-alert .tile-icon { background: #fef3c7; color: #b45309; }

/* Section headings between panels. */
.section-label {
    font-size: .74rem;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .75rem;
}

/* Empty states should look intentional rather than broken. */
.empty-state {
    text-align: center;
    padding: 1.75rem 1rem;
    color: var(--muted);
    font-size: .88rem;
}
.empty-state i {
    display: block;
    font-size: 1.5rem;
    color: var(--ba-cyan-300);
    margin-bottom: .5rem;
}

/* --------------------------------------------------------------------------
   File inputs. The browser's default "Choose file / No file chosen" is the
   ugliest control on the page, and it sits in the missing-proof panel that
   people use every day.
   -------------------------------------------------------------------------- */

input[type="file"].form-control { padding: .3rem .5rem; }
input[type="file"]::file-selector-button {
    background: var(--ba-frost);
    border: none;
    color: var(--ba-cyan-600);
    border-radius: 999px;
    padding: .3rem .85rem;
    margin: 0 .7rem 0 0;
    font-weight: 500;
    font-size: .82rem;
    font-family: inherit;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition);
}
input[type="file"]::file-selector-button:hover {
    background: var(--ba-cyan);
    color: #fff;
}

/* The whole attach row reads as one control rather than three. */
.attach-form .input-group { gap: 0; }
.attach-form .form-select,
.attach-form .form-control { font-size: .82rem; }

/* A start time on a work card is a fact about the day, not a status. */
.time-pill {
    background: var(--ba-frost);
    color: var(--ba-cyan-600);
    border-radius: 999px;
    padding: .22rem .65rem;
    font-size: .76rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Recent activity: the intent tag leads each line, so give it a fixed feel. */
.activity-intent {
    display: inline-block;
    min-width: 5.5rem;
    text-align: center;
    margin-right: .5rem;
}

/* --------------------------------------------------------------------------
   Generated record lists

   The boilerplate rendered each record as one long pipe-separated sentence.
   These rules go with the rewritten renderer in scripts.template.js: a card
   with a heading and a label/value grid, so the same field lands in the same
   place on every row and a column can be read down the page.
   -------------------------------------------------------------------------- */

.record-list-item {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.1rem 1.25rem;
    margin-bottom: .85rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.record-list-item:hover {
    box-shadow: var(--shadow);
    border-color: var(--ba-cyan-300);
    transform: translateY(-1px);
}

.record-head {
    display: flex;
    align-items: center;
    gap: .65rem;
    margin-bottom: .9rem;
}
.record-index {
    flex: none;
    width: 1.65rem;
    height: 1.65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ba-frost);
    color: var(--ba-cyan-600);
    font-size: .74rem;
    font-weight: 700;
}
.record-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ba-navy);
    letter-spacing: -.02em;
}
.record-status { margin-left: auto; }

.record-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: .75rem 1.5rem;
    margin-bottom: 1rem;
}
.record-field { display: flex; flex-direction: column; min-width: 0; }
.record-label {
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .12rem;
}
.record-value {
    font-size: .9rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-button {
    background: var(--ba-frost);
    color: var(--ba-cyan-600) !important;
    border: 1px solid transparent;
    font-weight: 600;
    font-size: .8rem;
}
.table-button:hover {
    background: var(--ba-cyan);
    color: #fff !important;
}

/* Search / filter strip above the results. */
.search-btn {
    background: var(--ba-navy);
    color: #fff !important;
    border: none;
}
.search-btn:hover { background: var(--ba-navy-600); color: #fff !important; }

.filter-list a.active, .filter-list a:hover { color: var(--ba-cyan-600); }

/* Pagination. */
.pagination .page-link {
    border: 1px solid var(--border-color);
    color: var(--ba-navy);
    border-radius: var(--radius-sm) !important;
    margin: 0 .15rem;
    font-size: .85rem;
}
.pagination .page-link:hover { background: var(--ba-frost); color: var(--ba-cyan-600); }
.pagination .active > .page-link {
    background: var(--ba-cyan);
    border-color: var(--ba-cyan);
    color: #fff;
}

/* --------------------------------------------------------------------------
   The payslip's own table treatment.

   Screens use a light header; the payslip is a document that gets printed and
   handed to someone, so its earnings and deductions blocks are banded in navy
   to separate them clearly on paper.
   -------------------------------------------------------------------------- */

.payslip-doc .table thead th {
    background: var(--ba-navy);
    color: rgba(255, 255, 255, .82);
    border-bottom: none;
}
.payslip-doc .table thead tr th:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.payslip-doc .table thead tr th:last-child  { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.payslip-doc .table tfoot td { border-top: 1px solid var(--border-color); }
.payslip-doc .table tbody tr:hover { background: transparent; }

.payslip-doc h6 {
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .12em;
    color: var(--muted);
}

/* --------------------------------------------------------------------------
   Command examples — a wrapping chip list rather than a sentence with
   separators, which left orphaned middots on a phone.
   -------------------------------------------------------------------------- */

.command-examples {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    margin-top: .85rem;
}
.command-examples-label {
    color: rgba(255, 255, 255, .5);
    font-size: .76rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    margin-right: .15rem;
}
.command-example {
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .16);
    color: rgba(255, 255, 255, .8);
    border-radius: 999px;
    padding: .3rem .8rem;
    font-size: .8rem;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition), color var(--transition), border-color var(--transition);
}
.command-example:hover,
.command-example:focus-visible {
    background: rgba(255, 255, 255, .18);
    border-color: var(--ba-cyan-300);
    color: #fff;
}

/* --------------------------------------------------------------------------
   Phones. The Android app is a WebView of these same pages, so this is what a
   technician on site actually sees.
   -------------------------------------------------------------------------- */

@media (max-width: 575.98px) {
    /* The command box keeps its pill, but the field gets the full width and
       the actions sit under it instead of squeezing the placeholder. */
    .console .input-group {
        flex-wrap: wrap;
        border-radius: var(--radius-lg);
        padding: .5rem;
        gap: .4rem;
    }
    .console #commandInput {
        flex: 1 0 100%;
        width: 100%;
        padding: .5rem .75rem;
        font-size: 1rem;
    }
    .console #micBtn {
        flex: 0 0 auto;
        border: 1px solid var(--border-color);
    }
    .console #interpretBtn { flex: 1 1 auto; }

    .hero-section { padding: 28px 0 32px; }
    .hero-section h1 { font-size: 1.55rem; }

    .command-examples { margin-top: 1rem; }
    .command-example {
        font-size: .78rem;
        width: 100%;
    }

    /* Stat tiles read better as a single column than as cramped halves. */
    .card-dashboard-two h3 { font-size: 1.5rem; }
    .money-card .money-value { font-size: 1.45rem; }

    .record-fields { grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr)); gap: .6rem 1rem; }
    .card-body { padding: 1rem; }
    .table > :not(caption) > * > * { padding: .65rem .8rem; }
}

/* ==========================================================================
   Toasts — the console's single feedback channel
   --------------------------------------------------------------------------
   A quiet white card with a coloured spine and icon, stacked top-right (and
   pinned to the top full-width on a phone). Success is the snowflake green,
   danger the wordmark red, warning the accent amber, info cyan. The thin bar
   along the bottom counts down the time left — long enough on a success toast
   to catch the Undo button.
   ========================================================================== */

#toast-container {
    position: fixed;
    top: 84px;
    right: 20px;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(400px, calc(100vw - 40px));
    pointer-events: none;
}

.ba-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 14px 18px;
    background: #fff;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--ba-cyan);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-10px) scale(.98);
    transition: opacity .25s ease, transform .25s ease;
}
.ba-toast.show { opacity: 1; transform: translateY(0) scale(1); }

.ba-toast-icon { font-size: 1.15rem; line-height: 1.4; margin-top: 1px; color: var(--ba-cyan); }
.ba-toast-body { flex: 1 1 auto; font-size: .9rem; line-height: 1.4; color: var(--text); }

.ba-toast-success { border-left-color: var(--ba-green); }
.ba-toast-success .ba-toast-icon { color: var(--ba-green); }
.ba-toast-success .ba-toast-timer { background: var(--ba-green); }

.ba-toast-danger { border-left-color: var(--ba-red); }
.ba-toast-danger .ba-toast-icon { color: var(--ba-red); }
.ba-toast-danger .ba-toast-timer { background: var(--ba-red); }

.ba-toast-warning { border-left-color: var(--ba-orange); }
.ba-toast-warning .ba-toast-icon { color: var(--ba-orange); }
.ba-toast-warning .ba-toast-timer { background: var(--ba-orange); }

.ba-toast-info { border-left-color: var(--ba-cyan); }

.ba-toast-close {
    flex: 0 0 auto;
    border: 0;
    background: transparent;
    color: var(--text-muted, #6b7f92);
    font-size: 1.35rem;
    line-height: 1;
    padding: 0 2px;
    cursor: pointer;
    opacity: .6;
    transition: opacity .15s ease;
}
.ba-toast-close:hover { opacity: 1; }

.ba-toast-action {
    flex: 0 0 auto;
    align-self: center;
    border: 1px solid var(--ba-cyan);
    background: var(--ba-cyan);
    color: #fff;
    font-size: .8rem;
    font-weight: 600;
    padding: 5px 14px;
    border-radius: 999px;
    cursor: pointer;
    box-shadow: var(--shadow-brand);
    transition: transform .12s ease, background .15s ease;
}
.ba-toast-action:hover { background: var(--ba-cyan-600); transform: translateY(-1px); }

.ba-toast-timer {
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 100%;
    background: var(--ba-cyan);
    transform-origin: left center;
    opacity: .55;
}

@media (max-width: 576px) {
    #toast-container {
        top: 0;
        right: 0;
        left: 0;
        width: auto;
        padding: 10px;
    }
    .ba-toast { border-radius: var(--radius-sm); }
}

/* ==========================================================================
   Recent activity — re-runnable lines
   ========================================================================== */

.activity-row {
    cursor: pointer;
    border-radius: var(--radius-sm);
    padding: 8px 10px !important;
    margin: 0 -10px 8px !important;
    transition: background .15s ease, box-shadow .15s ease;
}
.activity-row:hover,
.activity-row:focus-visible {
    background: rgba(27, 176, 206, .07);
    outline: none;
    box-shadow: inset 0 0 0 1px var(--ba-cyan-300);
}
.activity-replay { color: var(--ba-cyan-600); opacity: 0; transition: opacity .15s ease; }
.activity-row:hover .activity-replay,
.activity-row:focus-visible .activity-replay { opacity: 1; }

/* ==========================================================================
   Motion — honour the operating-system "reduce motion" setting
   --------------------------------------------------------------------------
   Someone who has asked their device to stop animating gets no transitions,
   transforms or the counter tick; the interface still works, it just stops
   moving. The countdown bar jumps rather than slides so the timing is intact.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    .ba-toast { opacity: 1; transform: none; }
    .btn:hover, .ba-toast-action:hover, .btn-secondary:hover { transform: none !important; }
}

/* --------------------------------------------------------------------------
   PIN entry. Four digits read better spaced out and centred than as ordinary
   text, and a monospaced figure stops the dots jittering as they fill.
   -------------------------------------------------------------------------- */

.pin-input {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: .6em;
    text-indent: .6em;   /* re-centres, since letter-spacing pads the right */
    font-variant-numeric: tabular-nums;
    padding-block: .4rem;
}
.pin-input::placeholder {
    letter-spacing: .6em;
    color: #c3d0dc;
}
