/* Cash Tracker — AdminLTE-like theme (legacy-safe ~IE10 / 2011–2016 WebView)
   Sidebar #222d32  ·  Accent #3c8dbc  ·  Content #f4f6f9
   No CSS custom properties, Grid, nesting, has-selector, or flex gap.
   See RESPONSIVE.md for breakpoints.
*/

*, *:before, *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: "Source Sans Pro", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.45;
    color: #222;
    background: #f4f6f9;
    max-width: 100%;
}

body {
    overflow-x: hidden;
}

a { color: #2e7aa8; text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0; font-weight: 600; color: #333; }
h2 { font-size: 24px; }
h3 { font-size: 16px; }

.muted { color: #6c757d; }
.small { font-size: 12px; }
.positive { color: #28a745; font-weight: 600; }
.negative { color: #dc3545; font-weight: 600; }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ----- App shell (fixed sidebar + fixed header; AdminLTE sidebar-open) ----- */
.wrapper {
    min-height: 100vh;
    min-height: 100dvh;
    position: relative;
}

.main-sidebar {
    position: fixed;
    z-index: 1040;
    top: 0;
    bottom: 0;
    left: 0;
    width: 230px;
    background: #222d32;
    color: #fff;
    overflow-x: hidden;
    overflow-y: auto;
}

.brand-link {
    background: #3c8dbc;
    padding: 14px 16px 16px;
}

.brand-name {
    display: block;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.brand-subtitle {
    display: block;
    font-size: 12px;
    color: #d9edf7;
    margin-top: 2px;
}

.user-panel {
    border-bottom: 1px solid #1a2226;
}

.user-panel:after {
    content: "";
    display: table;
    clear: both;
}

.user-menu-toggle {
    display: block;
    width: 100%;
    padding: 14px 16px;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.user-menu-toggle:hover {
    background: #1e282c;
}

.user-avatar {
    float: left;
    width: 36px;
    height: 36px;
    margin-right: 10px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #3c8dbc;
    text-align: center;
    line-height: 36px;
    font-weight: 700;
    font-size: 13px;
    overflow: hidden;
}

.user-avatar img {
    display: block;
    width: 36px;
    height: 36px;
    border: 0;
}

.user-caret {
    float: right;
    width: 0;
    height: 0;
    margin-top: 14px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid #b8c7ce;
}

.user-menu.is-open .user-caret {
    border-top: 0;
    border-bottom: 5px solid #fff;
}

.user-info { overflow: hidden; }
.user-name { font-weight: 600; font-size: 13px; }
.user-role { font-size: 11px; color: #b8c7ce; }

.user-dropdown {
    display: none;
    padding: 4px 0 8px;
    background: #1a2226;
    border-top: 1px solid #161c20;
}

.user-menu.is-open .user-dropdown {
    display: block;
}

.user-dropdown-item {
    display: block;
    width: 100%;
    color: #b8c7ce;
    padding: 12px 16px;
    border: 0;
    background: none;
    font: inherit;
    font-size: 14px;
    text-align: left;
    min-height: 44px;
    line-height: 20px;
    cursor: pointer;
}

.user-dropdown-item:hover {
    background: #1e282c;
    color: #fff;
    text-decoration: none;
}

.user-dropdown-primary {
    color: #fff;
    font-weight: 600;
}

.user-dropdown-item.active {
    background: #3c8dbc;
    color: #fff;
}

.user-dropdown-form { margin: 0; }

.sidebar-nav { padding: 8px 0 20px; }

.nav-item {
    display: block;
    color: #b8c7ce;
    padding: 12px 16px;
    border: 0;
    border-left: 3px solid transparent;
    font-size: 14px;
    min-height: 48px;
    line-height: 22px;
}

.nav-item:hover {
    background: #1e282c;
    color: #fff;
    text-decoration: none;
}

.nav-item.active {
    background: #3c8dbc;
    color: #fff;
    border-left-color: #fff;
}

.nav-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    margin-right: 10px;
    vertical-align: middle;
    opacity: 0.95;
}

.nav-button {
    width: 100%;
    background: none;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.content-wrapper {
    margin-left: 230px;
    padding-top: 50px;
    background: #f4f6f9;
    min-height: 100vh;
    min-height: 100dvh;
    min-width: 0;
}

.main-header {
    position: fixed;
    z-index: 1030;
    top: 0;
    left: 230px;
    right: 0;
    height: 50px;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    padding: 0 16px;
    overflow: hidden;
}

.main-header:after {
    content: "";
    display: table;
    clear: both;
}

.page-title {
    display: inline-block;
    font-size: 18px;
    font-weight: 500;
    margin: 0 12px 0 0;
    vertical-align: middle;
    line-height: 50px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 52%;
}

.header-meta {
    float: right;
    line-height: 50px;
    padding-top: 0;
    white-space: nowrap;
}

.store-name {
    color: #333;
    font-weight: 500;
    margin-right: 10px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    -webkit-border-radius: 999px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    vertical-align: middle;
}

.badge-open { background: #28a745; }
.badge-closed { background: #367fa9; }
.badge-muted { background: #6c757d; }

.sidebar-toggle {
    display: none;
    float: left;
    width: 44px;
    height: 50px;
    margin: 0 8px 0 -8px;
    padding: 16px 11px;
    background: none;
    border: 0;
    cursor: pointer;
    color: #444;
    vertical-align: middle;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0.15);
}

.hamburger {
    display: block;
    width: 22px;
    height: 18px;
}

.hamburger span {
    display: block;
    height: 2px;
    margin: 0 0 5px;
    background: #444;
}

.hamburger span:last-child { margin-bottom: 0; }

.sidebar-overlay {
    display: none;
}

.content { padding: 20px; }

.page-head { margin-bottom: 16px; }
.page-head .muted { margin: 4px 0 0; }

/* ----- Cards ----- */
.card {
    background: #fff;
    border: 1px solid #dee2e6;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    margin-bottom: 16px;
}

.card-accent { border-top: 3px solid #3c8dbc; }
.card-accent-green { border-top: 3px solid #28a745; }

.card-header {
    padding: 12px 16px;
    border-bottom: 1px solid #dee2e6;
}

.card-header:after {
    content: "";
    display: table;
    clear: both;
}

.card-header h3 { display: inline-block; margin-right: 12px; }
.card-header .muted { float: right; padding-top: 2px; }

.card-body { padding: 16px; }

.grid-2 { margin-left: -8px; margin-right: -8px; }
.grid-2:after {
    content: "";
    display: table;
    clear: both;
}
.grid-2 > * {
    float: left;
    width: 50%;
    padding: 0 8px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.stack .card { margin-bottom: 16px; }
.stack .card:last-child { margin-bottom: 0; }

/* ----- Info boxes (dashboard) ----- */
.info-boxes {
    margin: 0 -6px 16px;
}

.info-boxes:after {
    content: "";
    display: table;
    clear: both;
}

.info-box {
    float: left;
    width: 19%;
    margin: 0 0.5% 12px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-left: 4px solid #2e7aa8;
    min-height: 80px;
    overflow: hidden;
    padding: 12px 14px;
}

.info-box-icon {
    display: none;
}

.info-box:nth-child(1) { border-left-color: #2e7aa8; }
.info-box:nth-child(2) { border-left-color: #008d4c; }
.info-box:nth-child(3) { border-left-color: #00a0c8; }

.info-box-content {
    display: block;
    padding: 0;
}

.box-blue { background: #3c8dbc; }
.box-green { background: #28a745; }
.box-cyan { background: #00c0ef; }

.info-box-content {
    display: table-cell;
    vertical-align: middle;
    padding: 10px 12px;
}

.info-box-text {
    text-transform: uppercase;
    font-size: 11px;
    color: #6c757d;
    letter-spacing: 0.3px;
}

.info-box-number {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-top: 2px;
}

/* ----- Tables ----- */
.data-table, .denom-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th, .denom-table th {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4px;
    color: #6c757d;
    font-weight: 600;
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
}

.data-table td, .denom-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f0f0f0;
}

.col-num, .col-qty { text-align: right; }
th.col-num, th.col-qty { text-align: right; }
.col-qty { width: 160px; }

.denom-label { color: #3c8dbc; font-weight: 600; }

.denom-table { min-width: 400px; }

.denom-table input[type="number"],
.denom-table input[type="text"] {
    width: 140px;
    min-width: 120px;
    min-height: 44px;
    text-align: right;
}

.report-table { min-width: 900px; }

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

.report-table tfoot th {
    background: #f8f9fa;
    border-top: 2px solid #dee2e6;
    font-weight: 700;
    text-transform: none;
    font-size: 13px;
    color: #333;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.status-log {
    list-style: none;
    margin: 0;
    padding: 0;
}

.status-log li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.status-log li:after {
    content: "";
    display: table;
    clear: both;
}

.status-log time {
    float: right;
    color: #6c757d;
    white-space: nowrap;
    margin-left: 12px;
}

/* ----- Forms ----- */
.field {
    display: block;
    width: 100%;
    margin-bottom: 14px;
}
.field > span {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.field-inline {
    display: block;
    width: 100%;
}

.field-inline > span {
    display: inline-block;
    min-width: 140px;
    margin-right: 12px;
    margin-bottom: 0;
    vertical-align: middle;
}

.field-inline > input,
.field-inline .input-money {
    vertical-align: middle;
}

.field-row { margin-bottom: 12px; }

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="email"],
select {
    min-height: 48px;
    height: 48px;
    padding: 8px 12px;
    border: 1px solid #d2d6de;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    font: inherit;
    color: #333;
    background: #fff;
    max-width: 100%;
}

.field select { width: 100%; }

input:focus {
    outline: none;
    border-color: #3c8dbc;
    -webkit-box-shadow: 0 0 0 2px rgba(60, 141, 188, 0.15);
    box-shadow: 0 0 0 2px rgba(60, 141, 188, 0.15);
}

input[readonly] { background: #f7f7f7; }

.input-money { width: 200px; min-width: 140px; text-align: right; }

.field-safe { max-width: 420px; }

input.input-safe {
    width: 200px;
    min-width: 160px;
    min-height: 48px;
    height: 48px;
    font-size: 20px;
    text-align: right;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.btn {
    display: inline-block;
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    line-height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    vertical-align: middle;
}

.btn:hover { text-decoration: none; }

.btn-primary { background: #2e7aa8; color: #fff; }
.btn-primary:hover { background: #24658c; }
.btn-success { background: #008d4c; color: #fff; }
.btn-success:hover { background: #007a42; }
.btn-danger { background: #dc3545; color: #fff; }
.btn-danger:hover { background: #c82333; }
.btn-muted { background: #e9ecef; color: #333; border-color: #ced4da; }
.btn-muted:hover { background: #dee2e6; }
.btn-block { width: 100%; display: block; }
.btn-small {
    height: 44px;
    min-height: 44px;
    min-width: 44px;
    line-height: 42px;
    padding: 0 12px;
    font-size: 16px;
}
.btn-lg {
    height: 54px;
    line-height: 52px;
    min-height: 52px;
    padding: 0 20px;
    font-size: 16px;
}
.btn[disabled],
.btn.disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.form-actions {
    text-align: right;
    margin-top: 16px;
}

.form-actions:after {
    content: "";
    display: table;
    clear: both;
}

.form-actions .btn { margin-left: 10px; }

.form-actions-open { text-align: left; }

.form-actions-end {
    display: inline-block;
    float: right;
}

.form-actions-end .btn { margin-left: 10px; }

.grand-total {
    background: #e8f4fc;
    border: 1px solid #c5e0f5;
    padding: 14px 16px;
    margin-top: 12px;
}

.grand-total:after {
    content: "";
    display: table;
    clear: both;
}

.grand-total-value {
    float: right;
    font-size: 28px;
    font-weight: 700;
    color: #3c8dbc;
}

.day-change {
    margin: 10px 0 0;
    font-size: 20px;
    line-height: 1.4;
    color: #222;
}

.callout-dash {
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px dashed #adb5bd;
    color: #6c757d;
    font-size: 13px;
}

.totals-list { margin: 16px 0 0; }

.totals-list > div {
    padding: 8px 0;
    border-top: 1px solid #f0f0f0;
}

.totals-list > div:after {
    content: "";
    display: table;
    clear: both;
}

.totals-list dt {
    float: left;
    color: #6c757d;
}

.totals-list dd {
    float: right;
    margin: 0;
    font-weight: 600;
}

.totals-list .expected-close-row dd { font-weight: 400; }

.totals-list > div.has-variance {
    background: #fff8e1;
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    -webkit-animation: variance-pulse 0.9s ease-in-out 2;
    animation: variance-pulse 0.9s ease-in-out 2;
}

.input-money.has-variance {
    border-color: #f39c12;
    background: #fff8e1;
    -webkit-box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.25);
}

@-webkit-keyframes variance-pulse {
    0%, 100% { background-color: #fff8e1; }
    50% { background-color: #ffe08a; }
}

@keyframes variance-pulse {
    0%, 100% { background-color: #fff8e1; }
    50% { background-color: #ffe08a; }
}

.close-copy { margin: 0 0 12px; color: #444; line-height: 1.45; }

.pay-row {
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

/* ----- Alerts ----- */
.alert {
    padding: 10px 14px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    margin-bottom: 14px;
    border: 1px solid transparent;
}

.alert-error { background: #f8d7da; border-color: #f5c2c7; color: #842029; }
.alert-success { background: #d1e7dd; border-color: #badbcc; color: #0f5132; }
.alert-warning { background: #fff3cd; border-color: #ffecb5; color: #664d03; }
.alert-info { background: #cff4fc; border-color: #b6effb; color: #055160; }

/* ----- Reports ----- */
.period-toolbar:after {
    content: "";
    display: table;
    clear: both;
}

.period-toggles {
    display: inline-block;
    margin-bottom: 14px;
    vertical-align: top;
}

.period-step {
    display: inline-block;
    margin: 0 0 14px 16px;
    vertical-align: top;
}

.period-step-btn {
    min-width: 44px;
}

.period-step-btn + .period-step-btn { margin-left: 8px; }

.period-btn {
    display: inline-block;
    height: 44px;
    min-height: 44px;
    line-height: 42px;
    padding: 0 16px;
    border: 1px solid #3c8dbc;
    background: #fff;
    color: #3c8dbc;
    font: inherit;
    cursor: pointer;
    margin: 0 0 8px;
}

.period-btn:first-child {
    -webkit-border-radius: 3px 0 0 3px;
    border-radius: 3px 0 0 3px;
}

.period-btn:last-child {
    -webkit-border-radius: 0 3px 3px 0;
    border-radius: 0 3px 3px 0;
}

.period-btn + .period-btn { margin-left: -1px; }

.period-btn.active {
    background: #3c8dbc;
    color: #fff;
}

.range-row .field {
    display: inline-block;
    width: auto;
    margin-right: 16px;
    margin-bottom: 12px;
    vertical-align: bottom;
}

.range-row .btn { vertical-align: bottom; margin-bottom: 12px; }

/* ----- Login ----- */
.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #f4f6f9;
}

.login-topbar {
    height: 28px;
    background: #1a1d21;
    color: #7ec8e3;
    text-align: center;
    font-size: 12px;
    letter-spacing: 0.3px;
    line-height: 28px;
}

.login-wrap {
    padding: 24px 16px;
    text-align: center;
}

.login-wrap .alert {
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.login-card {
    width: 100%;
    max-width: 380px;
    margin: 24px auto 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: 3px solid #3c8dbc;
    -webkit-box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 28px 28px 22px;
    text-align: center;
}

.login-badge {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #3c8dbc;
    color: #fff;
    font-size: 28px;
    font-weight: 700;
    line-height: 56px;
    text-align: center;
}

.login-title { font-size: 24px; }
.login-lead { color: #6c757d; margin: 6px 0 22px; }
.login-form { text-align: left; }
.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
    width: 100%;
}
.login-foot { margin: 18px 0 0; color: #6c757d; font-size: 12px; }

.password-card { max-width: 440px; }

.profile-card { max-width: 520px; }
.profile-card-lead { margin: 0 0 14px; }

.profile-avatar-row { margin-bottom: 16px; }
.profile-avatar-row:after {
    content: "";
    display: table;
    clear: both;
}

.profile-avatar-preview {
    float: left;
    width: 72px;
    height: 72px;
    margin-right: 16px;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #3c8dbc;
    color: #fff;
    text-align: center;
    line-height: 72px;
    font-weight: 700;
    font-size: 22px;
    overflow: hidden;
}

.profile-avatar-preview img {
    display: block;
    width: 72px;
    height: 72px;
    border: 0;
}

.profile-avatar-copy { overflow: hidden; }
.profile-avatar-copy .muted { margin: 0; }

.login-form input[type="file"] {
    width: 100%;
    height: auto;
    min-height: 48px;
    padding: 12px 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    font-size: 16px;
}

.login-dev-note {
    margin: 16px 0 0;
    padding: 10px 12px;
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
    font-size: 12px;
    text-align: left;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    line-height: 1.45;
}

.login-dev-note code { font-weight: 700; white-space: nowrap; }

/* ----- Users admin ----- */
.users-layout:after {
    content: "";
    display: table;
    clear: both;
}

.users-create {
    float: none;
    width: auto;
    margin: 0 0 16px;
}

.users-list { overflow: hidden; }

.users-table { min-width: 0; width: 100%; }

.field-check {
    display: block;
    min-height: 44px;
    line-height: 44px;
    margin-bottom: 14px;
}
.field-check input[type="checkbox"] {
    width: 24px;
    height: 24px;
    min-height: 24px;
    margin: 0 10px 0 0;
    vertical-align: middle;
}
.field-check-lg {
    min-height: 48px;
    line-height: 48px;
    font-size: 18px;
}

.field-check-reopen {
    min-height: 48px;
    line-height: 48px;
    font-size: 18px;
    margin-bottom: 8px;
}

.field-check-reopen input[type="checkbox"] {
    width: 44px;
    height: 44px;
    min-height: 44px;
}

.users-reopen-form {
    margin: 4px 0 8px;
}

.users-reopen-form .field-check-reopen {
    display: inline-block;
    margin: 0 12px 0 0;
    vertical-align: middle;
}

.perm-inherited {
    color: #6c757d;
}

.group-members {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
}

.group-members li {
    min-height: 44px;
    margin-bottom: 8px;
}

.group-delete {
    margin-top: 16px;
}

.users-reopen-form .btn {
    vertical-align: middle;
}

.reopen-blocked {
    margin: 16px 0 0;
    font-size: 18px;
}

.reopen-cancel-warning {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #f8d7da;
    color: #842029;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
}

.reopen-history { margin-top: 16px; }

.reopen-history li { margin: 0 0 8px; }

.reopen-reason-label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
}

#reopenReason { margin-bottom: 16px; }

.user-badge {
    display: inline-block;
    padding: 2px 8px;
    -webkit-border-radius: 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.user-badge-active { background: #d1e7dd; color: #0f5132; }
.user-badge-inactive { background: #e9ecef; color: #495057; }

.inline-reset input[type="password"] {
    display: block;
    width: 160px;
    max-width: 100%;
    height: 48px;
    min-height: 48px;
    margin: 0 0 8px;
    vertical-align: middle;
    font-size: 16px;
}

.inline-reset .btn { margin: 0 0 6px; vertical-align: middle; }

.inline-role select,
.login-form select {
    height: 48px;
    min-height: 48px;
    border: 1px solid #dee2e6;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    padding: 0 8px;
    font: inherit;
    font-size: 16px;
    background: #fff;
    margin: 0 0 8px;
    vertical-align: middle;
}

.inline-role select {
    display: block;
    width: 160px;
    max-width: 100%;
}

.inline-role .btn { margin: 0 0 6px; vertical-align: middle; }

.users-table td { vertical-align: middle; }

/* ==========================================================================
   Responsive — max-width breakpoints (phone ~480/640, tablet ~768/992)
   ========================================================================== */

@media (max-width: 992px) {
    .sidebar-toggle { display: block; }

    .main-header {
        left: 0;
        z-index: 1060;
    }

    /* Off-canvas overlay drawer — over content, not a push; sits below the fixed header */
    .main-sidebar {
        position: fixed;
        z-index: 1050;
        left: 0;
        top: 50px;
        bottom: 0;
        height: auto;
        width: 230px;
        -webkit-transform: translateX(-100%);
        -ms-transform: translateX(-100%);
        transform: translateX(-100%);
        -webkit-transition: -webkit-transform 0.2s ease;
        -ms-transition: -ms-transform 0.2s ease;
        transition: transform 0.2s ease;
    }

    body.sidebar-open .main-sidebar,
    body.sidebar-mini.sidebar-open .main-sidebar {
        -webkit-transform: translateX(0);
        -ms-transform: translateX(0);
        transform: translateX(0);
    }

    .content-wrapper { margin-left: 0; }

    .sidebar-overlay {
        display: none;
        position: fixed;
        z-index: 1045;
        left: 0;
        top: 50px;
        right: 0;
        bottom: 0;
        background: #000;
        background: rgba(0, 0, 0, 0.45);
        cursor: pointer;
    }

    body.sidebar-open .sidebar-overlay {
        display: block;
    }

    body.sidebar-open { overflow: hidden; }

    .users-create {
        float: none;
        width: auto;
        margin-right: 0;
    }

    .card-header .muted {
        float: none;
        display: block;
        margin-top: 4px;
    }

    .info-box {
        width: 48%;
        margin: 0 1% 12px;
    }

    .grid-2 {
        margin-left: 0;
        margin-right: 0;
    }

    .grid-2 > * {
        float: none;
        width: auto;
        padding: 0;
    }
}

@media (max-width: 768px) {
    .content { padding: 14px 12px; }
    .main-header { padding: 0 12px; }
    .page-title { font-size: 16px; line-height: 50px; }

    .grid-2 {
        margin-left: 0;
        margin-right: 0;
    }

    .grid-2 > * {
        float: none;
        width: auto;
        padding: 0;
    }

    input[type="text"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="email"],
    select,
    textarea {
        height: 48px;
        min-height: 48px;
        font-size: 16px;
    }

    textarea { height: auto; min-height: 96px; }

    .btn {
        height: 48px;
        line-height: 46px;
        min-width: 48px;
    }

    .btn-lg {
        height: 54px;
        line-height: 52px;
    }

    .btn-small {
        height: 44px;
        min-height: 44px;
        line-height: 42px;
        font-size: 16px;
    }

    .login-form .btn-block { height: 44px; line-height: 42px; }

    /* Denom grid → stacked cards; hide redundant face-value column */
    .denom-wrap {
        overflow: visible;
    }

    .denom-table {
        min-width: 0;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
    }

    .denom-table thead { display: none; }

    .denom-table tbody,
    .denom-table tr.denom-row,
    .denom-table td {
        display: block;
        width: 100%;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }

    .denom-table tr.denom-row {
        background: #fff;
        border: 1px solid #dee2e6;
        -webkit-border-radius: 3px;
        border-radius: 3px;
        margin: 0 0 12px;
        padding: 12px;
    }

    .denom-table td {
        padding: 0;
        border-bottom: 0;
        text-align: left;
    }

    .denom-table .face-value,
    .denom-table td:nth-child(3) {
        display: none;
    }

    .denom-table .denom-label {
        display: block;
        font-size: 22px;
        font-weight: 700;
        margin: 0 0 10px;
        text-align: left;
    }

    .denom-table .col-qty {
        width: auto;
        text-align: left;
        margin: 0 0 8px;
    }

    .denom-table .col-qty:before {
        content: "Qty";
        display: block;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: #6c757d;
        margin-bottom: 4px;
    }

    .denom-table input[type="number"],
    .denom-table input[type="text"] {
        width: 100%;
        height: 48px;
        min-height: 48px;
        font-size: 20px;
        text-align: center;
    }

    .denom-table .subtotal {
        text-align: left;
        font-size: 16px;
        font-weight: 700;
        color: #333;
    }

    .denom-table .subtotal:before {
        content: "Subtotal";
        display: block;
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.4px;
        color: #6c757d;
        margin-bottom: 2px;
    }

    .period-btn {
        height: 44px;
        line-height: 42px;
        margin: 0 6px 8px 0;
        -webkit-border-radius: 3px;
        border-radius: 3px;
    }

    .period-btn + .period-btn { margin-left: 0; }

    .period-step {
        display: block;
        margin-left: 0;
    }

    .period-step-btn {
        float: left;
        width: 48%;
        height: 44px;
        line-height: 42px;
        margin-bottom: 8px;
    }

    .period-step-btn + .period-step-btn {
        float: right;
        margin-left: 0;
        width: 48%;
    }

    .period-step:after {
        content: "";
        display: table;
        clear: both;
    }

    .range-row .field {
        display: block;
        margin-right: 0;
        width: 100%;
    }

    .range-row .field input[type="date"] { width: 100%; }

    .range-row .btn {
        display: block;
        width: 100%;
        margin-left: 0;
    }

    .inline-reset input[type="password"],
    .inline-role select {
        width: 100%;
        max-width: 220px;
        height: 44px;
        font-size: 16px;
    }

    .info-box-icon {
        width: 56px;
        font-size: 22px;
    }
}

@media (max-width: 640px) {
    .field-inline > span {
        display: block;
        min-width: 0;
        margin-right: 0;
        margin-bottom: 6px;
    }

    .field-inline > input,
    .field-inline .input-money,
    .input-money {
        width: 100%;
        max-width: 100%;
    }

    .page-head h2 { font-size: 20px; }

    .grand-total-value {
        float: none;
        display: block;
        margin-top: 8px;
        font-size: 24px;
    }

    .status-log time {
        float: none;
        display: block;
        margin: 4px 0 0;
    }
}

@media (max-width: 480px) {
    .content { padding: 12px 10px; }

    .store-name { display: none; }

    .page-title {
        font-size: 15px;
        max-width: 58%;
    }

    .info-box-icon {
        width: 48px;
        font-size: 20px;
    }

    .info-box-number { font-size: 16px; }

    .form-actions { text-align: left; }

    .form-actions .btn,
    .form-actions-end .btn {
        display: block;
        width: 100%;
        margin: 0 0 10px;
    }

    .form-actions .btn:last-child,
    .form-actions-end .btn:last-child { margin-bottom: 0; }

    .form-actions-end {
        float: none;
        display: block;
        width: 100%;
    }

    .login-card {
        margin-top: 12px;
        padding: 20px 16px 16px;
    }

    .login-title { font-size: 22px; }

    .login-dev-note code { white-space: normal; word-break: break-word; }

    .card-body { padding: 12px; }
    .card-header { padding: 10px 12px; }

    .totals-list dt,
    .totals-list dd {
        float: none;
        display: block;
    }

    .totals-list dd { margin-top: 4px; }

    h2 { font-size: 20px; }
}

/* ----- Ops UX V2: one-taps, checklists, week strip, a11y ----- */
.card-accent { border-top-color: #2e7aa8; }
.card-accent-green { border-top-color: #008d4c; }
.card-accent-warn { border-top: 3px solid #c98400; }

.one-taps {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    width: 100%;
    margin: 0;
}

.one-tap-cell {
    float: none;
    width: auto;
    min-width: 0;
    margin: 0 0 0 16px;
    padding: 0;
    -webkit-box-flex: 1;
    -webkit-flex: 1 1 0;
    flex: 1 1 0;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.one-tap-cell:first-child { margin-left: 0; }

.one-tap-cell-undo {
    -webkit-box-flex: 0;
    -webkit-flex: 0 0 auto;
    flex: 0 0 auto;
    width: auto;
    margin-left: auto;
    padding-left: 16px;
    align-self: center;
}

@media (max-width: 480px) {
    .one-taps { display: block; }

    .one-tap-cell {
        display: block;
        width: 100%;
        margin: 0 0 12px;
        -webkit-flex: none;
        flex: none;
    }

    .one-tap-cell:last-child { margin-bottom: 0; }

    .one-tap-cell-undo {
        width: 100%;
        margin-left: 0;
        padding-left: 0;
        -webkit-flex: none;
        flex: none;
        align-self: stretch;
    }
}

@media (max-width: 992px) {
    .inline-reset input[type="password"],
    .inline-role select {
        width: 120px;
    }
}

.one-tap {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 72px;
    padding: 14px 12px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: 2px solid #c5d5e0;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    background: #fff;
    color: #222;
    text-align: center;
    text-decoration: none;
}

.one-tap:hover { text-decoration: none; }

.one-tap-label {
    display: block;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.one-tap-help {
    display: block;
    margin-top: 6px;
    font-size: 14px;
    line-height: 1.35;
    color: #444;
}

.one-tap-primary {
    background: #008d4c;
    border-color: #008d4c;
    color: #fff;
}

.one-tap-primary .one-tap-help { color: #e8fff3; }

.one-tap-secondary {
    background: #fff;
    border-color: #2e7aa8;
    color: #2e7aa8;
}

.one-tap-secondary .one-tap-help { color: #2e7aa8; }

.one-tap-disabled {
    background: #d7dbe0;
    border-color: #d7dbe0;
    color: #5c636a;
    cursor: not-allowed;
}

.one-tap-disabled .one-tap-help { color: #5c636a; }

.one-tap.one-tap-undo {
    width: auto;
    height: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 2px 8px;
    background: #f1f3f5;
    border-color: #e9ecef;
    color: #adb5bd;
    font-size: 0.8rem;
    font-weight: 600;
}

.one-tap.one-tap-undo .one-tap-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #adb5bd;
}

.glance-head { margin-top: 8px; }

.info-box-number { font-size: 26px; color: #222; }
.info-box-text { font-size: 12px; color: #444; }

.wizard-progress { margin-bottom: 16px; }

.wizard-step-label {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.wizard-dots {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wizard-dots:after {
    content: "";
    display: table;
    clear: both;
}

.wizard-dot {
    float: left;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    margin: 0 10px 0 0;
    -webkit-border-radius: 50%;
    border-radius: 50%;
    background: #d7dbe0;
    color: #fff;
    text-align: center;
    line-height: 44px;
    font-weight: 700;
    font-size: 14px;
}

.wizard-dot-link {
    display: block;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    line-height: 44px;
    color: #fff;
    text-decoration: none;
}

.wizard-dot.is-current { background: #2e7aa8; }
.wizard-dot.is-done { background: #008d4c; }

input[data-error="1"],
textarea[data-error="1"] {
    border-color: #dc3545;
    background: #fff5f5;
}

.draft-status {
    min-height: 1.2em;
    margin: 8px 0 0;
    color: #6c757d;
    font-size: 14px;
}

.wizard-objective {
    background: #eef6fb;
    border-left: 4px solid #2e7aa8;
    padding: 12px 14px;
    margin: 0 0 16px;
}

.wizard-objective p {
    margin: 0;
    font-size: 18px;
    line-height: 1.4;
    color: #222;
}

.wizard-panel {
    border: 2px solid #2e7aa8;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    padding: 20px 16px;
    text-align: center;
    margin-bottom: 16px;
}

.wizard-title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.money-lg,
.money-xl,
.grand-total-value {
    font-size: 28px;
    font-weight: 700;
    color: #2e7aa8;
}

.money-xl { font-size: 32px; }

.form-actions-split { text-align: left; }
.form-actions-split .btn-primary,
.form-actions-split .btn-success { float: right; }

.soft-warn {
    background: #fff8e6;
    border: 1px solid #e0c48a;
    color: #7a4b00;
    padding: 14px 16px;
    margin: 0 0 16px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
}

.soft-warn-title {
    margin: 0 0 8px;
    font-weight: 700;
}

.soft-warn .money-xl { color: #7a4b00; }
.soft-warn p:last-child { margin-bottom: 0; }

.day-note-box {
    background: #f4f6f9;
    border: 1px solid #dee2e6;
    padding: 12px 14px;
    margin: 12px 0 16px;
}

.day-note-label {
    margin: 0 0 6px;
    font-weight: 700;
    color: #222;
}

textarea {
    width: 100%;
    min-height: 96px;
    padding: 10px 12px;
    border: 1px solid #d2d6de;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    font: inherit;
    font-size: 16px;
    color: #222;
    background: #fff;
}

textarea:focus {
    outline: none;
    border-color: #2e7aa8;
    -webkit-box-shadow: 0 0 0 2px rgba(46, 122, 168, 0.15);
    box-shadow: 0 0 0 2px rgba(46, 122, 168, 0.15);
}

.week-strip-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.week-strip {
    min-width: 560px;
    margin: 0;
}

.week-strip:after {
    content: "";
    display: table;
    clear: both;
}

.week-chip-cell {
    float: left;
    width: 14.28%;
    padding: 0 4px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

.week-chip {
    display: block;
    min-height: 88px;
    padding: 10px 6px;
    border: 2px solid #c5d5e0;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    text-align: center;
    text-decoration: none;
    color: #222;
    background: #fff;
}

.week-chip:hover { text-decoration: none; }

.week-chip-dow,
.week-chip-date,
.week-chip-status {
    display: block;
}

.week-chip-dow { font-weight: 700; }
.week-chip-date { margin: 4px 0; font-size: 14px; }
.week-chip-status { font-weight: 700; font-size: 14px; }

.week-chip-closed { border-color: #008d4c; }
.week-chip-closed .week-chip-status { color: #008d4c; }
.week-chip-open { border-color: #2e7aa8; background: #eef6fb; }
.week-chip-open .week-chip-status { color: #2e7aa8; }
.week-chip-missing { border-color: #c98400; background: #fff8e6; }
.week-chip-missing .week-chip-status { color: #7a4b00; }

.week-chip.is-selected {
    -webkit-box-shadow: 0 0 0 2px #2e7aa8;
    box-shadow: 0 0 0 2px #2e7aa8;
}

.export-scope {
    border: 0;
    margin: 16px 0 0;
    padding: 0;
}

.export-choice {
    display: block;
    margin: 8px 0;
    min-height: 48px;
    line-height: 48px;
}

.export-choice input[type="radio"] {
    width: 22px;
    height: 22px;
    margin: 0 10px 0 0;
    vertical-align: middle;
}

.dialog-mask {
    display: none;
    position: fixed;
    z-index: 2000;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.45);
}

.dialog-mask.is-open { display: block; }

.dialog-card {
    width: 90%;
    max-width: 420px;
    margin: 18% auto 0;
    background: #fff;
    padding: 20px;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    color: #222;
}

.dialog-card-close { max-width: 520px; padding: 28px 24px; }

.dialog-question {
    font-size: 28px;
    line-height: 1.3;
    margin: 0 0 20px;
}

.dialog-actions .btn {
    display: block;
    width: 100%;
    margin: 0 0 12px;
}

.dialog-actions .btn:last-child { margin-bottom: 0; }

@media (max-width: 768px) {
    .form-actions-split .btn-lg,
    .form-actions-split .btn-lg:last-child {
        float: none;
        display: block;
        width: 100%;
        margin: 0 0 10px;
    }
}

@media (max-width: 320px) {
    .content { padding: 10px 8px; }

    .info-box {
        float: none;
        display: table;
        width: 100%;
        margin: 0 0 10px;
    }

    .denom-table .denom-label { font-size: 20px; }

    .page-title { max-width: 48%; font-size: 14px; }
}

/* ----- Clear all data ----- */
.reset-warning {
    background: #fff3cd;
    border: 1px solid #ffecb5;
    color: #664d03;
    padding: 14px 16px;
    margin-bottom: 16px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
}

.reset-warning h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #664d03;
}

.reset-warning p { margin: 0; }

.reset-warning ul {
    margin: 4px 0 12px;
    padding-left: 20px;
}

.reset-warning li { margin: 2px 0; }

.reset-keep {
    background: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.reset-keep h3 { color: #0f5132; }

.btn-reset {
    height: auto;
    min-height: 54px;
    line-height: 1.3;
    padding: 14px 16px;
    white-space: normal;
}

/* Landscape tablet (sidebar stays up). Short height keeps the count and
   the main button on screen. 100dvh is already set above for the URL bar. */
@media (min-width: 993px) {
    .info-box {
        width: 32%;
        margin: 0 0.6% 12px;
    }
}

@media (min-width: 993px) and (max-height: 860px) {
    .content { padding: 10px 16px 12px; }
    .page-head { margin-bottom: 8px; }
    .card { margin-bottom: 10px; }
    .card-header { padding: 8px 14px; }
    .card-body { padding: 10px 14px; }
    .wizard-progress { margin-bottom: 8px; }
    .wizard-step-label { margin-bottom: 6px; }
    .wizard-objective {
        padding: 8px 12px;
        margin-bottom: 8px;
    }
    .wizard-objective p { font-size: 16px; }
    .wizard-panel { padding: 12px 14px; margin-bottom: 10px; }
    .grand-total { padding: 8px 12px; margin-top: 8px; }
    textarea { min-height: 64px; }
    .field-safe { margin-bottom: 8px; }
    input.input-safe { height: 48px; min-height: 48px; font-size: 20px; }
    .totals-list { margin-top: 8px; }
    .totals-list > div { padding: 4px 0; }
    .one-tap { min-height: 64px; padding: 10px 12px; }
    .info-box { min-height: 64px; padding: 8px 12px; }

    .denom-wrap { overflow: visible; }
    .denom-table {
        min-width: 0;
        width: 100%;
    }
    .denom-table thead { display: none; }
    .denom-table tbody { display: block; }
    .denom-table tbody:after {
        content: "";
        display: table;
        clear: both;
    }
    .denom-table tr.denom-row {
        display: block;
        float: left;
        width: 50%;
        padding: 0 12px 8px 0;
        border: 0;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
    }
    .denom-table td {
        display: inline-block;
        vertical-align: middle;
        border: 0;
        padding: 0 8px 0 0;
        text-align: left;
    }
    .denom-table .denom-label {
        width: 4.2em;
        font-size: 20px;
        font-weight: 700;
    }
    .denom-table .col-qty {
        width: auto;
        text-align: left;
    }
    .denom-table .face-value,
    .denom-table td:nth-child(3) { display: none; }
    .denom-table input[type="text"],
    .denom-table input[type="number"] {
        width: 7.5em;
        min-width: 120px;
        height: 44px;
        min-height: 44px;
        font-size: 20px;
        text-align: center;
    }
    .denom-table .subtotal {
        min-width: 5em;
        font-size: 18px;
        font-weight: 700;
    }

    .keep-actions {
        position: -webkit-sticky;
        position: sticky;
        bottom: 0;
        z-index: 5;
        background: #fff;
        border-top: 1px solid #dee2e6;
        margin: 8px -14px 0;
        padding: 8px 14px 2px;
    }

    .users-create .login-form:after {
        content: "";
        display: table;
        clear: both;
    }

    .users-create .field {
        float: left;
        width: 50%;
        margin-bottom: 10px;
        padding-right: 16px;
    }

    .users-create .field-check,
    .users-create .form-actions {
        clear: both;
        float: none;
        width: auto;
    }
}

.reset-backup-form {
    display: inline;
    margin-left: 8px;
}

.reset-backup-form .btn-small {
    margin: 0;
    vertical-align: middle;
}

.date-step-label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
}

.date-step {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    margin-bottom: 16px;
}

.date-step-btn {
    flex: 1 1 120px;
    min-height: 64px;
    height: 64px;
    line-height: 62px;
    margin: 0 8px 8px 0;
    padding: 0 12px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
}

.date-step-next {
    margin-right: 0;
}

.date-step-field {
    flex: 2 1 180px;
    margin: 0 8px 8px 0;
}

.date-step-field input[type="date"] {
    width: 100%;
    min-height: 64px;
    height: 64px;
    font-size: 20px;
}

.close-differences {
    margin: 0 0 8px;
}

.close-diff {
    border: 2px solid #d2d6de;
    -webkit-border-radius: 4px;
    border-radius: 4px;
    background: #fff;
    padding: 16px;
    margin-bottom: 12px;
}

.close-diff-total {
    background: #e8f4fc;
    border-color: #2e7aa8;
}

.close-diff-label {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.close-diff-help {
    margin: 4px 0 8px;
    font-size: 18px;
    line-height: 1.3;
    color: #333;
}

.close-diff-value {
    margin: 0;
    font-size: 40px;
    line-height: 1.2;
    font-weight: 700;
}
