
/* ===== theme-package-4.css ===== */
/* Inventory SaaS — Theme Package 4
   Forms, validation, modals, confirmations, alerts
*/

.form-page {
    max-width: 1180px;
    margin: 0 auto;
}

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

.form-page-title {
    margin: 0;
    font-size: 26px;
    letter-spacing: -.035em;
}

.form-page-subtitle {
    margin: 5px 0 0;
    color: var(--muted);
}

.form-shell {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-section {
    padding: 22px;
    border-bottom: 1px solid var(--border);
}

.form-section:last-child {
    border-bottom: 0;
}

.form-section-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 18px;
}

.form-section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.form-section-description {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.form-grid-2,
.form-grid-3,
.form-grid-4 {
    display: grid;
    gap: 16px;
}

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

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

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

.form-field {
    min-width: 0;
}

.form-field label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 750;
    color: #334155;
}

.form-field label .required {
    color: var(--danger);
}

.form-field input,
.form-field textarea,
.form-field select {
    margin: 0;
}

.form-field textarea {
    min-height: 110px;
}

.form-help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 11px;
}

.form-error {
    margin-top: 6px;
    color: var(--danger);
    font-size: 11px;
    font-weight: 650;
}

.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea,
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
    border-color: var(--danger);
    background: #fffafa;
}

.form-field.has-error input:focus,
.form-field.has-error select:focus,
.form-field.has-error textarea:focus,
input.is-invalid:focus,
select.is-invalid:focus,
textarea.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(185, 28, 28, .10);
}

.form-field.has-success input,
.form-field.has-success select,
.form-field.has-success textarea,
input.is-valid,
select.is-valid,
textarea.is-valid {
    border-color: #22c55e;
}

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group > * {
    border-radius: 0;
}

.input-group > *:first-child {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.input-group > *:last-child {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.input-prefix,
.input-suffix {
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: var(--muted);
    font-weight: 650;
}

.input-group input {
    flex: 1;
}

.checkbox-row,
.radio-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.checkbox-item,
.radio-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-item input,
.radio-item input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 18px 22px;
    background: #f8fafc;
    border-top: 1px solid var(--border);
}

.form-actions.sticky {
    position: sticky;
    bottom: 0;
    z-index: 50;
}

.form-actions .btn,
.form-actions button {
    min-width: 110px;
}

.btn-light {
    background: #fff;
    color: #334155;
    border: 1px solid var(--border);
}

.btn-light:hover {
    background: #f8fafc;
    color: var(--text);
}

.btn-outline-danger {
    background: #fff;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-outline-danger:hover {
    background: var(--danger-bg);
}

.alert-stack {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.alert {
    position: relative;
}

.alert-title {
    font-weight: 800;
    margin-bottom: 2px;
}

.alert-text {
    font-size: 12px;
}

.alert-dismissible {
    padding-right: 42px;
}

.alert-close {
    position: absolute;
    right: 10px;
    top: 8px;
    width: 28px;
    height: 28px;
    min-height: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: currentColor;
    opacity: .65;
}

.alert-close:hover {
    background: rgba(255,255,255,.4);
    opacity: 1;
}

/* Modal system */
.modal-backdrop-app {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(15, 23, 42, .55);
    z-index: 2000;
}

.modal-backdrop-app.is-open {
    display: flex;
}

.modal-app {
    width: min(100%, 560px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .30);
    border: 1px solid var(--border);
}

.modal-app.modal-lg {
    width: min(100%, 820px);
}

.modal-header-app,
.modal-footer-app {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-header-app {
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.modal-footer-app {
    justify-content: flex-end;
    border-top: 1px solid var(--border);
    background: #f8fafc;
}

.modal-title-app {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
}

.modal-body-app {
    padding: 18px;
}

.modal-close-app {
    width: 34px;
    height: 34px;
    min-height: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--border);
    color: #475569;
}

.modal-close-app:hover {
    background: #f8fafc;
    color: var(--text);
}

/* Confirmation dialog */
.confirm-icon {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 900;
    font-size: 20px;
}

.confirm-icon.warning {
    background: var(--warning-bg);
    color: #92400e;
}

.confirm-icon.danger {
    background: var(--danger-bg);
    color: var(--danger);
}

.confirm-copy h3 {
    margin: 0 0 6px;
    font-size: 17px;
}

.confirm-copy p {
    margin: 0;
    color: var(--muted);
}

/* Details/summary blocks */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.detail-item {
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #f8fafc;
}

.detail-label {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.detail-value {
    margin-top: 4px;
    font-weight: 750;
}

/* Wizard / step forms */
.form-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    overflow-x: auto;
}

.form-step {
    flex: 1;
    min-width: 140px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.form-step.active {
    border-color: var(--primary);
    background: var(--primary-soft);
    color: var(--primary);
}

.form-step.completed {
    border-color: #bbf7d0;
    background: var(--success-bg);
    color: #166534;
}

@media (max-width: 900px) {
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .form-page-header {
        flex-direction: column;
    }

    .form-grid-2,
    .form-grid-3,
    .form-grid-4 {
        grid-template-columns: 1fr;
    }

    .form-section {
        padding: 18px 15px;
    }

    .form-actions {
        padding: 14px 15px;
        flex-direction: column-reverse;
    }

    .form-actions .btn,
    .form-actions button {
        width: 100%;
    }

    .modal-backdrop-app {
        padding: 10px;
        align-items: flex-end;
    }

    .modal-app,
    .modal-app.modal-lg {
        width: 100%;
        max-height: calc(100vh - 20px);
        border-radius: 14px 14px 0 0;
    }
}

@media print {
    .form-actions,
    .modal-backdrop-app,
    .alert-close {
        display: none !important;
    }

    .form-shell {
        box-shadow: none;
        border: 0;
    }
}


/* ===== theme-package-6.css ===== */
/* Inventory SaaS — Theme Package 6
   Authentication screens: login, registration, forgot/reset password, 2FA
*/

.auth-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
    background: #eef2f7;
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 56px;
    background:
        radial-gradient(circle at 20% 20%, rgba(37, 99, 235, .24), transparent 34%),
        radial-gradient(circle at 85% 70%, rgba(14, 165, 233, .16), transparent 28%),
        #0f172a;
    color: #fff;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    inset: auto -90px -120px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow:
        0 0 0 60px rgba(255,255,255,.02),
        0 0 0 120px rgba(255,255,255,.015);
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 590px;
}

.auth-brand-mark {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    margin-bottom: 26px;
    border-radius: 13px;
    background: var(--primary);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.03em;
}

.auth-brand-title {
    margin: 0;
    max-width: 520px;
    font-size: clamp(34px, 4vw, 52px);
    line-height: 1.05;
    letter-spacing: -.045em;
}

.auth-brand-copy {
    margin: 20px 0 0;
    max-width: 540px;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
}

.auth-trust-list {
    display: grid;
    gap: 12px;
    margin-top: 30px;
}

.auth-trust-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    font-size: 13px;
}

.auth-trust-dot {
    width: 21px;
    height: 21px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(34, 197, 94, .14);
    color: #86efac;
    font-size: 11px;
    font-weight: 900;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 28px;
    background: #f8fafc;
}

.auth-card {
    width: min(100%, 470px);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 55px rgba(15, 23, 42, .08);
    padding: 30px;
}

.auth-card.auth-card-wide {
    width: min(100%, 620px);
}

.auth-heading {
    margin-bottom: 22px;
}

.auth-title {
    margin: 0;
    font-size: 25px;
    font-weight: 850;
    letter-spacing: -.035em;
    color: var(--text);
}

.auth-subtitle {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.auth-form {
    background: transparent !important;
    padding: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
    max-width: none !important;
}

.auth-form .form-field {
    margin-bottom: 15px;
}

.auth-form label {
    font-size: 12px;
    font-weight: 750;
    color: #334155;
}

.auth-form input,
.auth-form select,
.auth-form textarea {
    min-height: 46px;
    margin: 6px 0 0;
    border-radius: 9px;
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap input {
    padding-right: 84px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 32px;
    padding: 4px 8px;
    margin: 0;
    border: 0;
    background: transparent;
    color: var(--primary);
    font-size: 11px;
    font-weight: 750;
}

.password-toggle:hover {
    background: var(--primary-soft);
}

.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 12px;
}

.auth-checkbox input {
    width: auto;
    min-height: auto;
    margin: 0;
}

.auth-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-submit {
    width: 100%;
    min-height: 47px;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 800;
}

.auth-secondary-action {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

.auth-alert {
    margin-bottom: 16px;
}

.auth-security-note {
    margin-top: 18px;
    padding: 12px 13px;
    border-radius: 9px;
    background: #f8fafc;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
}

/* Password strength */
.password-rules {
    display: grid;
    gap: 6px;
    margin-top: 9px;
}

.password-rule {
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 11px;
}

.password-rule::before {
    content: "•";
    color: #94a3b8;
}

.password-rule.valid {
    color: #166534;
}

.password-rule.valid::before {
    content: "✓";
    color: #22c55e;
}

/* Registration */
.auth-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.auth-plan-note {
    padding: 12px 14px;
    border-radius: 10px;
    background: var(--primary-soft);
    color: #1e40af;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid #bfdbfe;
}

/* 2FA */
.twofa-code-wrap {
    margin: 20px 0 10px;
}

.twofa-code-label {
    display: block;
    margin-bottom: 9px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.twofa-code-input {
    width: 100%;
    min-height: 58px !important;
    text-align: center;
    font-size: 27px !important;
    font-weight: 850;
    letter-spacing: .28em;
    padding-left: 1em !important;
}

.twofa-icon {
    width: 54px;
    height: 54px;
    margin: 0 auto 17px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 22px;
    font-weight: 900;
}

.twofa-help {
    margin-top: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.6;
}

/* Forgot/reset */
.auth-state-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 15px;
    background: #f1f5f9;
    color: #334155;
    font-size: 21px;
    font-weight: 900;
}

/* Footer */
.auth-footer {
    margin-top: 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 10px;
}

/* Loading state */
.auth-submit.is-loading {
    pointer-events: none;
    opacity: .72;
}

.auth-submit.is-loading::after {
    content: "...";
    margin-left: 5px;
}

/* Mobile */
@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 30px;
    }

    .auth-brand-title {
        font-size: 31px;
    }

    .auth-brand-copy {
        margin-top: 12px;
    }

    .auth-trust-list {
        display: none;
    }

    .auth-form-panel {
        padding: 28px 18px 40px;
    }
}

@media (max-width: 620px) {
    .auth-brand-panel {
        padding: 24px 18px;
    }

    .auth-brand-mark {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .auth-brand-title {
        font-size: 26px;
    }

    .auth-brand-copy {
        font-size: 13px;
    }

    .auth-card,
    .auth-card.auth-card-wide {
        padding: 22px 17px;
        border-radius: 13px;
    }

    .auth-grid-2 {
        grid-template-columns: 1fr;
    }

    .auth-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .twofa-code-input {
        font-size: 23px !important;
    }
}


/* ===== brand-blue-orange.css ===== */
/* Inventory SaaS — Integrated Blue & Orange Brand Layer */

:root {
    --primary: #1d4ed8;
    --primary-hover: #1e40af;
    --primary-soft: #eff6ff;

    --accent: #f97316;
    --accent-hover: #ea580c;
    --accent-soft: #fff7ed;

    --sidebar-bg: #0f2a52;
    --sidebar-bg-2: #123765;
    --sidebar-active: #1d4ed8;
    --sidebar-text: #dbeafe;
    --sidebar-muted: #93c5fd;

    --text: #172033;
    --muted: #64748b;
    --surface: #ffffff;
    --page-bg: #f5f7fb;
    --border: #e2e8f0;

    --success: #15803d;
    --success-bg: #f0fdf4;
    --warning: #c2410c;
    --warning-bg: #fff7ed;
    --danger: #b91c1c;
    --danger-bg: #fef2f2;
    --info-bg: #eff6ff;
}

/* Main shell */
body {
    background: var(--page-bg);
}

.sidebar {
    background:
        linear-gradient(180deg, var(--sidebar-bg) 0%, #0b1f3a 100%);
}

.brand-mark,
.auth-brand-mark {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 8px 20px rgba(249, 115, 22, .18);
}

.sidebar nav a,
.sidebar-nav a {
    color: var(--sidebar-text);
}

.sidebar-nav a.active,
.sidebar nav a:hover,
.sidebar-nav a:hover {
    background: linear-gradient(90deg, rgba(29, 78, 216, .95), rgba(29, 78, 216, .72));
    color: #fff;
}

.sidebar-nav a.active::before {
    background: var(--accent);
}

.nav-section {
    color: #93c5fd;
}

/* Buttons */
.btn,
button {
    background: var(--primary);
}

.btn:hover,
button:hover {
    background: var(--primary-hover);
}

.btn-accent,
.btn-orange,
.pos-complete-sale {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.btn-accent:hover,
.btn-orange:hover,
.pos-complete-sale:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-secondary,
.btn-light {
    background: #fff;
    color: var(--primary);
    border: 1px solid #bfdbfe;
}

.btn-secondary:hover,
.btn-light:hover {
    background: var(--primary-soft);
    color: var(--primary-hover);
}

/* Dashboard metrics */
.metric-card,
.saas-summary-card,
.summary-card {
    position: relative;
    overflow: hidden;
}

.metric-card::before,
.saas-summary-card::before,
.summary-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
}

.metric-card:nth-child(even)::before,
.saas-summary-card:nth-child(even)::before,
.summary-card:nth-child(even)::before {
    background: var(--accent);
}

/* Links and focus */
a {
    color: var(--primary);
}

input:focus,
select:focus,
textarea:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, .10);
}

/* Tables */
.table-modern th {
    background: #f1f5fb;
    color: #334155;
}

.table-modern tbody tr:hover {
    background: #f8fbff;
}

/* Badges */
.badge-info,
.status-processing,
.status-open,
.status-issued {
    background: var(--primary-soft);
    color: var(--primary-hover);
}

.badge-warning,
.status-pending,
.status-partially_paid,
.status-partial,
.status-draft {
    background: var(--accent-soft);
    color: #9a3412;
}

/* POS */
.pos-category-tabs .active,
.pos-category-tabs a:hover,
.pos-category-tabs button:hover,
.pos-payment-method:hover,
.pos-payment-method.active {
    background: var(--primary-soft);
    color: var(--primary);
    border-color: #93c5fd;
}

.pos-product-card:hover,
.product-item:hover {
    border-color: #93c5fd;
    box-shadow: 0 8px 22px rgba(29, 78, 216, .09);
}

.pos-cart {
    border-top: 3px solid var(--accent);
}

.pos-summary-row.total strong {
    color: var(--primary);
}

.pos-change-box {
    border-left: 4px solid var(--accent);
}

/* Billing / plans */
.plan-card-modern.featured {
    border-color: #60a5fa;
}

.plan-ribbon {
    background: var(--accent-soft);
    color: #c2410c;
}

.current-plan-card {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff 0%, #fff 72%);
}

.current-plan-card::after {
    content: "";
    display: block;
    height: 4px;
    margin: 16px -18px -18px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
}

.usage-fill {
    background: var(--primary);
}

.usage-fill.warning {
    background: var(--accent);
}

/* System health */
.health-score-ring {
    background:
        radial-gradient(circle at center, white 59%, transparent 60%),
        conic-gradient(var(--primary) 0 88%, var(--accent) 88% 94%, #e2e8f0 94% 100%);
}

/* Authentication */
.auth-brand-panel {
    background:
        radial-gradient(circle at 18% 18%, rgba(29, 78, 216, .32), transparent 34%),
        radial-gradient(circle at 82% 72%, rgba(249, 115, 22, .22), transparent 30%),
        #0f2342;
}

.auth-link,
.password-toggle {
    color: var(--primary);
}

.auth-submit {
    background: linear-gradient(90deg, var(--primary), #2563eb);
}

.auth-submit:hover {
    background: linear-gradient(90deg, var(--primary-hover), var(--primary));
}

.twofa-icon {
    background: linear-gradient(135deg, var(--primary-soft), var(--accent-soft));
    color: var(--primary);
}

/* Orange emphasis helpers */
.text-accent {
    color: var(--accent) !important;
}

.bg-accent-soft {
    background: var(--accent-soft) !important;
}

.border-accent {
    border-color: #fdba74 !important;
}

/* Use orange for attention, blue for primary action */
.locked-feature small {
    color: #fdba74;
}

.alert.warning {
    border-left: 4px solid var(--accent);
}

/* Print */
@media print {
    :root {
        --primary: #1d4ed8;
        --accent: #f97316;
    }
}
