
/* ============================================================
   GRID SYSTEM
   Mobile-first: all cols are 100% by default, then break up
   ============================================================ */

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

/* Every col gets padding */
.col-12,
.col-xs-6,
.col-sm-12,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12,
.col-lg-12 {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    box-sizing: border-box;
}

/* xs: always 50% (Bootstrap 3 col-xs-6 = col-6) */
.col-xs-6 { width: 50%; }

/* sm ≥576px */
@media (min-width: 576px) {
    .col-sm-12 { width: 100%; }
}

/* md ≥768px */
@media (min-width: 768px) {
    .col-md-4  { width: 33.3333%; }
    .col-md-6  { width: 50%; }
    .col-md-8  { width: 66.6667%; }
    .col-md-12 { width: 100%; }
}

/* lg ≥992px */
@media (min-width: 992px) {
    .col-lg-12 { width: 100%; }
}


/* ============================================================
   SPACING UTILITIES
   ============================================================ */

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.ms-0 { margin-left: 0 !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.ms-3 { margin-left: 1rem !important; }

.me-0 { margin-right: 0 !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.me-3 { margin-right: 1rem !important; }

.mx-auto { margin-left: auto !important; margin-right: auto !important; }

.pt-0 { padding-top: 0 !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pb-0 { padding-bottom: 0 !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.px-3 { padding-left: 1rem !important; padding-right: 1rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-3 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.p-0 { padding: 0 !important; }


/* ============================================================
   FLEXBOX UTILITIES
   ============================================================ */

.d-flex    { display: flex !important; }
.d-block   { display: block !important; }
.d-inline  { display: inline !important; }
.d-none    { display: none !important; }

.flex-wrap      { flex-wrap: wrap !important; }
.flex-nowrap    { flex-wrap: nowrap !important; }
.flex-d-column  { flex-direction: column !important; }
.flex-d-row     { flex-direction: row !important; }

.align-items-start    { align-items: flex-start !important; }
.align-items-center   { align-items: center !important; }
.align-items-end      { align-items: flex-end !important; }
.align-self-center    { align-self: center !important; }

.justify-content-start   { justify-content: flex-start !important; }
.justify-content-center  { justify-content: center !important; }
.justify-content-end     { justify-content: flex-end !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around  { justify-content: space-around !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }

/* Responsive flex */
@media (min-width: 576px) {
    .align-items-sm-center      { align-items: center !important; }
    .justify-content-sm-between { justify-content: space-between !important; }
    .flex-d-sm-row              { flex-direction: row !important; }
}

@media (min-width: 768px) {
    .align-items-md-center      { align-items: center !important; }
    .justify-content-md-between { justify-content: space-between !important; }
    .flex-d-md-row              { flex-direction: row !important; }
    .flex-d-md-row-reverse      { flex-direction: row-reverse !important; }
    .flex-d-md-column           { flex-direction: column !important; }
    .d-md-flex                  { display: flex !important; }
    .d-md-none                  { display: none !important; }
    .d-md-block                 { display: block !important; }
}

@media (min-width: 992px) {
    .align-items-lg-center      { align-items: center !important; }
    .justify-content-lg-between { justify-content: space-between !important; }
    .flex-d-lg-row              { flex-direction: row !important; }
    .d-lg-flex                  { display: flex !important; }
    .d-lg-none                  { display: none !important; }
}

@media (min-width: 1200px) {
    .align-items-xl-center      { align-items: center !important; }
    .justify-content-xl-between { justify-content: space-between !important; }
}


/* ============================================================
   SIZE UTILITIES
   ============================================================ */

.w-100 { width: 100% !important; }
.w-50  { width: 50% !important; }
.h-100 { height: 100% !important; }


/* ============================================================
   TEXT UTILITIES
   ============================================================ */

.text-center    { text-align: center !important; }
.text-left      { text-align: left !important; }
.text-right     { text-align: right !important; }

.text-muted     { color: #6c757d !important; }
.text-primary   { color: #1265D8 !important; }
.text-success   { color: #198754 !important; }
.text-danger    { color: #dc3545 !important; }
.text-warning   { color: #ffc107 !important; }
.text-secondary { color: #6c757d !important; }
.text-white     { color: #fff !important; }
.text-dark      { color: #212529 !important; }

.fw-bold   { font-weight: 700 !important; }
.fw-600    { font-weight: 600 !important; }
.fw-normal { font-weight: 400 !important; }

.fs-6  { font-size: 1rem !important; }
.fs-5  { font-size: 1.25rem !important; }
.fs-4  { font-size: 1.5rem !important; }

.small { font-size: 0.875em; }

small.form-text.text-muted { text-align: left; }

.alert-heading {
    font-size: 1.1rem;
    font-weight: 700;
}

.link-primary {
    color: #1265D8;
    text-decoration: underline;
    cursor: pointer;
}

.link-danger {
    color: #dc3545;
    text-decoration: underline;
    cursor: pointer;
}

.link-primary:hover { color: #0f4289; }
.link-danger:hover  { color: #a71d2a; }


/* ============================================================
   BACKGROUND UTILITIES
   ============================================================ */

.bg-primary   { background-color: #1265D8 !important; }
.bg-success   { background-color: #198754 !important; }
.bg-danger    { background-color: #dc3545 !important; }
.bg-warning   { background-color: #ffc107 !important; }
.bg-secondary { background-color: #6c757d !important; }
.bg-light     { background-color: #f8f9fa !important; }
.bg-white     { background-color: #fff !important; }


/* ============================================================
   BORDER & RADIUS UTILITIES
   ============================================================ */

.rounded    { border-radius: 0.375rem !important; }
.rounded-1  { border-radius: 0.25rem !important; }
.rounded-2  { border-radius: 0.5rem !important; }
.rounded-3  { border-radius: 0.75rem !important; }
.rounded-circle { border-radius: 50% !important; }

.border         { border: 1px solid #dee2e6 !important; }
.border-0       { border: none !important; }
.border-top     { border-top: 1px solid #dee2e6 !important; }
.border-bottom  { border-bottom: 1px solid #dee2e6 !important; }

.shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,.1) !important; }
.shadow    { box-shadow: 0 2px 8px rgba(0,0,0,.12) !important; }


/* ============================================================
   POSITION UTILITIES
   ============================================================ */

.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed    { position: fixed !important; }

.overflow-hidden { overflow: hidden !important; }
.overflow-auto   { overflow: auto !important; }


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}

.btn:focus { outline: none; box-shadow: 0 0 0 3px rgba(18,101,216,.25); }

.btn-sm {
    padding: 0.25rem 0.9rem;
    font-size: 0.8rem;
    min-height: 34px;
    border-radius: 0.25rem;
}

.btn-lg {
    padding: 0.6rem 1.5rem;
    font-size: 1.1rem;
    min-height: 46px;
    border-radius: 0.5rem;
}

.btn-primary {
    background-color: #1265D8;
    border-color: #1265D8;
    color: #fff;
}
.btn-primary:hover { background-color: #0f4289; border-color: #0f4289; color: #fff; }

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}
.btn-secondary:hover { background-color: #545b62; border-color: #545b62; color: #fff; }

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}
.btn-warning:hover { background-color: #e0a800; border-color: #e0a800; }

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
.btn-danger:hover { background-color: #b02a37; border-color: #b02a37; }

.btn-dark {
    background-color: #212529;
    border-color: #212529;
    color: #fff;
}
.btn-dark:hover { background-color: #111316; border-color: #111316; }

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid #1265D8;
    color: #1265D8;
    border-radius: 0.375rem;
}
.btn-outline-primary:hover { background-color: #1265D8; color: #fff; }

.btn-outline-secondary {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    border-radius: 0.375rem;
}
.btn-outline-secondary:hover { background-color: #6c757d; color: #fff; }

.btn-outline-danger {
    background-color: transparent;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 0.375rem;
}
.btn-outline-danger:hover { background-color: #dc3545; color: #fff; }

.btn-outline-dark {
    background-color: transparent;
    border: 1px solid #343a40;
    color: #343a40;
    border-radius: 0.375rem;
}
.btn-outline-dark:hover { background-color: #343a40; color: #fff; }

/* Close / dismiss button */
.btn-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    border-radius: 0.25rem;
    font-size: 1.2rem;
    line-height: 1;
    color: #6c757d;
    cursor: pointer;
    opacity: 0.7;
}
.btn-close::before { content: '×'; }
.btn-close:hover { opacity: 1; color: #000; }


/* ============================================================
   BADGE
   ============================================================ */

.badge {
    display: inline-block;
    padding: 0.3em 0.65em;
    font-size: 0.75em;
    font-weight: 600;
    line-height: 1;
    border-radius: 0.375rem;
    white-space: nowrap;
}

.badge.bg-success   { color: #fff; }
.badge.bg-danger    { color: #fff; }
.badge.bg-warning   { color: #212529; }
.badge.bg-primary   { color: #fff; }
.badge.bg-secondary { color: #fff; }


/* ============================================================
   ALERTS
   ============================================================ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 14px 18px;
    border-radius: 8px;
    border: 1px solid transparent;
    font-size: 14px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0a3622;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #58151c;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

/* Dismissible alerts — JS adds/removes .show to toggle visibility */
.alert-dismissible {
    padding-right: 3rem;
    position: relative;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
}

.fade { opacity: 0; transition: opacity .15s linear; }
.fade.show { opacity: 1; }


/* ============================================================
   FORM CONTROLS
   ============================================================ */

.form-group { margin-bottom: 1rem; text-align: left; }

.form-label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #212529;
    background-color: #f9fafb;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    transition: border-color .15s ease, box-shadow .15s ease;
    box-sizing: border-box;
    outline: none;
}

.form-control:focus {
    border-color: #1265D8;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(18,101,216,.15);
}

.form-control-lg {
    padding: 0.65rem 1rem;
    font-size: 1rem;
    border-radius: 0.5rem;
}

.form-control.is-invalid { border-color: #dc3545; }
.form-control.is-valid   { border-color: #198754; }

.form-text {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #6c757d;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
}

.form-check-input {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.form-check-label { font-size: 13px; cursor: pointer; }

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

.input-group .form-control { border-radius: 0.375rem 0 0 0.375rem; flex: 1; }
.input-group .btn           { border-radius: 0 0.375rem 0.375rem 0; }

.section-header h2 { line-height: 1.3; }


/* ============================================================
   MOBILE OVERRIDES  (≤767px)
   ============================================================ */

@media (max-width: 767px) {

    /* Stack all grid columns */
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-12 {
        width: 100% !important;
    }

    /* Simplify row negative margins */
    .row {
        margin-right: -8px;
        margin-left: -8px;
    }

    .col-12,
    .col-xs-6,
    .col-sm-12,
    .col-md-4,
    .col-md-6,
    .col-md-8,
    .col-md-12,
    .col-lg-12 {
        padding-right: 8px;
        padding-left: 8px;
    }

    /* Full-width buttons on mobile */
    .btn-block-xs { width: 100%; }

    /* Alert flex stacks */
    .alert-dismissible { padding-right: 2.5rem; }

    .d-none-xs { display: none !important; }
}

/* ≤575px small phones */
@media (max-width: 575px) {
    .col-xs-6 { width: 100%; }

    .text-center-xs { text-align: center !important; }

    .btn-sm {
        padding: 0.3rem 0.75rem;
        font-size: 0.78rem;
    }
}


/* ============================================================
   PILL — category / filter tag
   ============================================================ */

.pill {
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid #e0e0e0;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.pill.active {
    background: #1265D8;
    color: #fff;
    border-color: #1265D8;
}


/* ============================================================
   TOP BADGE
   ============================================================ */

.top-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #7c3aed;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
}


/* ============================================================
   ACTION CHIP
   ============================================================ */

.action-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #d1d5db;
    background: #f3f4f6;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s;
}
.action-chip:hover                { background: #dde4f0; }
.action-chip--alert               { background: #eff6ff; color: #1265D8; border-color: #bfdbfe; }
.action-chip--alert:hover         { background: #dbeafe; }
.action-chip--login               { background: #fabd01; color: #1a1a2e; border: none; }
.action-chip--login:hover         { background: #f0b000; }


/* ============================================================
   SUBMIT FORM UTILITIES
   ============================================================ */

.form-section-title {
    font-size: 14px;
    font-weight: 700;
    color: #1265D8;
    text-transform: uppercase;
    letter-spacing: .5px;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 8px;
    margin: 28px 0 16px;
}
.form-section-title:first-child { margin-top: 0; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
}

.span-2 { grid-column: span 2; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }

.field-error {
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
}

.alert-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #7f1d1d;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 13px;
}
.alert-error ul { margin: 6px 0 0 18px; }

.submitter-info {
    background: #f0f7ff;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: #374151;
    margin-bottom: 16px;
}
.submitter-info strong { color: #1265D8; }

.checkbox-wrap {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
}
.checkbox-wrap input[type="checkbox"] {
    margin-top: 3px;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.checkbox-wrap label { color: #374151; }

.submit-btn { margin-top: 24px; text-align: center; }
.submit-btn button {
    background: #1265D8;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.submit-btn button:hover { background: #0f4289; }


/* ============================================================
   DASHBOARD — Common layout
   ============================================================ */

.dashboard-container {
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.dashboard-header            { margin-bottom: 30px; }
.dashboard-header h1         { font-size: 32px; font-weight: 700; margin-bottom: 5px; }
.dashboard-header p          { color: #666; font-size: 16px; }

.dashboard-card {
    background: #fff;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    overflow: hidden;
    transition: border-color .3s, box-shadow .3s;
    height: 100%;
}

.dashboard-card:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(102, 126, 234, .1);
}

.card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-header h5 { margin: 0; font-size: 16px; font-weight: 600; }

.card-body { padding: 20px; }

.profile-info,
.security-info,
.plan-info,
.status-info {
    display: flex;
    flex-direction: column;
}

/* ── Account Status card ── */
.acct-status-rows {
    display: flex;
    flex-direction: column;
}
.acct-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.acct-status-row:last-child { border-bottom: none; }
.acct-status-label {
    color: #6b7280;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.acct-status-label i { width: 14px; text-align: center; font-size: 12px; }
.acct-status-value { color: #111827; font-weight: 500; text-align: right; }

.acct-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.acct-pill--active { background: #dcfce7; color: #166534; }
.acct-pill--warn   { background: #fef9c3; color: #854d0e; }
.acct-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #16a34a;
    display: inline-block;
}

.acct-danger-zone {
    padding: 15px 20px;
    border-top: 1px solid #fee2e2;
    background: #fff8f8;
    border-radius: 0 0 10px 10px;
}
.acct-deactivate-btn {
    background: none;
    border: 1px solid #fca5a5;
    color: #dc2626;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background .15s, color .15s;
}
.acct-deactivate-btn:hover { background: #fee2e2; border-color: #dc2626; }

.info-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
.info-item:last-child             { border-bottom: none; }
.info-item label {
    display: block;
    font-weight: 600;
    color: #666;
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 5px;
}
.info-item p { margin: 0; font-size: 14px; color: #333; }

.security-item         { display: flex; gap: 15px; align-items: flex-start; }
.security-item i       { font-size: 20px; margin-top: 2px; }
.security-item label   { display: block; font-weight: 600; color: #333; margin-bottom: 2px; }
.security-item p       { margin: 0; font-size: 13px; color: #666; }

.badge-2fa {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.badge-2fa-on  { background: #e8f5e9; color: #2e7d32; }
.badge-2fa-off { background: #fff3e0; color: #e65100; }

.dash-link-btn {
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    cursor: pointer;
    text-decoration: underline;
}
.dash-link-btn.link-primary { color: #1265D8; }
.dash-link-btn.link-danger  { color: #dc3545; }
.dash-link-btn:hover        { opacity: .8; }


/* ============================================================
   DASHBOARD — Modals (2FA setup/disable, deactivate)
   ============================================================ */

.dsh-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 9000;
    align-items: center;
    justify-content: center;
}
.dsh-overlay.open { display: flex; }

.dsh-modal {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    width: 100%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { transform: translateY(20px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.dsh-modal h3             { font-size: 20px; font-weight: 700; margin-bottom: 6px; color: #1a1a2e; }
.dsh-modal p.modal-sub    { color: #666; font-size: 14px; margin-bottom: 22px; }

.dsh-modal-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}
.dsh-modal-close:hover { color: #333; }

.dsh-form-group { margin-bottom: 16px; }
.dsh-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}
.dsh-form-group input[type=text],
.dsh-form-group input[type=password] {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}
.dsh-form-group input:focus { border-color: #1265D8; }

.dsh-modal-alert {
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    display: none;
}
.dsh-modal-alert.error   { background: #fff0f0; color: #c62828; border: 1px solid #ffcdd2; display: block; }
.dsh-modal-alert.success { background: #f0fff4; color: #2e7d32; border: 1px solid #c8e6c9; display: block; }
.dsh-modal-alert.warn    { background: #fff8e1; color: #e65100; border: 1px solid #ffe082; display: block; }

.dsh-btn {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
    margin-top: 4px;
}
.dsh-btn:disabled              { opacity: .6; cursor: not-allowed; }
.dsh-btn-primary               { background: #1265D8; color: #fff; }
.dsh-btn-danger                { background: #dc3545; color: #fff; }
.dsh-btn:not(:disabled):hover  { opacity: .88; }

.secret-box {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 3px;
    background: #f4f6fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    margin-bottom: 16px;
    word-break: break-all;
}

.tfa-otp-input {
    text-align: center;
    letter-spacing: 10px;
    font-size: 22px;
    font-weight: 700;
}


/* ============================================================
   DASHBOARD — Alerts card preview (dashboard index)
   ============================================================ */

.alerts-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 6px;
    vertical-align: middle;
}

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

.alerts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.alerts-table th {
    background: #f8f9fa;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.alerts-table td {
    padding: 11px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.alerts-table tbody tr:last-child td { border-bottom: none; }
.alerts-table tbody tr:hover td     { background: #fafafa; }
.alerts-row--paused { opacity: .55; }

.alert-tag {
    display: inline-block;
    font-size: 11px;
    background: #f0f4ff;
    color: #3b5bdb;
    border-radius: 4px;
    padding: 2px 7px;
    margin: 2px 2px 2px 0;
}

.alert-status-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 20px;
}
.alert-status-badge--active { background: #dcfce7; color: #166534; }
.alert-status-badge--paused { background: #f3f4f6; color: #6b7280; }


/* ============================================================
   DASHBOARD — Submitted auctions table
   ============================================================ */

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

.submitted-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.submitted-table th {
    background: #f8f9fa;
    color: #6b7280;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 10px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}
.submitted-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}
.submitted-table tbody tr:last-child td { border-bottom: none; }
.submitted-table tbody tr:hover td     { background: #fafafa; }

.sub-title {
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    color: #111827;
}
.sub-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.sub-badge--pending  { background: #fef9c3; color: #854d0e; }
.sub-badge--approved { background: #dcfce7; color: #166534; }
.sub-badge--rejected { background: #fee2e2; color: #991b1b; }

.sub-note {
    display: inline-block;
    margin-left: 4px;
    cursor: help;
    color: #6b7280;
    font-size: 13px;
}


/* ============================================================
   ALERTS PAGE — Full alert cards
   ============================================================ */

.alerts-count-bar {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    font-weight: 500;
}

.alerts-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 14px;
    border: 2px dashed #e0e0e0;
}
.alerts-empty-icon { font-size: 48px; margin-bottom: 14px; }
.alerts-empty h3   { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.alerts-empty p    { color: #666; font-size: 15px; }
.alerts-empty a    { color: #1265D8; text-decoration: none; font-weight: 600; }

.alerts-list { display: flex; flex-direction: column; gap: 14px; }

.alert-card {
    background: #fff;
    border: 1.5px solid #e4e8f0;
    border-radius: 12px;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.alert-card:hover       { border-color: #1265D8; box-shadow: 0 4px 14px rgba(18,101,216,.08); }
.alert-card--paused     { opacity: .55; }
.alert-card-body        { flex: 1; min-width: 0; }

.alert-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.alert-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.alert-tag--keyword { background: #eff6ff; color: #1d4ed8; }
.alert-tag--city    { background: #f0fdf4; color: #166534; }
.alert-tag--type    { background: #fff7ed; color: #9a3412; }
.alert-tag--bank    { background: #faf5ff; color: #6b21a8; }
.alert-tag--price   { background: #fefce8; color: #854d0e; }

.alert-meta          { font-size: 12px; color: #999; }

.alert-card-actions  { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; }

.alert-toggle-btn,
.alert-delete-btn {
    padding: 7px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity .2s;
}
.alert-toggle-btn              { background: #f3f4f6; color: #374151; }
.alert-delete-btn              { background: #fff0f0; color: #b91c1c; }
.alert-toggle-btn:hover,
.alert-delete-btn:hover        { opacity: .8; }


/* ============================================================
   MOBILE OVERRIDES — Dashboard & alerts
   ============================================================ */

@media (max-width: 768px) {
    .dashboard-container    { padding: 20px 14px; }
    .dashboard-header h1    { font-size: 24px; }
    .card-header            { flex-direction: column; align-items: flex-start; gap: 10px; }
    .dsh-modal              { padding: 28px 18px; }
    .alert-card             { flex-direction: column; }
    .alert-card-actions     { flex-direction: row; }
    .form-grid              { grid-template-columns: repeat(2, 1fr); }
    .span-3, .span-4        { grid-column: span 2; }
    .nav-menu li a          {padding: 7px 15px;}
    .nav-menu               {left: 100px; width: 75%;}
}

@media (max-width: 575px) {
    .form-grid              { grid-template-columns: 1fr; }
    .span-2, .span-3, .span-4 { grid-column: span 1; }
}


/* ── new-app additions: aliases + helpers not present in the legacy CSS ── */
.container-wide { width: min(1280px, calc(100% - 32px)); margin: 0 auto; }
.listing-wrap { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .listing-wrap { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 8px; }
.empty-block { text-align: center; padding: 60px 20px; color: #64748b; background: #fff; border: 1px dashed #cbd5e1; border-radius: 16px; }
:root { --bg: #ffffff; --muted: #64748b; --border: #e2e8f0; --yellow: #fabd01; }

/* ── new-app page helpers (account / auth / static pages / forms) ── */
.section-sm { padding: 34px 0; }
.btn-block { display: block; width: 100%; text-align: center; }
.auction-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.flash { width: min(1180px, calc(100% - 32px)); margin: 16px auto 0; border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.flash-ok { background: #e9f9f2; border: 1px solid #bbf7d0; color: #065f46; }
.flash-err { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.text-muted { color: #64748b; }

.panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(15,23,42,.06); margin-bottom: 16px; }
.panel h2 { font-size: 16px; margin: 0 0 4px; }

.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 5px; }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border: 1px solid #cbd5e1; border-radius: 9px; font-size: 14px; background: #fff; font-family: inherit; }
.field .error, .error { color: #dc2626; font-size: 12px; margin-top: 4px; }
.field .hint { color: #64748b; font-size: 12px; margin-top: 4px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #334155; }
.checkbox-row input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; overflow: hidden; font-size: 14px; }
.data-table thead { background: #f8fafc; }
.data-table th { text-align: left; padding: 11px 16px; font-weight: 700; color: #64748b; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
.data-table td { padding: 11px 16px; border-top: 1px solid #f1f5f9; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }

.rate-card { border: 1px solid #e2e8f0; border-radius: 16px; padding: 20px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.rate-card .rate-label { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: #64748b; }
.rate-card .rate-value { font-size: 26px; font-weight: 800; color: #07162f; margin-top: 4px; }
.rate-card.gold { background: #fffbeb; border-color: #fde68a; }
.rate-card.gold .rate-label { color: #b45309; }

.prose { max-width: 720px; margin: 0 auto; }
.prose h1 { font-size: 28px; }
.prose h2 { font-size: 20px; margin-top: 1.4em; }
.prose p, .prose li { color: #334155; line-height: 1.7; }

.account-wrap { display: grid; grid-template-columns: 220px 1fr; gap: 24px; align-items: start; }
@media (max-width: 800px) { .account-wrap { grid-template-columns: 1fr; } }
.account-nav { background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 8px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.account-nav a, .account-nav button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border-radius: 8px; font-size: 14px; color: #334155; background: none; border: 0; cursor: pointer; text-align: left; }
.account-nav a.is-active { background: #eaf2ff; color: #0b4fb1; font-weight: 700; }
.account-nav a:hover, .account-nav button:hover { background: #f8fafc; }

.auth-wrap { max-width: 460px; margin: 40px auto; padding: 0 16px; }
.auth-brand { display: flex; align-items: center; gap: 10px; justify-content: center; margin-bottom: 16px; }
.auth-brand .mark, .auth-brand-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: #1265d8; color: #fff; font-weight: 800; }
.auth-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 18px; padding: 26px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.auth-card h1 { font-size: 22px; margin: 0; }

/* static-page helpers */
.hero12-grid { max-width: 1180px; margin: 0 auto; padding: 12px 16px; }
.hero12-grid h1 { margin: 0 0 4px; font-size: 26px; }
.hero12-grid p { margin: 0; opacity: .8; font-size: 13px; }
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 15px; }
.section-padding-about { padding: 40px 0; }
