/* ==========================================================================
   QUALYPROT — Client Portal Styles
   ========================================================================== */

/* ===== LOGIN PAGE ===== */
.portal-hero { padding: 3rem 0 4rem; background: var(--gray-50); min-height: calc(100vh - 80px); display: flex; align-items: center; }
.portal-login-wrap { display: grid; gap: 3rem; align-items: start; }
@media (min-width: 960px) { .portal-login-wrap { grid-template-columns: 1fr 440px; gap: 4rem; } }

.portal-badge { display: inline-block; background: var(--green-gradient); color: white; padding: 0.35rem 1rem; border-radius: 100px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 1.25rem; }
.portal-info h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.15; color: var(--dark); margin-bottom: 0.75rem; }
.portal-info > p { font-size: 1.05rem; color: var(--gray-700); line-height: 1.6; margin-bottom: 2rem; }

.portal-features { display: flex; flex-direction: column; gap: 1.25rem; }
.portal-feature { display: flex; gap: 1rem; align-items: flex-start; }
.pf-icon { font-size: 1.5rem; flex-shrink: 0; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: white; border-radius: var(--radius-md); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.portal-feature div { display: flex; flex-direction: column; }
.portal-feature strong { font-size: 0.95rem; color: var(--dark); }
.portal-feature span { font-size: 0.85rem; color: var(--gray-500); }

/* Form Card */
.portal-form-card { background: white; border-radius: var(--radius-lg); box-shadow: 0 8px 40px rgba(0,0,0,0.08); overflow: hidden; }
.portal-tabs { display: flex; border-bottom: 2px solid var(--gray-100); }
.portal-tab { flex: 1; padding: 1rem; text-align: center; font-weight: 600; font-size: 0.95rem; background: none; border: none; color: var(--gray-500); cursor: pointer; position: relative; transition: color 0.2s; }
.portal-tab.active { color: var(--green-primary); }
.portal-tab.active::after { content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 2px; background: var(--green-primary); }
.portal-tab:hover { color: var(--dark); }

.portal-form { padding: 2rem; }
.portal-form h2 { font-size: 1.35rem; font-weight: 700; color: var(--dark); margin-bottom: 0.35rem; }
.form-subtitle { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--dark); margin-bottom: 0.4rem; }
.form-group input, .form-group select { width: 100%; padding: 0.7rem 0.9rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.9rem; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; background: white; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.12); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.input-icon-wrap { position: relative; }
.input-icon { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--gray-500); pointer-events: none; }
.input-icon-wrap input { padding-left: 2.5rem; }
.password-toggle { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--gray-500); cursor: pointer; padding: 0.2rem; }
.password-toggle:hover { color: var(--dark); }

.form-options { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.25rem; }
.checkbox-wrap { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--gray-700); cursor: pointer; }
.checkbox-wrap input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green-primary); }
.checkmark { display: inline-block; width: 18px; height: 18px; border: 1.5px solid var(--gray-300); border-radius: 4px; background: white; position: relative; }
.checkbox-wrap input[type="checkbox"]:checked ~ .checkmark { background: var(--green-primary); border-color: var(--green-primary); }
.checkbox-wrap input[type="checkbox"]:checked ~ .checkmark::after { content: '✓'; color: white; font-weight: bold; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 0.85rem; }
.forgot-link { font-size: 0.85rem; color: var(--green-primary); font-weight: 500; }
.forgot-link:hover { text-decoration: underline; }

.btn-full { width: 100%; justify-content: center; display: flex; align-items: center; gap: 0.5rem; }

.login-alert { margin-top: 1rem; padding: 0.85rem 1rem; border-radius: var(--radius-md); font-size: 0.88rem; font-weight: 500; }
.login-alert.success { background: rgba(76,163,64,0.1); color: var(--green-deep); border: 1px solid rgba(76,163,64,0.2); }
.login-alert.error { background: rgba(211,47,47,0.08); color: #C62828; border: 1px solid rgba(211,47,47,0.15); }
.login-alert.info { background: rgba(33,150,243,0.08); color: #1565C0; border: 1px solid rgba(33,150,243,0.15); }

.form-divider { display: flex; align-items: center; gap: 1rem; margin: 1.5rem 0; color: var(--gray-500); font-size: 0.85rem; }
.form-divider::before, .form-divider::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.demo-accounts { background: var(--gray-50); border-radius: var(--radius-md); padding: 1rem; }
.demo-label { font-size: 0.8rem; color: var(--gray-500); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 0.75rem; }
.demo-btn { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0.6rem 0.85rem; background: white; border: 1.5px solid var(--gray-200); border-radius: var(--radius-md); cursor: pointer; margin-bottom: 0.5rem; transition: border-color 0.2s, box-shadow 0.2s; }
.demo-btn:last-child { margin-bottom: 0; }
.demo-btn:hover { border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.08); }
.demo-type { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--green-primary); background: rgba(76,163,64,0.08); padding: 0.15rem 0.5rem; border-radius: 4px; }
.demo-company { font-weight: 600; color: var(--dark); font-size: 0.9rem; }

/* Account type selector */
.account-type-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.account-type-option { cursor: pointer; }
.account-type-option input { display: none; }
.ato-content { padding: 0.85rem; border: 2px solid var(--gray-200); border-radius: var(--radius-md); text-align: center; transition: border-color 0.2s, background 0.2s; }
.ato-content svg { color: var(--gray-500); margin-bottom: 0.25rem; }
.ato-content strong { display: block; font-size: 0.9rem; color: var(--dark); }
.ato-content span { font-size: 0.78rem; color: var(--gray-500); }
.account-type-option.active .ato-content, .account-type-option input:checked + .ato-content { border-color: var(--green-primary); background: rgba(76,163,64,0.04); }
.account-type-option.active .ato-content svg, .account-type-option input:checked + .ato-content svg { color: var(--green-primary); }

/* Trust strip */
.portal-trust { padding: 2.5rem 0; background: white; border-top: 1px solid var(--gray-100); }
.trust-items { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
@media (min-width: 768px) { .trust-items { grid-template-columns: repeat(4, 1fr); } }
.trust-item { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.25rem; }
.trust-item svg { color: var(--green-primary); margin-bottom: 0.25rem; }
.trust-item strong { font-size: 0.88rem; color: var(--dark); }
.trust-item span { font-size: 0.78rem; color: var(--gray-500); }


/* ===== VERIFICATION / 2FA STEPS ===== */
.verification-step { padding: 2rem; text-align: center; }
.verification-step h2 { font-size: 1.35rem; font-weight: 700; color: var(--dark); margin-bottom: 0.35rem; }
.verify-icon-wrap { display: flex; justify-content: center; margin-bottom: 1.25rem; }
.verify-icon-wrap svg { color: var(--green-primary); }

.verify-code-group { display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin: 1.5rem 0; }
.verify-digit { width: 48px; height: 56px; text-align: center; font-size: 1.5rem; font-weight: 700; color: var(--dark); border: 2px solid var(--gray-300); border-radius: var(--radius-md); background: white; transition: border-color 0.2s, box-shadow 0.2s; font-family: 'Inter', monospace; }
.verify-digit:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.15); }
.verify-dash { font-size: 1.3rem; color: var(--gray-400); font-weight: 300; margin: 0 0.15rem; }

.verify-footer { margin-top: 1.25rem; }
.verify-resend { font-size: 0.88rem; color: var(--gray-500); }
.verify-resend a { color: var(--green-primary); font-weight: 600; }
.verify-resend a:hover { text-decoration: underline; }
.verify-timer { font-size: 0.82rem; color: var(--gray-500); margin-top: 0.5rem; font-variant-numeric: tabular-nums; }

.verify-demo-hint { margin-top: 1.25rem; padding: 0.85rem 1rem; background: rgba(255,152,0,0.08); border: 1px solid rgba(255,152,0,0.2); border-radius: var(--radius-md); font-size: 0.88rem; color: #E65100; }
.verify-demo-hint .hint-label { font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.75rem; background: rgba(255,152,0,0.15); padding: 0.15rem 0.5rem; border-radius: 4px; }
.verify-demo-hint strong { font-size: 1.25rem; letter-spacing: 0.15em; color: #BF360C; display: inline-block; margin-left: 0.5rem; font-family: 'Inter', monospace; }

/* 2FA method buttons */
.twofa-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; margin: 1.25rem 0; }
.twofa-method-btn { display: flex; align-items: center; gap: 0.85rem; padding: 1rem; background: white; border: 2px solid var(--gray-200); border-radius: var(--radius-md); cursor: pointer; transition: border-color 0.2s, background 0.2s; text-align: left; }
.twofa-method-btn:hover { border-color: var(--green-primary); }
.twofa-method-btn.active { border-color: var(--green-primary); background: rgba(76,163,64,0.04); }
.twofa-method-btn svg { color: var(--gray-500); flex-shrink: 0; }
.twofa-method-btn.active svg { color: var(--green-primary); }
.twofa-method-btn div { display: flex; flex-direction: column; }
.twofa-method-btn strong { font-size: 0.9rem; color: var(--dark); }
.twofa-method-btn span { font-size: 0.78rem; color: var(--gray-500); }

.twofa-code-section { animation: fadeSlideIn 0.3s ease; }
@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== DASHBOARD ===== */
.dash-header { background: white; border-bottom: 1px solid var(--gray-200); height: 64px; position: sticky; top: 0; z-index: 100; }
.dash-header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; max-width: 1440px; margin: 0 auto; padding: 0 1.5rem; }
.dash-header .brand img { height: 42px; }
.dash-env-badge { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green-primary); background: rgba(76,163,64,0.08); padding: 0.3rem 0.8rem; border-radius: 100px; }

.dash-header-center { flex: 1; display: flex; align-items: center; justify-content: center; }
.dash-header-right { display: flex; align-items: center; gap: 1rem; }
.dash-user { display: flex; align-items: center; gap: 0.6rem; position: relative; cursor: pointer; padding: 0.4rem 0.6rem; border-radius: var(--radius-md); transition: background 0.15s; }
.dash-user:hover { background: var(--gray-50); }
.dash-avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--green-gradient); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; flex-shrink: 0; }
.dash-user-info { display: none; }
@media (min-width: 768px) { .dash-user-info { display: flex; flex-direction: column; } }
.dash-user-info strong { font-size: 0.85rem; color: var(--dark); line-height: 1.2; }
.dash-user-info span { font-size: 0.75rem; color: var(--gray-500); }
.dash-user-toggle { background: none; border: none; color: var(--gray-500); cursor: pointer; padding: 0; }
.dash-dropdown { position: absolute; top: 100%; right: 0; min-width: 180px; background: white; border-radius: var(--radius-md); box-shadow: 0 8px 32px rgba(0,0,0,0.12); border: 1px solid var(--gray-200); padding: 0.5rem 0; z-index: 200; }
.dash-dropdown a { display: block; padding: 0.55rem 1rem; font-size: 0.88rem; color: var(--gray-700); transition: background 0.15s; }
.dash-dropdown a:hover { background: var(--gray-50); color: var(--dark); }
.dash-dropdown hr { border: none; border-top: 1px solid var(--gray-100); margin: 0.35rem 0; }

/* Layout */
.dash-layout { display: flex; min-height: calc(100vh - 64px); }
.dash-sidebar { width: 240px; background: var(--dark); flex-shrink: 0; display: flex; flex-direction: column; }
.dash-nav { padding: 1rem 0.75rem; flex: 1; }
.dash-nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 0.85rem; border-radius: var(--radius-md); color: rgba(255,255,255,0.6); font-size: 0.9rem; font-weight: 500; transition: background 0.15s, color 0.15s; margin-bottom: 0.2rem; }
.dash-nav-item:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.9); }
.dash-nav-item.active { background: var(--green-primary); color: white; }
.dash-nav-item svg { flex-shrink: 0; }
.dash-sidebar-footer { padding: 0.75rem; border-top: 1px solid rgba(255,255,255,0.1); }

/* Mobile sidebar */
@media (max-width: 768px) {
    .dash-sidebar { width: 60px; }
    .dash-nav-item span, .dash-sidebar-footer span { display: none; }
    .dash-nav-item { justify-content: center; padding: 0.65rem; }
}

/* Main content */
.dash-main { flex: 1; background: var(--gray-50); padding: 2rem; overflow-y: auto; }
.dash-section { display: none; }
.dash-section.active { display: block; }
.dash-page-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 2rem; }
.dash-page-header h1 { font-size: 1.65rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.dash-subtitle { color: var(--gray-500); font-size: 0.95rem; }
.dash-filters { display: flex; gap: 0.75rem; align-items: center; flex-wrap: wrap; }
.dash-filters select, .dash-search { padding: 0.5rem 0.85rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.88rem; font-family: inherit; background: white; }
.dash-search { min-width: 200px; }
.dash-filters select:focus, .dash-search:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.12); }

/* Stats */
.dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 768px) { .dash-stats { grid-template-columns: repeat(4, 1fr); } }
.stat-card { background: white; border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid var(--gray-100); }
.stat-card .stat-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); margin-bottom: 0.35rem; }
.stat-card .stat-value { font-size: 1.75rem; font-weight: 800; color: var(--dark); }
.stat-card .stat-change { font-size: 0.78rem; margin-top: 0.25rem; }
.stat-card .stat-change.positive { color: var(--green-primary); }
.stat-card .stat-change.neutral { color: var(--gray-500); }

/* Cards */
.dash-card { background: white; border-radius: var(--radius-lg); box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid var(--gray-100); overflow: hidden; }
.dash-card-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--gray-100); }
.dash-card-header h3 { font-size: 1rem; font-weight: 700; color: var(--dark); }
.dash-link { font-size: 0.85rem; color: var(--green-primary); font-weight: 500; }
.dash-link:hover { text-decoration: underline; }
.dash-card-body { padding: 1.25rem; }

.dash-grid-2 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .dash-grid-2 { grid-template-columns: 1fr 1fr; } }
.dash-grid-3 { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

/* Activity items */
.activity-item { display: flex; gap: 0.85rem; padding: 0.75rem 0; border-bottom: 1px solid var(--gray-50); }
.activity-item:last-child { border-bottom: none; }
.activity-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1rem; }
.activity-icon.green { background: rgba(76,163,64,0.1); }
.activity-icon.blue { background: rgba(33,150,243,0.1); }
.activity-icon.orange { background: rgba(255,152,0,0.1); }
.activity-info { flex: 1; }
.activity-info strong { font-size: 0.88rem; color: var(--dark); display: block; }
.activity-info span { font-size: 0.8rem; color: var(--gray-500); }
.activity-date { font-size: 0.78rem; color: var(--gray-500); white-space: nowrap; }

/* Tables */
.dash-table-wrap { overflow-x: auto; background: white; border-radius: var(--radius-lg); box-shadow: 0 1px 4px rgba(0,0,0,0.04); border: 1px solid var(--gray-100); }
.dash-table { width: 100%; border-collapse: collapse; }
.dash-table th { padding: 0.85rem 1rem; text-align: left; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); background: var(--gray-50); border-bottom: 1px solid var(--gray-200); }
.dash-table td { padding: 0.85rem 1rem; font-size: 0.9rem; color: var(--gray-700); border-bottom: 1px solid var(--gray-50); }
.dash-table tbody tr:hover { background: rgba(76,163,64,0.02); }
.dash-table .order-id, .dash-table .contract-id { font-weight: 700; color: var(--dark); }
.table-action { font-size: 0.82rem; color: var(--green-primary); font-weight: 600; cursor: pointer; background: none; border: none; font-family: inherit; }
.table-action:hover { text-decoration: underline; }

/* Status badges */
.status-badge { display: inline-block; padding: 0.2rem 0.65rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.02em; }
.status-active { background: rgba(76,163,64,0.1); color: var(--green-deep); }
.status-expiring { background: rgba(255,152,0,0.1); color: #E65100; }
.status-expired { background: rgba(211,47,47,0.08); color: #C62828; }
.status-processing { background: rgba(33,150,243,0.1); color: #1565C0; }
.status-shipped { background: rgba(156,39,176,0.1); color: #7B1FA2; }
.status-delivered { background: rgba(76,163,64,0.1); color: var(--green-deep); }
.status-pending { background: rgba(255,152,0,0.1); color: #E65100; }

/* Document cards */
.doc-card { background: white; border-radius: var(--radius-md); border: 1px solid var(--gray-200); padding: 1.25rem; transition: box-shadow 0.2s, border-color 0.2s; cursor: pointer; }
.doc-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.06); border-color: var(--green-primary); }
.doc-icon { width: 44px; height: 44px; border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 0.75rem; }
.doc-icon.pdf { background: rgba(211,47,47,0.08); }
.doc-icon.cert { background: rgba(76,163,64,0.08); }
.doc-icon.report { background: rgba(33,150,243,0.08); }
.doc-card h4 { font-size: 0.92rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.doc-card p { font-size: 0.82rem; color: var(--gray-500); margin: 0; }
.doc-card .doc-meta { font-size: 0.75rem; color: var(--gray-500); margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--gray-100); display: flex; justify-content: space-between; }

/* Settings */
.settings-row { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--gray-50); }
.settings-row:last-child { border-bottom: none; }
.settings-row label { font-size: 0.88rem; color: var(--gray-500); font-weight: 500; }
.settings-row span { font-size: 0.88rem; color: var(--dark); font-weight: 600; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.modal { background: white; border-radius: var(--radius-lg); max-width: 640px; width: 100%; max-height: 80vh; overflow-y: auto; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--gray-100); }
.modal-header h2 { font-size: 1.15rem; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 1.5rem; color: var(--gray-500); cursor: pointer; padding: 0; line-height: 1; }
.modal-close:hover { color: var(--dark); }
.modal-body { padding: 1.5rem; }
.modal-body .detail-row { display: flex; justify-content: space-between; padding: 0.6rem 0; border-bottom: 1px solid var(--gray-50); font-size: 0.9rem; }
.modal-body .detail-row:last-child { border-bottom: none; }
.modal-body .detail-label { color: var(--gray-500); }
.modal-body .detail-value { color: var(--dark); font-weight: 600; }
.modal-body .detail-items { margin-top: 1rem; }
.modal-body .detail-items h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--gray-500); margin-bottom: 0.5rem; }
.modal-body .line-item { display: grid; grid-template-columns: 1fr auto auto; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--gray-50); font-size: 0.88rem; }
.modal-body .line-item:last-child { border-bottom: none; }
.modal-body .line-item .li-product { color: var(--dark); font-weight: 500; }
.modal-body .line-item .li-qty { color: var(--gray-500); text-align: center; }
.modal-body .line-item .li-price { color: var(--dark); font-weight: 600; text-align: right; }

/* Tracking bar */
.tracking-bar { display: flex; align-items: center; gap: 0; margin: 1.5rem 0; }
.tracking-step { flex: 1; text-align: center; position: relative; }
.tracking-step::before { content: ''; position: absolute; top: 14px; left: 0; right: 0; height: 3px; background: var(--gray-200); z-index: 0; }
.tracking-step:first-child::before { left: 50%; }
.tracking-step:last-child::before { right: 50%; }
.tracking-dot { width: 28px; height: 28px; border-radius: 50%; background: var(--gray-200); display: inline-flex; align-items: center; justify-content: center; position: relative; z-index: 1; color: white; font-size: 0.7rem; }
.tracking-step.done .tracking-dot { background: var(--green-primary); }
.tracking-step.done::before { background: var(--green-primary); }
.tracking-step.current .tracking-dot { background: var(--green-lime); box-shadow: 0 0 0 4px rgba(139,197,63,0.2); }
.tracking-label { display: block; font-size: 0.72rem; color: var(--gray-500); margin-top: 0.4rem; font-weight: 500; }
.tracking-step.done .tracking-label { color: var(--green-deep); }

/* ===== SHOP SECTION ===== */
.shop-layout { display: flex; flex-direction: column; min-height: calc(100vh - 64px - 2rem); }

.shop-header { margin-bottom: 2rem; }
.shop-header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1.5rem; }
.shop-header-top h1 { font-size: 1.65rem; font-weight: 700; color: var(--dark); margin-bottom: 0.25rem; }
.shop-header-top .dash-subtitle { color: var(--gray-500); font-size: 0.95rem; }

/* Filters */
.shop-filters { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; }
.shop-search-box { position: relative; flex: 1; min-width: 240px; }
.shop-search-input { width: 100%; padding: 0.5rem 0.85rem 0.5rem 2.5rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.88rem; font-family: inherit; background: white; }
.shop-search-input:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.12); }
.shop-filter-select { padding: 0.5rem 0.85rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.88rem; font-family: inherit; background: white; min-width: 140px; }
.shop-filter-select:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.12); }

/* Container */
.shop-container { display: grid; grid-template-columns: 1fr 320px; gap: 1.5rem; flex: 1; }
@media (max-width: 1200px) { .shop-container { grid-template-columns: 1fr 280px; gap: 1rem; } }
@media (max-width: 768px) { .shop-container { grid-template-columns: 1fr; } }

/* Products */
.shop-products { display: flex; flex-direction: column; }
.shop-products-header { margin-bottom: 1rem; }
.shop-products-header span { font-size: 0.88rem; color: var(--gray-500); font-weight: 500; }

.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
@media (min-width: 768px) { .shop-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
@media (min-width: 1200px) { .shop-grid { grid-template-columns: repeat(4, 1fr); } }

/* Product Card */
.product-card { background: white; border: 1.5px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; transition: border-color 0.2s, box-shadow 0.2s; display: flex; flex-direction: column; }
.product-card:hover { border-color: var(--green-primary); box-shadow: 0 4px 16px rgba(76,163,64,0.1); }

.product-card-header { padding: 1rem; background: var(--gray-50); border-bottom: 1px solid var(--gray-100); }
.product-card-brand { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 700; color: var(--green-primary); margin-bottom: 0.25rem; }
.product-card-name { font-size: 0.92rem; font-weight: 700; color: var(--dark); line-height: 1.3; }

.product-card-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: 0.75rem; }
.product-card-sku { font-size: 0.75rem; color: var(--gray-500); font-weight: 500; font-family: monospace; }
.product-card-category { font-size: 0.8rem; color: var(--gray-600); }
.product-card-specs { display: flex; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0; }
.product-card-spec { font-size: 0.75rem; background: var(--gray-100); color: var(--gray-600); padding: 0.25rem 0.5rem; border-radius: 4px; }

.product-card-price { margin: 0.5rem 0; }
.product-card-price-value { font-size: 1.4rem; font-weight: 800; color: var(--green-primary); }
.product-card-price-unit { font-size: 0.75rem; color: var(--gray-500); }

.product-card-stock { font-size: 0.8rem; padding: 0.35rem 0.65rem; border-radius: 4px; display: inline-block; width: fit-content; margin: 0.5rem 0; }
.product-card-stock.in-stock { background: rgba(76,163,64,0.1); color: var(--green-deep); }
.product-card-stock.low-stock { background: rgba(255,152,0,0.1); color: #E65100; }
.product-card-stock.out-of-stock { background: rgba(211,47,47,0.08); color: #C62828; }

.product-card-footer { padding: 1rem; border-top: 1px solid var(--gray-100); display: flex; gap: 0.5rem; }
.qty-input { width: 60px; padding: 0.45rem; border: 1.5px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.85rem; text-align: center; }
.qty-input:focus { outline: none; border-color: var(--green-primary); box-shadow: 0 0 0 3px rgba(76,163,64,0.12); }
.btn-add-cart { flex: 1; padding: 0.45rem 0.75rem; background: var(--green-primary); color: white; border: none; border-radius: var(--radius-md); font-weight: 600; font-size: 0.85rem; cursor: pointer; transition: background 0.2s; }
.btn-add-cart:hover { background: var(--green-deep); }
.btn-add-cart:disabled { background: var(--gray-400); cursor: not-allowed; }

/* Cart Sidebar */
.shop-cart { background: white; border-radius: var(--radius-lg); border: 1px solid var(--gray-200); display: flex; flex-direction: column; height: fit-content; position: sticky; top: 80px; }

.shop-cart-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem; border-bottom: 1px solid var(--gray-100); }
.shop-cart-header h3 { font-size: 1rem; font-weight: 700; color: var(--dark); margin: 0; }
.shop-cart-badge { background: var(--green-primary); color: white; border-radius: 50%; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.82rem; }

.shop-cart-items { flex: 1; overflow-y: auto; max-height: 280px; padding: 0.75rem; }
.cart-item { padding: 0.85rem; background: var(--gray-50); border-radius: var(--radius-md); margin-bottom: 0.5rem; font-size: 0.85rem; }
.cart-item-name { font-weight: 600; color: var(--dark); display: block; margin-bottom: 0.3rem; }
.cart-item-sku { font-size: 0.75rem; color: var(--gray-500); margin-bottom: 0.35rem; display: block; }
.cart-item-controls { display: flex; justify-content: space-between; align-items: center; margin-top: 0.5rem; }
.cart-item-qty { display: flex; align-items: center; gap: 0.35rem; }
.cart-item-qty-btn { background: white; border: 1px solid var(--gray-300); width: 24px; height: 24px; border-radius: 3px; cursor: pointer; font-weight: 600; font-size: 0.75rem; transition: border-color 0.2s; }
.cart-item-qty-btn:hover { border-color: var(--green-primary); }
.cart-item-total { font-weight: 600; color: var(--green-primary); }
.cart-item-remove { color: var(--gray-500); font-size: 0.75rem; cursor: pointer; font-weight: 500; }
.cart-item-remove:hover { color: #D32F2F; }

.shop-cart-footer { padding: 1.25rem; border-top: 1px solid var(--gray-100); }
.shop-cart-total { display: flex; justify-content: space-between; font-weight: 700; font-size: 1rem; color: var(--dark); margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--gray-200); }

@media (max-width: 768px) {
    .shop-cart { position: static; height: auto; margin-top: 2rem; border: 1px solid var(--gray-200); }
}

/* ── Addresses, Payments, Logistics ── */
.dash-stat-card { background: white; border-radius: var(--radius-md); border: 1px solid var(--gray-200); padding: 1.2rem; text-align: center; }
.dash-stat-number { font-size: 1.8rem; font-weight: 800; color: var(--dark); line-height: 1.2; }
.dash-stat-label { font-size: 0.78rem; color: var(--gray-500); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 0.3rem; }
.dash-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }

.status-warning { background: rgba(243,156,18,0.1); color: #b7791f; }
.status-overdue { background: rgba(231,76,60,0.1); color: #c0392b; }
.status-paid { background: rgba(76,163,64,0.1); color: var(--green-deep); }

.form-control { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--gray-300); border-radius: var(--radius-md); font-size: 0.88rem; font-family: inherit; transition: border-color 0.2s; }
.form-control:focus { outline: none; border-color: var(--green-primary); }
.form-group { margin-bottom: 0.8rem; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--gray-700); margin-bottom: 0.3rem; }
