* {
    box-sizing: border-box;
}

html {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    background: #f4f6f8;
    color: #17202a;
}

body {
    margin: 0;
}

.app-header {
    background: #ffffff;
    border-bottom: 1px solid #dfe3e8;
}

.app-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 24px;
}

.app-title {
    font-size: 20px;
    font-weight: 700;
}

.app-subtitle {
    margin-top: 3px;
    color: #667085;
    font-size: 13px;
}

.app-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}

.card {
    background: #ffffff;
    border: 1px solid #e2e6ea;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card h1 {
    margin-top: 0;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    font-weight: 600;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #16803c;
}

.muted {
    color: #667085;
}

.login-wrap {
    max-width: 440px;
    margin: 40px auto;
}

.login-card h1 {
    margin-bottom: 8px;
}

.form-stack {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.form-stack label {
    display: grid;
    gap: 7px;
    font-weight: 600;
}

.form-stack input {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd5dc;
    border-radius: 7px;
    font: inherit;
    background: #ffffff;
}

.form-stack input:focus {
    outline: 2px solid #98b8ff;
    outline-offset: 1px;
    border-color: #356fd6;
}

.button {
    appearance: none;
    border: 1px solid #cfd5dc;
    border-radius: 7px;
    background: #ffffff;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button-primary {
    border-color: #245fc4;
    background: #245fc4;
    color: #ffffff;
}

.alert {
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 7px;
}

.alert-error {
    background: #fff1f1;
    border: 1px solid #efb8b8;
    color: #922b21;
}

.dashboard-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-heading h1 {
    margin-bottom: 6px;
}

.section-divider {
    border-top: 1px solid #e4e7ec;
    margin: 24px 0;
}

.role-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.role-badge {
    display: inline-block;
    background: #eef3fb;
    border: 1px solid #d4e0f3;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 700;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.page-heading h1 {
    margin: 0 0 6px;
}

.cnc-search label {
    display: grid;
    gap: 8px;
    font-weight: 600;
}

.input-action-row {
    display: flex;
    gap: 10px;
}

.input-action-row input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1px solid #cfd5dc;
    border-radius: 7px;
    font: inherit;
}

.customer-result {
    margin-top: 20px;
    padding: 16px;
    border-radius: 8px;
}

.customer-found {
    background: #f0f8f2;
    border: 1px solid #b8ddc2;
}

.customer-unmatched {
    background: #fff8e8;
    border: 1px solid #ead49a;
}

.result-label {
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.customer-name {
    font-size: 18px;
    font-weight: 700;
}

.customer-number {
    margin-top: 3px;
    color: #667085;
}

.cnc-form-card {
    margin-top: 20px;
}

.form-stack select,
.form-stack textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd5dc;
    border-radius: 7px;
    background: #ffffff;
    font: inherit;
}

.form-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-note {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

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

@media (max-width: 640px) {
    .input-action-row {
        display: grid;
    }

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


/* GODOWN2_CAMERA_SCANNER */

.godown-scan-panel {
    max-width: 720px;
}

.godown-camera-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px 0 10px;
}

.godown-camera-container {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 16px 0;
    overflow: hidden;
    border-radius: 12px;
    background: #111;
}

.godown-camera-video {
    display: block;
    width: 100%;
    min-height: 260px;
    max-height: 65vh;
    object-fit: cover;
}

.godown-camera-frame {
    position: absolute;
    width: 62%;
    aspect-ratio: 1 / 1;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid white;
    border-radius: 12px;
    box-sizing: border-box;
    pointer-events: none;
}

.godown-manual-form {
    margin-top: 26px;
}

.godown-qr-input {
    display: block;
    width: 100%;
    max-width: 520px;
    box-sizing: border-box;
    padding: 12px;
    margin: 8px 0 16px;
    font-size: 18px;
}

.godown-scan-error {
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #b00020;
}

@media (max-width: 640px) {

    .godown-scan-panel h1 {
        font-size: 34px;
    }

    .godown-camera-actions .button {
        min-height: 50px;
        font-size: 17px;
    }

    #start-camera-button {
        width: 100%;
    }

    .godown-camera-video {
        min-height: 320px;
    }
}


/* CNC_DAY_CLOSE */

.day-close-date {
    margin: 8px 0;
    font-size: 20px;
    font-weight: 700;
}

.day-close-status-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.day-close-status-row h2 {
    margin-top: 0;
}

.day-close-summary {
    display: grid;
    grid-template-columns: repeat(
        auto-fit,
        minmax(150px, 1fr)
    );
    gap: 14px;
    margin-top: 18px;
}

.day-close-value {
    padding: 14px;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.day-close-value span {
    display: block;
    margin-bottom: 6px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.day-close-value strong {
    display: block;
    font-size: 20px;
}

.alert-success {
    background: #f0f8f2;
    border: 1px solid #b8ddc2;
}

@media (max-width: 640px) {
    .day-close-summary {
        grid-template-columns: 1fr 1fr;
    }
}


/* ACCOUNTING_CNC_DAY_CLOSE */

.accounting-close-list {
  display: grid;
  gap: 1rem;
}

.accounting-close-card {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  background: white;
}

.accounting-close-card > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.accounting-close-card span {
  font-size: 0.9rem;
}

.day-close-detail-card,
.accepted-close-summary,
.readonly-confirmation {
  padding: 1rem;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: white;
}

.day-close-detail-card {
  margin-bottom: 1rem;
}

.day-close-detail-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid #eeeeee;
}

.day-close-detail-row:last-child {
  border-bottom: 0;
}

.day-close-notes {
  padding-top: 1rem;
}

.day-close-notes p {
  margin-bottom: 0;
}

.accounting-accept-form {
  margin-top: 1rem;
}

.readonly-confirmation {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 1rem;
}

.readonly-confirmation strong {
  font-size: 1.4rem;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  border: 1px solid #d8d8d8;
  border-radius: 10px;
  background: white;
}

@media (max-width: 760px) {
  .accounting-close-card {
    grid-template-columns: 1fr;
  }

  .day-close-detail-row {
    flex-direction: column;
    gap: 0.25rem;
  }
}


/* MAIN_GODOWN_PHYSICAL_CLOSE */

.godown-close-card {
    margin-top: 1rem;
}

.godown-close-instruction {
    margin-bottom: 1rem;
}

.godown-close-table-wrap {
    width: 100%;
    overflow-x: auto;
    margin: 1rem 0;
}

.godown-close-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.godown-close-table th,
.godown-close-table td {
    padding: 0.85rem;
    border: 1px solid #e4e7ec;
    text-align: center;
    vertical-align: middle;
}

.godown-close-table thead th {
    font-weight: 700;
}

.godown-close-table tbody th {
    min-width: 190px;
    text-align: left;
}

.godown-close-table tbody th small {
    display: block;
    margin-top: 0.25rem;
    font-weight: 400;
}

.godown-stock-input {
    width: 90px;
    max-width: 100%;
    box-sizing: border-box;
    padding: 0.7rem;
    font-size: 18px;
    text-align: center;
}

.godown-close-warning {
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #d8d8d8;
    border-radius: 8px;
}

@media (max-width: 640px) {
    .godown-close-table th,
    .godown-close-table td {
        padding: 0.6rem;
    }

    .godown-close-table tbody th {
        min-width: 145px;
    }

    .godown-stock-input {
        width: 72px;
        min-height: 48px;
        font-size: 18px;
    }
}


/* MANAGER_GODOWN_RECONCILIATION */

.manager-recon-summary {
    display: grid;
    grid-template-columns: repeat(
        4,
        minmax(130px, 1fr)
    );
    gap: 1rem;
    margin: 1rem 0;
}

.manager-recon-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.manager-recon-card {
    margin: 0;
}

.manager-recon-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.manager-recon-heading h2 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.manager-recon-values {
    display: grid;
    grid-template-columns: repeat(
        3,
        minmax(120px, 1fr)
    );
    gap: 1rem;
    margin: 1rem 0;
}

.manager-recon-values > div {
    padding: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.manager-recon-values span {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.85rem;
}

.manager-recon-values strong {
    font-size: 1.5rem;
}

.manager-recon-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 0.75rem 0;
}

.manager-recon-notes {
    padding: 1rem;
    margin: 0.75rem 0;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.manager-recon-notes p {
    margin-bottom: 0;
}

.manager-recon-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.manager-verify-form,
.manager-correction-panel {
    padding: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.manager-verify-form textarea,
.manager-correction-panel textarea,
.manager-correction-panel input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 0.4rem;
    margin-bottom: 0.75rem;
}

.manager-correction-panel summary {
    cursor: pointer;
    font-weight: 700;
}

@media (max-width: 760px) {
    .manager-recon-summary {
        grid-template-columns: 1fr 1fr;
    }

    .manager-recon-values {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .manager-recon-actions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .manager-recon-values {
        grid-template-columns: 1fr;
    }
}


/* MANAGER_DAY_AUDIT */

.manager-audit-section {
    margin-bottom: 1rem;
}

.manager-audit-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.manager-section-label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.manager-opening-source {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    margin: 1rem 0;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.manager-opening-table th,
.manager-opening-table td {
    white-space: nowrap;
}

.manager-opening-rule {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #e4e7ec;
    border-radius: 8px;
}

.manager-opening-rule p {
    margin-bottom: 0;
}

.manager-audit-future {
    opacity: 0.75;
}

/* Plain-language operational screens */
.page-intro,.work-card-heading,.action-row{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.eyebrow{font-size:.75rem;font-weight:800;letter-spacing:.12em;color:#52606d}.date-filter,.friendly-form,.inline-action{display:flex;gap:1rem;flex-wrap:wrap;align-items:end}.date-filter label,.friendly-form label,.inline-action label{display:grid;gap:.35rem;font-weight:650}.friendly-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.friendly-form .wide-field,.advanced-fields{grid-column:1/-1}.advanced-fields{padding:.8rem;border:1px solid #d9e2ec;border-radius:8px}.notice{padding:1rem 1.2rem;border-radius:9px;margin:1rem 0}.notice-success{background:#e8f7ee;color:#17633a}.notice-error{background:#fff0f0;color:#9b1c1c}.step-help,.next-action,.result-box,.blocker-box{padding:1rem;border-radius:8px;background:#f5f7fa}.work-card{border:1px solid #d9e2ec;border-radius:12px;padding:1.1rem;margin:1rem 0}.work-card-heading span{display:block;color:#52606d;margin-top:.2rem}.work-card-details,.summary-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:1rem 0}.work-card-details div,.summary-card{display:grid;gap:.25rem;padding:1rem;background:#f5f7fa;border-radius:9px}.work-card-details span,.summary-card span{font-size:.85rem;color:#52606d}.summary-card strong,.amount-large{font-size:1.35rem}.friendly-status{padding:.45rem .7rem;border-radius:999px;background:#eef2f6;font-weight:700}.status-paid,.status-fulfilled{background:#e8f7ee;color:#17633a}.status-submitted{background:#fff5d6;color:#765b00}.numbered-card{display:grid;grid-template-columns:44px 1fr;gap:1rem}.step-number{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:#143d66;color:white;font-weight:800}.blocker-box{background:#fff5d6}.workspace-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.workspace-links a{display:grid;gap:.25rem;padding:1rem;border:1px solid #d9e2ec;border-radius:10px;text-decoration:none}.workspace-links span{color:#52606d}.audit-guide li{margin:.55rem 0}.pending-text{color:#765b00;font-weight:700}
@media(max-width:720px){.page-intro,.work-card-heading{display:grid}.friendly-form,.work-card-details,.summary-grid,.workspace-links{grid-template-columns:1fr}.numbered-card{grid-template-columns:1fr}.date-filter,.inline-action{align-items:stretch;display:grid}.button{width:100%}}
.header-home-button{margin-left:auto;color:white;border:1px solid rgba(255,255,255,.65);border-radius:8px;padding:.6rem 1rem;text-decoration:none;font-weight:750}.department-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;margin:1rem 0}.department-grid button{text-align:left;padding:1rem;border:1px solid #d9e2ec;border-radius:10px;background:white;cursor:pointer}.department-grid button:hover{border-color:#2474b5;background:#f2f8fd}.department-grid span,.department-grid small,.overview-total span,.overview-total small{display:block;color:#52606d}.department-grid strong,.overview-total strong{display:block;font-size:1.3rem;margin:.3rem 0}.overview-total{text-align:right}@media(max-width:720px){.department-grid{grid-template-columns:1fr}.overview-total{text-align:left}}
.account-department{border:1px solid #d9e2ec;border-radius:9px;margin:.8rem 0;padding:.85rem}.account-department summary{display:flex;justify-content:space-between;gap:1rem;cursor:pointer}.opening-stock-card{border-left:5px solid #2474b5}
.manager-receive-cash{margin:1rem 0;padding:1rem;border:2px solid #2474b5;border-radius:10px;background:#f2f8fd}
.stock-location-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.stock-location{margin:0}@media(max-width:720px){.stock-location-grid{grid-template-columns:1fr}}

@media (max-width: 760px) {
    .manager-audit-section-heading {
        flex-direction: column;
    }

    .manager-opening-source {
        flex-direction: column;
    }
}


/* ==========================================================
   FINAL PRODUCTION UI FOUNDATION
   ========================================================== */

:root {
    --app-navy: #123a63;
    --app-navy-deep: #0b2947;
    --app-blue: #1f6fb2;
    --app-blue-soft: #edf5fc;

    --app-bg: #f3f6f9;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;

    --app-text: #182230;
    --app-text-soft: #607083;

    --app-border: #dce3ea;
    --app-border-strong: #c9d3dd;

    --app-success: #18794e;
    --app-success-bg: #eaf7f0;

    --app-warning: #8a6116;
    --app-warning-bg: #fff7df;

    --app-danger: #a43131;
    --app-danger-bg: #fff0f0;

    --app-radius-sm: 7px;
    --app-radius: 11px;
    --app-radius-lg: 15px;

    --app-shadow:
        0 1px 2px rgba(16, 24, 40, 0.04),
        0 4px 12px rgba(16, 24, 40, 0.04);
}


/* ---------- document ---------- */

html {
    min-height: 100%;
    background: var(--app-bg);
    color: var(--app-text);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--app-bg);
    color: var(--app-text);
    line-height: 1.5;
}

a {
    color: var(--app-blue);
}

a:hover {
    color: var(--app-navy);
}

h1,
h2,
h3,
h4 {
    color: var(--app-text);
    line-height: 1.22;
}

h1 {
    letter-spacing: -0.025em;
}

h2 {
    letter-spacing: -0.015em;
}

.muted {
    color: var(--app-text-soft);
}


/* ---------- application header ---------- */

.app-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background:
        linear-gradient(
            135deg,
            var(--app-navy-deep),
            var(--app-navy)
        );
    border-bottom: 0;
    box-shadow:
        0 2px 8px rgba(11, 41, 71, 0.16);
}

.app-header__inner {
    max-width: 1380px;
    min-height: 70px;
    margin: 0 auto;
    padding: 10px 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.app-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    text-decoration: none;
}

.app-brand:hover {
    color: #ffffff;
}

.app-brand__mark {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 43px;
    height: 43px;

    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 11px;

    background: rgba(255, 255, 255, 0.12);

    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.06em;
}

.app-brand__text {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.app-brand__text strong {
    color: #ffffff;
    font-size: 17px;
    line-height: 1.25;
}

.app-brand__text small {
    color: rgba(255, 255, 255, 0.72);
    font-size: 12px;
}

.app-header__session {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-user {
    display: grid;
    gap: 1px;
    text-align: right;
}

.header-user__name {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.header-user__meta {
    color: rgba(255, 255, 255, 0.68);
    font-size: 11px;
}

.header-home-button {
    margin-left: 0;
    padding: 8px 13px;

    border:
        1px solid rgba(255, 255, 255, 0.38);
    border-radius: 8px;

    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;

    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.header-home-button:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}


/* ---------- page ---------- */

.app-main {
    width: 100%;
    max-width: 1380px;
    flex: 1;

    margin: 0 auto;
    padding: 30px 24px 50px;
}

.app-main > .card + .card,
.app-main > section + section {
    margin-top: 18px;
}

.page-heading {
    align-items: center;
    margin-bottom: 22px;
}

.page-heading h1 {
    margin: 0 0 4px;
    font-size: clamp(25px, 3vw, 34px);
}

.page-heading p {
    margin-top: 5px;
    margin-bottom: 0;
    color: var(--app-text-soft);
}


/* ---------- surfaces ---------- */

.card,
.panel,
.form-card,
.day-close-detail-card,
.accepted-close-summary,
.readonly-confirmation {
    border: 1px solid var(--app-border);
    border-radius: var(--app-radius-lg);
    background: var(--app-surface);
    box-shadow: var(--app-shadow);
}

.card {
    padding: 22px;
}

.panel {
    padding: 22px;
}

.card > :first-child,
.panel > :first-child {
    margin-top: 0;
}

.card > :last-child,
.panel > :last-child {
    margin-bottom: 0;
}

.section-divider {
    border-color: var(--app-border);
}


/* ---------- buttons ---------- */

.button,
button {
    min-height: 40px;

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

    background: var(--app-surface);
    color: var(--app-text);

    padding: 9px 15px;

    font: inherit;
    font-size: 14px;
    font-weight: 700;

    cursor: pointer;

    transition:
        background 120ms ease,
        border-color 120ms ease,
        box-shadow 120ms ease,
        transform 80ms ease;
}

a.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.button:hover,
button:hover {
    border-color: #aebbc8;
    background: #f8fafc;
}

.button:active,
button:active {
    transform: translateY(1px);
}

.button:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(31, 111, 178, 0.22);
    outline-offset: 2px;
}

.button-primary,
button.button-primary {
    border-color: var(--app-blue);
    background: var(--app-blue);
    color: #ffffff;
}

.button-primary:hover,
button.button-primary:hover {
    border-color: #195f99;
    background: #195f99;
    color: #ffffff;
}

.button:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: 0.52;
    transform: none;
}


/* ---------- form controls ---------- */

input,
select,
textarea {
    border: 1px solid var(--app-border-strong);
    border-radius: 8px;
    background: #ffffff;
    color: var(--app-text);
    font: inherit;
}

input,
select {
    min-height: 42px;
}

input,
select,
textarea {
    padding: 9px 11px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(31, 111, 178, 0.15);
    outline-offset: 0;
    border-color: var(--app-blue);
}

input[readonly],
input:disabled,
select:disabled,
textarea:disabled {
    background: #f3f5f7;
    color: #59697a;
}

label {
    color: #344254;
}

.form-stack {
    gap: 16px;
}

.form-stack label {
    gap: 6px;
}

.form-note {
    color: var(--app-text-soft);
}


/* ---------- alerts / notices ---------- */

.alert,
.notice {
    border-radius: 9px;
}

.alert-success,
.notice-success {
    border: 1px solid #b8dfc9;
    background: var(--app-success-bg);
    color: var(--app-success);
}

.alert-error,
.notice-error {
    border: 1px solid #efc0c0;
    background: var(--app-danger-bg);
    color: var(--app-danger);
}

.godown-close-warning,
.blocker-box {
    border-color: #ead59b;
    background: var(--app-warning-bg);
    color: #664a12;
}


/* ---------- status ---------- */

.role-badge,
.status-badge,
.friendly-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: fit-content;

    border: 1px solid #d5e0ea;
    border-radius: 999px;

    background: #edf3f8;
    color: #365069;

    padding: 5px 9px;

    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 0.025em;
}

.status-paid,
.status-fulfilled {
    border-color: #b8dfc9;
    background: var(--app-success-bg);
    color: var(--app-success);
}

.status-submitted {
    border-color: #ead59b;
    background: var(--app-warning-bg);
    color: var(--app-warning);
}


/* ---------- tables ---------- */

.table-scroll,
.godown-close-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
}

.data-table,
.godown-close-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;

    background: var(--app-surface);

    font-size: 14px;
}

.data-table th,
.data-table td,
.godown-close-table th,
.godown-close-table td {
    border-width: 0 0 1px 0;
    border-style: solid;
    border-color: var(--app-border);

    padding: 11px 12px;
    vertical-align: middle;
}

.data-table thead th,
.godown-close-table thead th {
    background: #f5f8fb;
    color: #445468;

    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.data-table tbody tr:hover,
.godown-close-table tbody tr:hover {
    background: #fafcfd;
}

.data-table tbody tr:last-child td,
.godown-close-table tbody tr:last-child td,
.godown-close-table tbody tr:last-child th {
    border-bottom: 0;
}


/* ---------- dashboard / workspace ---------- */

.dashboard-heading h1 {
    margin-top: 0;
}

.workspace-links {
    gap: 12px;
}

.workspace-links a {
    min-height: 92px;

    border-color: var(--app-border);
    border-radius: 11px;

    background: var(--app-surface);

    padding: 16px;

    transition:
        border-color 120ms ease,
        box-shadow 120ms ease,
        transform 120ms ease;
}

.workspace-links a:hover {
    border-color: #9bbbd6;
    box-shadow:
        0 5px 16px rgba(18, 58, 99, 0.08);
    transform: translateY(-1px);
}

.workspace-links strong {
    color: var(--app-text);
    font-size: 16px;
}

.workspace-links span {
    color: var(--app-text-soft);
    font-size: 13px;
}


/* ---------- summary cards ---------- */

.summary-grid,
.day-close-summary {
    gap: 12px;
}

.summary-card,
.day-close-value {
    border: 1px solid var(--app-border);
    border-radius: 10px;
    background: var(--app-surface-soft);
}

.summary-card span,
.day-close-value span {
    color: var(--app-text-soft);
}

.summary-card strong,
.day-close-value strong {
    color: var(--app-text);
}


/* ---------- operational cards ---------- */

.work-card {
    border-color: var(--app-border);
    border-radius: 11px;
    background: var(--app-surface);
}

.result-box,
.next-action,
.step-help {
    background: var(--app-surface-soft);
}

.step-number {
    background: var(--app-navy);
}


/* ---------- empty states ---------- */

.empty-state {
    border: 1px dashed var(--app-border-strong);
    border-radius: 11px;
    background: var(--app-surface-soft);
    color: var(--app-text-soft);
}

.empty-state h2 {
    color: var(--app-text);
}


/* ---------- login ---------- */

.login-wrap {
    max-width: 430px;
    margin: 55px auto;
}

.login-card {
    padding: 30px;
}

.login-card h1 {
    font-size: 28px;
}


/* ---------- footer ---------- */

.app-footer {
    color: #788797;
    font-size: 11px;
}

.app-footer__inner {
    max-width: 1380px;
    margin: 0 auto;
    padding: 18px 24px 24px;
    text-align: center;
}


/* ---------- mobile ---------- */

@media (max-width: 760px) {

    .app-header__inner {
        min-height: 62px;
        padding: 8px 14px;
    }

    .app-brand {
        gap: 9px;
    }

    .app-brand__mark {
        width: 38px;
        height: 38px;
        border-radius: 9px;
        font-size: 11px;
    }

    .app-brand__text strong {
        font-size: 14px;
    }

    .app-brand__text small {
        display: none;
    }

    .header-user {
        display: none;
    }

    .header-home-button {
        padding: 8px 11px;
    }

    .app-main {
        padding:
            20px
            14px
            38px;
    }

    .card,
    .panel {
        padding: 17px;
        border-radius: 12px;
    }

    .page-heading {
        align-items: stretch;
    }

    .page-heading h1 {
        font-size: 27px;
    }

    .dashboard-heading {
        display: grid;
        gap: 16px;
    }

    .dashboard-heading form {
        width: 100%;
    }

    .dashboard-heading .button {
        width: 100%;
    }

    .input-action-row {
        display: grid;
    }

    .input-action-row .button {
        width: 100%;
    }

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

    .app-footer__inner {
        padding:
            14px
            14px
            20px;
    }
}


/* Keep the Godown camera screen large and touch-friendly. */

@media (max-width: 640px) {

    .godown-scan-panel {
        max-width: none;
    }

    .godown-camera-actions .button {
        min-height: 52px;
    }

    .godown-qr-input {
        min-height: 52px;
        font-size: 18px;
    }
}


/* ==========================================================
   FINAL ROLE-AWARE HOME DASHBOARD
   ========================================================== */

.dashboard-welcome {
    padding: 24px 26px;
}

.dashboard-welcome .dashboard-heading {
    margin-bottom: 18px;
}

.dashboard-welcome h1 {
    margin: 4px 0 3px;
}

.eyebrow {
    display: block;

    margin-bottom: 5px;

    color: var(--app-blue);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.09em;
}

.dashboard-session-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;

    padding-top: 16px;

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

.dashboard-session-line .status-row {
    margin: 0;
}

.dashboard-session-line .role-list {
    margin: 0;
}

.dashboard-workspace {
    padding: 0;
    overflow: hidden;
}

.workspace-heading {
    padding: 24px 26px 20px;
    border-bottom: 1px solid var(--app-border);
}

.workspace-heading h2 {
    margin: 2px 0 4px;
    font-size: 24px;
}

.workspace-heading p {
    margin: 0;
}

.workspace-sections {
    display: grid;
}

.workspace-group {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 24px;

    padding: 22px 26px;

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

.workspace-group:last-child {
    border-bottom: 0;
}

.workspace-group__heading {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding-top: 3px;
}

.workspace-group__number {
    flex: 0 0 auto;

    display: grid;
    place-items: center;

    width: 31px;
    height: 31px;

    border-radius: 8px;

    background: var(--app-blue-soft);
    color: var(--app-blue);

    font-size: 11px;
    font-weight: 800;
}

.workspace-group__heading > div {
    display: grid;
    gap: 4px;
}

.workspace-group__heading strong {
    color: var(--app-text);
    font-size: 15px;
}

.workspace-group__heading small {
    max-width: 180px;

    color: var(--app-text-soft);
    font-size: 12px;
    line-height: 1.4;
}

.workspace-group .workspace-links {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.workspace-group .workspace-links a {
    min-height: 82px;
    margin: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
}

.workspace-group-manager {
    background: #fbfcfe;
}

@media (max-width: 900px) {

    .workspace-group {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .workspace-group__heading small {
        max-width: none;
    }
}

@media (max-width: 640px) {

    .dashboard-welcome,
    .workspace-heading,
    .workspace-group {
        padding-left: 17px;
        padding-right: 17px;
    }

    .dashboard-session-line {
        align-items: flex-start;
        flex-direction: column;
    }

    .workspace-group .workspace-links {
        grid-template-columns: 1fr;
    }

    .workspace-group .workspace-links a {
        min-height: 76px;
    }
}


/* ==========================================================
   FINAL CNC COUNTER WORKSTATION
   ========================================================== */

.cnc-workstation {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cnc-page-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.cnc-page-topbar h1 {
    margin: 2px 0 2px;
    font-size: 1.55rem;
}

.cnc-date-label {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 9px;
    border-radius: 7px;
    background: #eaf2fb;
    color: #123a63;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .04em;
}

.cnc-page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.cnc-search-strip {
    padding: 10px 14px;
    border: 1px solid var(--border, #dbe3ec);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(18, 58, 99, .05);
}

.cnc-company-search {
    display: grid;
    grid-template-columns: 130px minmax(300px, 620px);
    align-items: center;
    gap: 12px;
}

.cnc-company-search > label {
    font-size: .84rem;
    font-weight: 800;
    color: #31475d;
}

.cnc-search-control {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.cnc-search-control input {
    min-height: 42px;
}

.cnc-final-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cnc-two-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    min-height: 360px;
}

.cnc-entry-panel,
.cnc-result-panel {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--border, #dbe3ec);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(18, 58, 99, .06);
}

.cnc-result-panel {
    background: #fbfdff;
}

.cnc-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e7edf3;
}

.cnc-panel-heading > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.cnc-panel-heading h2 {
    margin: 0;
    font-size: 1rem;
}

.cnc-panel-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 8px;
    background: #123a63;
    color: #fff;
    font-size: .72rem;
    font-weight: 800;
}

.cnc-panel-hint {
    color: #6d7f90;
    font-size: .75rem;
    font-weight: 700;
}

.cnc-entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
}

.cnc-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cnc-field-wide {
    grid-column: 1 / -1;
}

.cnc-field > span,
.cnc-notes-line > span {
    color: #42566a;
    font-size: .78rem;
    font-weight: 800;
}

.cnc-field input,
.cnc-field select {
    min-height: 40px;
}

.cnc-field input[readonly] {
    background: #f5f7fa;
    color: #4d6072;
}

.cnc-amount-input {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: center;
    overflow: hidden;
    border: 1px solid #cfd9e3;
    border-radius: 9px;
    background: #fff;
}

.cnc-amount-input > span {
    text-align: center;
    color: #123a63;
    font-weight: 900;
}

.cnc-amount-input input {
    width: 100%;
    border: 0 !important;
    border-left: 1px solid #e1e7ed !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.cnc-result-section-title {
    margin: 2px 0 8px;
    color: #123a63;
    font-size: .74rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.cnc-customer-result {
    padding-bottom: 12px;
    border-bottom: 1px solid #e5ebf1;
}

.cnc-booking-result {
    padding-top: 12px;
}

.cnc-result-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 5px 0;
}

.cnc-result-row span {
    color: #687b8d;
    font-size: .78rem;
}

.cnc-result-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    color: #1f3448;
    font-size: .86rem;
}

.cnc-result-ok,
.cnc-booking-status-line {
    margin-top: 7px;
    padding: 7px 9px;
    border-radius: 8px;
    background: #edf8f2;
    color: #17613d;
    font-size: .78rem;
    font-weight: 800;
}

.cnc-result-warning {
    margin-top: 7px;
    padding: 9px 10px;
    border: 1px solid #f0d9a6;
    border-radius: 8px;
    background: #fff8e9;
    color: #75520d;
    font-size: .8rem;
    line-height: 1.4;
}

.cnc-live-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: 5px;
    border-radius: 50%;
    background: currentColor;
}

.cnc-result-checked {
    margin-top: 8px;
    color: #7a8b9b;
    font-size: .7rem;
}

.cnc-result-empty {
    display: flex;
    min-height: 260px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px;
    text-align: center;
    color: #687b8d;
}

.cnc-result-empty strong {
    color: #263d53;
    font-size: 1rem;
}

.cnc-result-empty p {
    max-width: 390px;
    margin: 7px 0 0;
    font-size: .82rem;
    line-height: 1.45;
}

.cnc-result-empty-icon {
    display: flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    border-radius: 12px;
    background: #eaf2fb;
    color: #123a63;
    font-size: 1.3rem;
    font-weight: 900;
}

.cnc-bottom-entry {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    align-items: end;
    gap: 12px;
    padding: 11px 14px;
    border: 1px solid var(--border, #dbe3ec);
    border-radius: 12px;
    background: #fff;
}

.cnc-notes-line {
    display: grid;
    grid-template-columns: 52px 1fr;
    align-items: center;
    gap: 8px;
}

.cnc-notes-line input {
    min-height: 40px;
}

.cnc-generate-button {
    width: 100%;
    min-height: 42px;
    font-weight: 900;
}

.cnc-generate-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.cnc-compact-alert {
    margin: 0;
}

/* CNC combined daily report */

.cnc-report-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0;
}

.cnc-report-stat {
    padding: 11px 14px;
    border: 1px solid #dbe3ec;
    border-radius: 11px;
    background: #fff;
}

.cnc-report-stat span {
    display: block;
    margin-bottom: 3px;
    color: #6b7e90;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.cnc-report-stat strong {
    color: #173a5e;
    font-size: 1.08rem;
}

.cnc-report-card {
    padding: 0;
    overflow: hidden;
}

.cnc-report-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cnc-report-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    white-space: nowrap;
}

.cnc-report-table th {
    padding: 9px 10px;
    background: #eef4f9;
    color: #40566c;
    font-size: .7rem;
    font-weight: 900;
    text-align: left;
    text-transform: uppercase;
}

.cnc-report-table td {
    padding: 9px 10px;
    border-top: 1px solid #e8edf2;
    color: #2c4054;
    font-size: .78rem;
}

.cnc-report-table tbody tr:hover {
    background: #f8fbfe;
}

.cnc-money {
    font-weight: 900;
}

.cnc-status {
    display: inline-flex;
    padding: 3px 7px;
    border-radius: 999px;
    background: #eef2f5;
    color: #465a6e;
    font-size: .67rem;
    font-weight: 900;
}

.cnc-status-valid,
.cnc-status-completed {
    background: #eaf7ef;
    color: #17613d;
}

.cnc-status-cancelled {
    background: #fbecec;
    color: #9a2f2f;
}

.cnc-open-token {
    color: #145d9c;
    font-size: .76rem;
    font-weight: 900;
    text-decoration: none;
}

.cnc-open-token:hover {
    text-decoration: underline;
}

@media (max-width: 1000px) {
    .cnc-two-panel {
        grid-template-columns: 1fr;
    }

    .cnc-company-search {
        grid-template-columns: 1fr;
    }

    .cnc-report-summary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 700px) {
    .cnc-page-topbar {
        flex-direction: column;
    }

    .cnc-page-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .cnc-search-control {
        grid-template-columns: 1fr;
    }

    .cnc-entry-grid {
        grid-template-columns: 1fr;
    }

    .cnc-field-wide {
        grid-column: auto;
    }

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

    .cnc-notes-line {
        grid-template-columns: 1fr;
    }

    .cnc-report-summary {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================
   FINAL GODOWN #2 MOBILE WORKSTATION
   ========================================================== */

.godown2-mobile {
    width: 100%;
    max-width: 620px;
    margin: 0 auto;
}

.godown2-mobile-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.godown2-mobile-header h1 {
    margin: 2px 0 4px;
    font-size: 1.65rem;
}

.godown2-mobile-header p {
    margin: 0;
    color: #667085;
    line-height: 1.4;
}

.godown2-eyebrow,
.godown2-card-label {
    color: #123a63;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .09em;
}

.godown2-home-link {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: white;
    color: #344054;
    text-decoration: none;
    font-weight: 700;
}

.godown2-scanner-card,
.godown2-product-card,
.godown2-details-card,
.godown2-handover-card {
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: white;
    overflow: hidden;
}

.godown2-scanner-card {
    padding: 14px;
}

.godown2-camera-status {
    margin-bottom: 12px;
    text-align: center;
    color: #475467;
    font-size: 14px;
    font-weight: 700;
}

.godown2-camera-container {
    width: 100%;
    max-width: none;
    margin: 0 0 12px;
    border-radius: 14px;
}

.godown2-camera-video {
    width: 100%;
    min-height: 360px;
    max-height: 62vh;
    object-fit: cover;
}

.godown2-camera-frame {
    width: min(68%, 280px);
    border-width: 4px;
    border-radius: 18px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, .18);
}

.godown2-camera-actions {
    margin: 0;
}

.godown2-scan-button,
.godown2-stop-button,
.godown2-manual-button,
.godown2-handover-button,
.godown2-next-button {
    width: 100%;
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 800;
    text-align: center;
}

.godown2-scan-button {
    min-height: 66px;
    font-size: 19px;
    text-transform: uppercase;
    letter-spacing: .025em;
}

.godown2-manual {
    margin-top: 12px;
    padding: 0 14px;
    border: 1px solid #e4e7ec;
    border-radius: 12px;
    background: #fff;
}

.godown2-manual summary {
    padding: 15px 0;
    cursor: pointer;
    color: #475467;
    font-size: 14px;
    font-weight: 700;
}

.godown2-manual .godown-manual-form {
    margin: 0;
    padding: 0 0 14px;
}

.godown2-manual .godown-qr-input {
    max-width: none;
    min-height: 52px;
}

.godown2-safety-note {
    display: grid;
    gap: 3px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    color: #475467;
    font-size: 13px;
}

.godown2-alert {
    display: grid;
    gap: 5px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 12px;
}

.godown2-alert-error {
    border: 1px solid #f1aeb5;
    background: #fff1f2;
    color: #8a1c2c;
}


/* Token / handover */

.godown2-token-screen {
    display: grid;
    gap: 12px;
}

.godown2-status-hero {
    display: grid;
    justify-items: center;
    gap: 4px;
    padding: 18px 16px;
    border-radius: 16px;
    text-align: center;
}

.godown2-status-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: currentColor;
    font-size: 28px;
    font-weight: 900;
}

.godown2-status-icon::first-line {
    color: white;
}

.godown2-status-hero strong {
    font-size: 21px;
    letter-spacing: .025em;
}

.godown2-status-hero small {
    font-size: 14px;
    font-weight: 600;
}

.godown2-status-valid {
    border: 2px solid #7ac495;
    background: #edf9f1;
    color: #176b3a;
}

.godown2-status-completed {
    border: 2px solid #62ae7d;
    background: #e7f7ed;
    color: #145b32;
}

.godown2-status-cancelled {
    border: 2px solid #e28a94;
    background: #fff0f1;
    color: #9b1c31;
}

.godown2-status-neutral {
    border: 2px solid #d0d5dd;
    background: #f8fafc;
    color: #344054;
}

.godown2-product-card {
    padding: 18px;
    text-align: center;
}

.godown2-product-name {
    margin: 9px 0 16px;
    color: #101828;
    font-size: clamp(26px, 7vw, 38px);
    line-height: 1.08;
    font-weight: 900;
}

.godown2-token-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    color: #475467;
}

.godown2-token-number strong {
    color: #101828;
    font-size: 27px;
}

.godown2-details-card {
    padding: 4px 16px;
}

.godown2-detail-row {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid #eaecf0;
}

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

.godown2-detail-row span {
    color: #667085;
    font-size: 13px;
    font-weight: 700;
}

.godown2-detail-row strong {
    overflow-wrap: anywhere;
    color: #101828;
    text-align: right;
    font-size: 15px;
}

.godown2-handover-card {
    padding: 14px;
}

.godown2-handover-warning {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
    padding: 12px;
    border-radius: 10px;
    background: #fff8e7;
    color: #694b13;
    font-size: 13px;
}

.godown2-handover-button {
    min-height: 68px;
    font-size: 19px;
    text-transform: uppercase;
}

.godown2-next-button {
    text-decoration: none;
}


@media (max-width: 640px) {

    .godown2-mobile {
        max-width: none;
    }

    .godown2-mobile-header h1 {
        font-size: 1.45rem;
    }

    .godown2-mobile-header p {
        font-size: 13px;
    }

    .godown2-camera-video {
        min-height: min(56vh, 440px);
        max-height: 56vh;
    }

    .godown2-scanner-card {
        padding: 10px;
    }

    .godown2-product-card {
        padding: 16px 12px;
    }

    .godown2-status-hero {
        padding: 15px 12px;
    }

    .godown2-handover-button {
        min-height: 72px;
    }

    .godown2-next-button {
        min-height: 58px;
    }
}



/* ==========================================================
   FINAL MAIN GODOWN MOBILE PHYSICAL-CLOSE UI
   Mobile-first operational counting surface.
   Presentation only — existing form fields/workflow retained.
   ========================================================== */

@media (max-width: 760px) {

    .godown-close-card {
        padding: 16px;
    }

    .godown-close-card > h2 {
        margin:
            0
            0
            6px;

        font-size: 21px;
    }

    .godown-close-instruction {
        margin:
            0
            0
            16px;

        color: var(--app-text-soft);
        font-size: 14px;
        line-height: 1.45;
    }


    /* Turn the desktop stock table into individual
       touch-friendly cylinder cards on a phone. */

    .godown-close-table-wrap {
        overflow: visible;
    }

    .godown-close-table {
        display: block;
        width: 100%;
        border: 0;
    }

    .godown-close-table thead {
        display: none;
    }

    .godown-close-table tbody {
        display: grid;
        gap: 14px;
    }

    .godown-close-table tr {
        display: grid;
        grid-template-columns:
            repeat(3, minmax(0, 1fr));

        overflow: hidden;

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

        border-radius: 13px;

        background: var(--app-surface);

        box-shadow:
            0 1px 3px
            rgba(16, 24, 40, 0.04);
    }

    .godown-close-table th {
        grid-column: 1 / -1;

        display: block;

        padding:
            13px
            14px
            11px;

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

        background: var(--app-surface-soft);

        color: var(--app-text);

        font-size: 16px;
        font-weight: 800;
        text-align: left;
    }

    .godown-close-table th small {
        display: block;

        margin-top: 2px;

        color: var(--app-text-soft);

        font-size: 11px;
        font-weight: 650;
        letter-spacing: 0.04em;
    }

    .godown-close-table td {
        position: relative;

        display: grid;
        align-items: end;

        min-width: 0;

        padding:
            34px
            7px
            9px;

        border: 0;
        border-right:
            1px
            solid
            var(--app-border);

        background: #ffffff;

        text-align: center;
    }

    .godown-close-table td:last-child {
        border-right: 0;
    }


    /* Mobile labels correspond to the existing
       Filled / Empty / Defective column order. */

    .godown-close-table td::before {
        position: absolute;

        top: 9px;
        left: 4px;
        right: 4px;

        color: var(--app-text-soft);

        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.035em;
        line-height: 1.1;
        text-align: center;
        text-transform: uppercase;
    }

    .godown-close-table td:nth-of-type(1)::before {
        content: "FILLED";
        color: var(--app-success);
    }

    .godown-close-table td:nth-of-type(2)::before {
        content: "EMPTY";
        color: var(--app-blue);
    }

    .godown-close-table td:nth-of-type(3)::before {
        content: "DEFECTIVE";
        color: var(--app-danger);
    }


    /* Large numeric targets for physical counting. */

    .godown-close-table .godown-stock-input {
        box-sizing: border-box;

        width: 100%;
        min-width: 0;
        height: 58px;

        margin: 0;
        padding:
            6px
            3px;

        border:
            2px
            solid
            var(--app-border-strong);

        border-radius: 9px;

        background: #ffffff;

        color: var(--app-text);

        font-size: 23px;
        font-weight: 800;
        line-height: 1;
        text-align: center;

        appearance: textfield;
        -moz-appearance: textfield;
    }

    .godown-close-table
    .godown-stock-input::-webkit-inner-spin-button,
    .godown-close-table
    .godown-stock-input::-webkit-outer-spin-button {
        margin: 0;
        -webkit-appearance: none;
    }

    .godown-close-table .godown-stock-input:focus {
        outline: 3px solid rgba(31, 111, 178, 0.16);
        outline-offset: 1px;
        border-color: var(--app-blue);
    }


    /* Final safety checkpoint should be difficult
       to miss before stock counts are submitted. */

    .godown-close-warning {
        margin-top: 18px;
        padding: 14px;

        border:
            1px
            solid
            #e4c56b;

        border-radius: 11px;

        background: var(--app-warning-bg);

        color: #60460d;

        font-size: 13px;
        line-height: 1.5;
    }

    .godown-close-warning strong {
        display: block;
        margin-bottom: 3px;
        font-size: 14px;
    }

    .godown-close-card
    form > .button-primary {
        width: 100%;
        min-height: 56px;

        margin-top: 2px;

        border-radius: 10px;

        font-size: 16px;
        font-weight: 800;
    }

    .godown-close-card .form-note {
        margin-bottom: 0;

        color: var(--app-text-soft);

        font-size: 12px;
        text-align: center;
    }


    /* Already-submitted physical close:
       keep the same card treatment readable without
       requiring horizontal table scrolling. */

    .godown-close-card
    .day-close-status-row {
        display: grid;
        gap: 10px;
    }

    .godown-close-card
    .day-close-status-row
    .role-badge {
        justify-self: start;
    }
}


/* Very narrow phones: retain three physical-state
   fields while reducing spacing rather than scrolling. */

@media (max-width: 390px) {

    .godown-close-card {
        padding: 13px;
    }

    .godown-close-table tr {
        border-radius: 11px;
    }

    .godown-close-table td {
        padding:
            33px
            5px
            8px;
    }

    .godown-close-table td::before {
        font-size: 9px;
    }

    .godown-close-table .godown-stock-input {
        height: 55px;
        font-size: 21px;
    }
}


/* ==========================================================
   FINAL OPERATION DESKTOP — PLANT RECEIPT
   Desktop quantity-entry workspace.
   Presentation only — existing workflow retained.
   ========================================================== */

@media (min-width: 761px) {

    /* Give the plant receipt enough working width without
       allowing the form to become excessively stretched. */

    form[action="/operation/plant-receipt"] {
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }


    /* General section rhythm. */

    form[action="/operation/plant-receipt"] h2 {
        margin:
            2px
            0
            4px;

        font-size: 20px;
    }

    form[action="/operation/plant-receipt"] .section-divider {
        margin:
            8px
            0
            2px;
    }


    /* Date / vehicle / reference fields stay compact.
       They should not consume the whole desktop width. */

    form[action="/operation/plant-receipt"] > label {
        max-width: 620px;
    }

    form[action="/operation/plant-receipt"] > label > span {
        display: block;

        margin-bottom: 5px;

        color: var(--app-text);

        font-size: 13px;
        font-weight: 750;
    }

    form[action="/operation/plant-receipt"]
    input[type="date"],
    form[action="/operation/plant-receipt"]
    input[type="text"],
    form[action="/operation/plant-receipt"]
    select {
        min-height: 44px;
    }


    /* Plant quantity table. */

    form[action="/operation/plant-receipt"]
    .godown-close-table-wrap {
        overflow-x: auto;

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

        border-radius: 12px;

        background: var(--app-surface);
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table {
        width: 100%;
        margin: 0;

        border-collapse: separate;
        border-spacing: 0;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table thead th {
        padding:
            12px
            10px;

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

        background: var(--app-surface-soft);

        color: var(--app-text-soft);

        font-size: 11px;
        font-weight: 800;
        letter-spacing: 0.035em;
        text-transform: uppercase;
        text-align: center;
        white-space: nowrap;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table thead th:first-child {
        width: 34%;
        padding-left: 16px;
        text-align: left;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table thead th:nth-child(2) {
        color: var(--app-success);
        background: #f2faf6;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table thead th:nth-child(3) {
        color: var(--app-blue);
        background: #f3f8fc;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table thead th:nth-child(4) {
        color: var(--app-warning);
        background: #fffaf0;
    }


    /* Product rows. */

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody th,
    form[action="/operation/plant-receipt"]
    .godown-close-table tbody td {
        padding:
            9px
            10px;

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

        vertical-align: middle;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody tr:last-child th,
    form[action="/operation/plant-receipt"]
    .godown-close-table tbody tr:last-child td {
        border-bottom: 0;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody tr:hover th,
    form[action="/operation/plant-receipt"]
    .godown-close-table tbody tr:hover td {
        background: #fafcfe;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody th {
        padding-left: 16px;

        color: var(--app-text);

        font-size: 14px;
        font-weight: 750;
        text-align: left;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody th small {
        display: block;

        margin-top: 2px;

        color: var(--app-text-soft);

        font-size: 10px;
        font-weight: 650;
        letter-spacing: 0.035em;
    }

    form[action="/operation/plant-receipt"]
    .godown-close-table tbody td {
        width: 22%;
        text-align: center;
    }


    /* Fast quantity entry. */

    form[action="/operation/plant-receipt"]
    .godown-stock-input {
        box-sizing: border-box;

        width: 112px;
        height: 44px;

        margin: 0 auto;
        padding: 5px 8px;

        border:
            2px
            solid
            var(--app-border);

        border-radius: 8px;

        background: #ffffff;

        color: var(--app-text);

        font-size: 17px;
        font-weight: 750;
        text-align: center;
    }

    form[action="/operation/plant-receipt"]
    td:nth-child(2)
    .godown-stock-input {
        border-color: #a9d7bf;
        background: #fbfefc;
    }

    form[action="/operation/plant-receipt"]
    td:nth-child(3)
    .godown-stock-input {
        border-color: #b7d4eb;
        background: #fcfdff;
    }

    form[action="/operation/plant-receipt"]
    td:nth-child(4)
    .godown-stock-input {
        border-color: #e4cf96;
        background: #fffdf8;
    }

    form[action="/operation/plant-receipt"]
    .godown-stock-input:focus {
        outline:
            3px
            solid
            rgba(31, 111, 178, 0.13);

        outline-offset: 1px;

        border-color: var(--app-blue);
        background: #ffffff;
    }


    /* One-way explanation stays immediately below the
       quantity grid and visually distinct from stock input. */

    form[action="/operation/plant-receipt"]
    .godown-close-warning {
        margin-top: 4px;
        padding:
            12px
            14px;

        border:
            1px
            solid
            #e4cf96;

        border-radius: 9px;

        background: var(--app-warning-bg);

        color: #60460d;

        font-size: 13px;
    }


    /* Notes are useful but secondary. */

    form[action="/operation/plant-receipt"]
    textarea[name="notes"] {
        min-height: 78px;
        resize: vertical;
    }


    /* Final record action. */

    form[action="/operation/plant-receipt"]
    > .button-primary {
        width: auto;
        min-width: 230px;
        min-height: 48px;

        padding:
            10px
            24px;

        font-size: 15px;
        font-weight: 800;
    }

    form[action="/operation/plant-receipt"]
    > .form-note {
        margin-top: -4px;

        color: var(--app-text-soft);

        font-size: 12px;
    }
}


/* Operation plant receipt — fixed current business date. */

.operation-business-date {
    display: grid;
    gap: 3px;

    max-width: 620px;
    padding: 12px 14px;

    border: 1px solid var(--app-border);
    border-radius: 9px;

    background: var(--app-surface-soft);
}

.operation-business-date > span {
    color: var(--app-text-soft);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.operation-business-date > strong {
    color: var(--app-text);

    font-size: 18px;
    font-weight: 800;
}

.operation-business-date > small {
    color: var(--app-text-soft);
    font-size: 12px;
}


/* ==========================================================
   FINAL MECHANIC DESKTOP UI
   Presentation only — existing workflow remains unchanged.
   ========================================================== */

@media (min-width: 761px) {

    .mechanic-page-intro {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 28px;
    }

    .mechanic-page-intro > div {
        flex: 1;
        min-width: 0;
    }

    .mechanic-page-intro .date-filter {
        flex: 0 0 auto;

        display: flex;
        align-items: flex-end;
        gap: 8px;

        margin: 0;
        padding: 10px 12px;

        border: 1px solid var(--app-border);
        border-radius: 10px;

        background: var(--app-surface-soft);
    }

    .mechanic-page-intro .date-filter label {
        margin: 0;
        min-width: 165px;

        font-size: 12px;
        font-weight: 750;
    }

    .mechanic-page-intro .date-filter input {
        min-height: 40px;
        margin-top: 4px;
    }


    /* ---------- CREATE ESTIMATE ---------- */

    .mechanic-estimate-card {
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }

    .mechanic-estimate-card > h2 {
        margin-bottom: 4px;
    }

    .mechanic-estimate-card .step-help {
        margin-top: 0;
        margin-bottom: 18px;

        color: var(--app-text-soft);
    }

    .mechanic-estimate-form {
        display: grid;
        grid-template-columns:
            minmax(190px, 0.9fr)
            minmax(220px, 1.15fr)
            minmax(220px, 1.15fr);
        gap: 15px 18px;
        align-items: end;
    }

    .mechanic-estimate-form > label {
        display: grid;
        gap: 5px;

        margin: 0;

        font-size: 12px;
        font-weight: 750;
    }

    .mechanic-estimate-form input,
    .mechanic-estimate-form select {
        box-sizing: border-box;

        width: 100%;
        min-height: 44px;

        font-size: 14px;
    }

    /* Product deserves more width. */

    .mechanic-estimate-form > label:nth-of-type(4) {
        grid-column: span 2;
    }

    /* Quantity stays compact. */

    .mechanic-estimate-form > label:nth-of-type(5) {
        max-width: 160px;
    }

    .mechanic-estimate-form
    input[name="quantity"] {
        max-width: 150px;

        font-size: 17px;
        font-weight: 750;
        text-align: center;
    }

    /* Money is the most important entry after product. */

    .mechanic-estimate-form
    input[name="estimated_amount"] {
        font-size: 17px;
        font-weight: 800;
    }


    /* Regulator-specific controls remain secondary. */

    .mechanic-estimate-form .advanced-fields {
        grid-column: 1 / -1;

        padding: 11px 14px;

        border: 1px solid var(--app-border);
        border-radius: 9px;

        background: var(--app-surface-soft);
    }

    .mechanic-estimate-form
    .advanced-fields summary {
        cursor: pointer;

        font-size: 13px;
        font-weight: 750;
    }

    .mechanic-estimate-form
    .advanced-fields[open] {
        display: grid;
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(220px, 1fr);
        gap: 12px 18px;
    }

    .mechanic-estimate-form
    .advanced-fields[open] summary {
        grid-column: 1 / -1;
    }

    .mechanic-estimate-form
    .advanced-fields label {
        display: grid;
        gap: 5px;

        margin: 0;
    }


    /* Notes + save action. */

    .mechanic-estimate-form .wide-field {
        grid-column: 1 / -1;
    }

    .mechanic-estimate-form
    > .button-primary {
        grid-column: 1 / -1;

        justify-self: start;

        min-width: 190px;
        min-height: 47px;

        padding: 10px 22px;

        font-weight: 800;
    }


    /* ---------- REQUEST WORK QUEUE ---------- */

    .mechanic-request-list {
        max-width: 1180px;
        margin-left: auto;
        margin-right: auto;
    }

    .mechanic-request-list > h2 {
        margin-bottom: 16px;
    }

    .mechanic-request-list .work-card {
        margin-bottom: 14px;
        padding: 16px 18px;

        border: 1px solid var(--app-border);
        border-radius: 11px;

        background: var(--app-surface);
    }

    .mechanic-request-list
    .work-card-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 18px;

        padding-bottom: 12px;

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

    .mechanic-request-list
    .work-card-heading > div {
        display: grid;
        gap: 3px;
    }

    .mechanic-request-list
    .work-card-heading > div > strong {
        font-size: 16px;
    }

    .mechanic-request-list
    .work-card-heading > div > span {
        color: var(--app-text-soft);
        font-size: 12px;
    }

    .mechanic-request-list
    .friendly-status {
        flex: 0 0 auto;

        padding: 6px 10px;

        border-radius: 999px;

        font-size: 11px;
        font-weight: 800;
        white-space: nowrap;
    }


    /* Product / estimate / customer reference in one
       easily scanned horizontal information band. */

    .mechanic-request-list
    .work-card-details {
        display: grid;
        grid-template-columns:
            minmax(260px, 1.5fr)
            minmax(130px, 0.6fr)
            minmax(220px, 1fr);
        gap: 12px;

        margin-top: 12px;
    }

    .mechanic-request-list
    .work-card-details > div {
        display: grid;
        gap: 3px;

        padding: 9px 11px;

        border-radius: 8px;

        background: var(--app-surface-soft);
    }

    .mechanic-request-list
    .work-card-details span {
        color: var(--app-text-soft);

        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .mechanic-request-list
    .work-card-details strong {
        font-size: 14px;
    }

    .mechanic-request-list
    .work-card-details > div:nth-child(2) strong {
        font-size: 17px;
        font-weight: 800;
    }


    /* The next required action is visually dominant. */

    .mechanic-request-list
    .next-action {
        margin-top: 12px;
        padding: 12px 14px;

        border-left: 4px solid var(--app-blue);
        border-radius: 7px;

        background: #f6f9fc;

        font-size: 13px;
    }

    .mechanic-request-list
    .next-action > strong:first-child {
        font-weight: 800;
    }

    .mechanic-request-list
    .action-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;

        margin-top: 10px;
    }

    .mechanic-request-list
    .next-action form {
        margin-top: 10px;
        margin-bottom: 0;
    }

    .mechanic-request-list
    .action-row form {
        margin: 0;
    }

    .mechanic-request-list
    .next-action .button-primary {
        min-height: 42px;
        font-weight: 800;
    }

    .mechanic-request-list
    details {
        margin-top: 8px;
    }

    .mechanic-request-list
    .action-row details {
        margin-top: 0;
    }

    .mechanic-request-list
    details summary {
        cursor: pointer;

        color: var(--app-text-soft);

        font-size: 12px;
        font-weight: 700;
    }
}


/* Reasonable fallback if Mechanic opens the page
   on a smaller screen occasionally. */

@media (max-width: 900px) and (min-width: 761px) {

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

    .mechanic-estimate-form > label:nth-of-type(4) {
        grid-column: span 1;
    }

    .mechanic-request-list
    .work-card-details {
        grid-template-columns: 1fr 1fr;
    }

    .mechanic-request-list
    .work-card-details > div:first-child {
        grid-column: 1 / -1;
    }
}


/* ==========================================================
   MECHANIC FINAL BUSINESS-RULE UI
   ========================================================== */

.mechanic-current-date {
    flex: 0 0 auto;

    display: grid;
    gap: 3px;

    min-width: 230px;
    padding: 11px 14px;

    border: 1px solid var(--app-border);
    border-radius: 9px;

    background: var(--app-surface-soft);
}

.mechanic-current-date > span {
    color: var(--app-text-soft);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.mechanic-current-date > strong {
    color: var(--app-text);

    font-size: 18px;
    font-weight: 800;
}

.mechanic-current-date > small {
    color: var(--app-text-soft);
    font-size: 11px;
}


.mechanic-regulator-option {
    grid-column: 1 / -1;

    padding: 12px 14px;

    border: 1px solid #b7d4eb;
    border-radius: 9px;

    background: #f6fafe;
}

.mechanic-regulator-option[hidden] {
    display: none !important;
}


.mechanic-checkbox {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;

    margin: 0 !important;

    cursor: pointer;
}

.mechanic-checkbox
input[type="checkbox"] {
    flex: 0 0 auto;

    width: 20px;
    height: 20px;
    min-height: 0;

    margin-top: 2px;

    cursor: pointer;
}

.mechanic-checkbox > span {
    display: grid;
    gap: 2px;
}

.mechanic-checkbox strong {
    color: var(--app-text);

    font-size: 14px;
    font-weight: 800;
}

.mechanic-checkbox small {
    color: var(--app-text-soft);

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


.mechanic-replacement-note {
    margin-top: 10px;
    padding: 9px 11px;

    border-left: 4px solid var(--app-blue);
    border-radius: 6px;

    background: #ffffff;

    color: var(--app-text-soft);

    font-size: 12px;
    line-height: 1.45;
}

.mechanic-replacement-note[hidden] {
    display: none !important;
}


.mechanic-estimate-form
input[name="quantity"]:read-only {
    background: var(--app-surface-soft);
    cursor: not-allowed;
}


@media (min-width: 761px) {

    .mechanic-estimate-form {
        grid-template-columns:
            minmax(220px, 1fr)
            minmax(220px, 1fr)
            minmax(250px, 1.2fr);
    }

    .mechanic-estimate-form
    > label:nth-of-type(3) {
        grid-column: span 2;
    }

    .mechanic-estimate-form
    > label:nth-of-type(4) {
        grid-column: auto;
        max-width: 160px;
    }

    .mechanic-estimate-form
    > label:nth-of-type(5) {
        grid-column: auto;
    }
}


/* ==========================================================
   ACCOUNTING DESKTOP WORKSPACE
   ========================================================== */

.accounting-page-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.accounting-today {
    display: grid;
    gap: 3px;

    min-width: 215px;
    padding: 11px 14px;

    border: 1px solid var(--app-border);
    border-radius: 9px;

    background: var(--app-surface-soft);
}

.accounting-today span {
    color: var(--app-text-soft);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.accounting-today strong {
    font-size: 18px;
}

.accounting-today small {
    color: var(--app-text-soft);
}


.accounting-entry-grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(160px, 1fr));
    gap: 16px;

    align-items: end;
}

.accounting-entry-grid label {
    display: grid;
    gap: 6px;
}

.accounting-entry-grid .wide-field {
    grid-column: 1 / -1;
}


.accounting-payment-rule {
    grid-column: 1 / -1;

    display: flex;
    align-items: center;
    gap: 14px;

    padding: 10px 13px;

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

    background: var(--app-surface-soft);
}

.accounting-payment-rule strong {
    white-space: nowrap;
}

.accounting-payment-rule span {
    color: var(--app-text-soft);
    font-size: 12px;
}


.accounting-vendor-fields {
    grid-column: 1 / -1;

    display: grid;
    grid-template-columns:
        repeat(2, minmax(200px, 1fr));
    gap: 16px;
}

.accounting-vendor-fields[hidden] {
    display: none !important;
}


.accounting-record-only-warning {
    display: flex;
    align-items: center;
    gap: 18px;

    margin-bottom: 18px;
    padding: 13px 16px;

    border: 1px solid #d8c589;
    border-radius: 9px;

    background: #fffaf0;
}

.accounting-record-only-warning strong {
    flex: 0 0 auto;
}

.accounting-record-only-warning span {
    color: var(--app-text-soft);
    font-size: 13px;
}


.accounting-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;

    margin-bottom: 16px;
}

.accounting-section-heading h2 {
    margin-bottom: 3px;
}


.accounting-date-filter {
    display: flex;
    align-items: end;
    gap: 8px;
}

.accounting-date-filter label {
    display: grid;
    gap: 4px;

    font-size: 11px;
    font-weight: 700;
}


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

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

.accounting-table th,
.accounting-table td {
    padding: 11px 10px;

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

    text-align: left;
    vertical-align: top;
}

.accounting-table th {
    color: var(--app-text-soft);

    font-size: 10px;
    font-weight: 800;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.accounting-table td {
    font-size: 13px;
}

.accounting-table .money-cell {
    white-space: nowrap;

    font-weight: 800;
    text-align: right;
}

.accounting-mode {
    display: inline-block;

    padding: 4px 8px;

    border-radius: 999px;

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

.accounting-mode.cash {
    background: #e8f5ed;
}

.accounting-mode.cheque {
    background: #eef3fb;
}

.table-subtext {
    display: block;

    margin-top: 2px;

    color: var(--app-text-soft);
}


@media (max-width: 1000px) {

    .accounting-entry-grid {
        grid-template-columns:
            repeat(2, minmax(180px, 1fr));
    }

}


@media (max-width: 760px) {

    .accounting-page-heading,
    .accounting-section-heading,
    .accounting-record-only-warning {
        display: grid;
    }

    .accounting-today {
        min-width: 0;
        width: 100%;
    }

    .accounting-entry-grid,
    .accounting-vendor-fields {
        grid-template-columns: 1fr;
    }

    .accounting-date-filter {
        align-items: end;
    }

}


/* ==========================================================
   EXPENSE CATEGORY MASTER
   ========================================================== */

.expense-category-create {
    display: grid;
    grid-template-columns:
        minmax(200px, .8fr)
        minmax(260px, 1.4fr)
        auto;
    gap: 16px;
    align-items: end;
}

.expense-category-create label {
    display: grid;
    gap: 6px;
}

.expense-category-create small {
    color: var(--app-text-soft);
    font-size: 11px;
}

.master-status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
}

.master-status.active {
    background: #e8f5ed;
}

.master-status.inactive {
    background: #f1f1f1;
}

.expense-category-missing {
    color: #9a5a00;
    font-weight: 700;
}

@media (max-width: 760px) {
    .expense-category-create {
        grid-template-columns: 1fr;
    }
}


/* MECHANIC_DEPARTMENT_UI_V1 */
.mechanic-dept-shell{display:grid;grid-template-columns:250px minmax(0,1fr);min-height:calc(100vh - 120px);border-radius:18px;overflow:hidden;background:#fff;box-shadow:0 12px 34px rgba(25,45,80,.10)}
.mechanic-dept-sidebar{display:flex;flex-direction:column;background:linear-gradient(180deg,#123f78 0%,#185a9d 56%,#e7792b 140%);padding:24px 16px;color:#fff}
.mechanic-dept-brand{padding:4px 8px 22px;border-bottom:1px solid rgba(255,255,255,.18)}
.mechanic-dept-brand span,.mechanic-dept-brand small{display:block;opacity:.78;font-size:11px;letter-spacing:.08em}.mechanic-dept-brand strong{display:block;font-size:24px;margin:4px 0}
.mechanic-dept-nav{display:grid;gap:8px;padding:20px 0;flex:1}.mechanic-dept-nav a{display:flex;align-items:center;gap:11px;padding:12px 10px;border-radius:10px;color:#fff;text-decoration:none;font-weight:650}.mechanic-dept-nav a:hover,.mechanic-dept-nav a.active{background:rgba(255,255,255,.16)}
.mechanic-nav-no{display:grid;place-items:center;width:30px;height:30px;border-radius:8px;background:rgba(255,255,255,.13);font-size:11px}.mechanic-dept-sidebar-foot{display:flex;gap:8px;border-top:1px solid rgba(255,255,255,.18);padding-top:16px}.mechanic-dept-sidebar-foot a{color:#fff;text-decoration:none;padding:8px}
.mechanic-dept-main{min-width:0;padding:0 24px 28px;background:#f7f9fc}.mechanic-dept-topbar{margin:0 -24px 24px;padding:18px 24px;display:flex;justify-content:space-between;align-items:center;background:linear-gradient(90deg,#174f8b,#2874b8 62%,#e98536);color:#fff}.mechanic-dept-topbar strong{display:block;font-size:20px}.mechanic-dept-kicker{display:block;font-size:10px;letter-spacing:.12em;opacity:.82}.mechanic-dept-user{font-weight:700}
.mechanic-dashboard-hero{padding:8px 2px 16px}.mechanic-dashboard-hero h1{margin:4px 0 6px}.mechanic-dashboard-hero p{margin:0;color:#667085}.mechanic-dashboard-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:18px}.mechanic-dashboard-card{display:block;padding:20px;border:1px solid #dfe6ef;border-radius:14px;background:#fff;color:inherit;text-decoration:none;box-shadow:0 5px 18px rgba(25,45,80,.06)}.mechanic-dashboard-card:hover{transform:translateY(-1px);box-shadow:0 9px 24px rgba(25,45,80,.10)}.mechanic-card-no{font-size:11px;font-weight:800;color:#1f65a6}.mechanic-dashboard-card h2{font-size:18px;margin:7px 0}.mechanic-dashboard-card p{color:#667085;min-height:42px}.mechanic-dashboard-card strong{color:#1f65a6}.mechanic-dashboard-note{margin-top:12px}
@media(max-width:900px){.mechanic-dept-shell{display:block}.mechanic-dept-sidebar{display:none}.mechanic-dashboard-grid{grid-template-columns:1fr}}


/* GODOWN_MOBILE_UI_COMBINED_V1 — presentation only */
.godown-mobile-shell{max-width:820px;margin:0 auto 16px}
.godown-mobile-nav{background:linear-gradient(135deg,#1559a6 0%,#2876c7 58%,#ef8b2c 100%);color:#fff;border-radius:18px;padding:14px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.godown-mobile-brand{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}
.godown-mobile-brand span{font-size:11px;font-weight:800;letter-spacing:.08em;opacity:.9}
.godown-mobile-brand strong{font-size:18px}
.godown-mobile-links{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px}
.godown-mobile-links a{display:flex;align-items:center;justify-content:center;min-height:46px;padding:8px 10px;border-radius:12px;background:rgba(255,255,255,.16);color:#fff!important;text-decoration:none!important;text-align:center;font-size:13px;font-weight:800;line-height:1.15;border:1px solid rgba(255,255,255,.18)}
.godown-mobile-links a:active{transform:scale(.98);background:rgba(255,255,255,.28)}
.godown2-mobile-links{grid-template-columns:1fr 1fr}
@media (max-width:900px){
body{overflow-x:hidden}
.godown-mobile-shell{margin:0 0 14px;width:100%}
.godown-mobile-nav{border-radius:0 0 18px 18px;padding:12px}
.godown-mobile-brand{margin-bottom:10px}
.godown-mobile-links{display:flex;overflow-x:auto;gap:8px;padding-bottom:2px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.godown-mobile-links::-webkit-scrollbar{display:none}
.godown-mobile-links a{flex:0 0 auto;min-width:116px;min-height:50px;font-size:14px}
.godown2-mobile-links a{flex:1 1 50%;min-width:0}
.route-mobile input,.route-mobile select,.route-mobile textarea,.gm input,.gm select,.gm textarea,.godown-close-card input,.godown-close-card select,.godown-close-card textarea,.godown2-mobile input,.godown2-mobile select,.godown2-mobile textarea,form input[type="date"]{min-height:48px;font-size:16px}
.route-mobile button,.gm button,.godown-close-card button,.godown2-mobile button,.godown-mobile-shell button{min-height:50px;font-size:15px}
.godown-close-table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.godown-close-table{min-width:560px}
.page-heading{gap:8px}.page-heading h1{font-size:24px;line-height:1.15}.card{max-width:100%}
}
@media (max-width:520px){
.godown-mobile-brand{align-items:flex-start;flex-direction:column;gap:2px}
.godown-mobile-brand strong{font-size:20px}
.godown-mobile-links a{min-width:112px}.godown2-mobile-links a{min-width:0}
}

