/* ── Account hub shared styles ──────────────────────────────────────────
   Used by Account.razor and its tab panel components
   (AccountProfilePanel, AccountSecurityPanel, AccountPlanPanel,
   AccountPaymentMethodPanel, AccountImportLocationsPanel, AccountAppearancePanel).
   Reuses the same design tokens as app.css / Settings for visual consistency. */

.account-panel h2 {
    margin: 0 0 0.25rem;
    font-size: 1.4rem;
}

.account-panel .hint {
    color: var(--text-secondary, #6b7280);
    margin: 0 0 1.25rem;
}

.account-card {
    background: var(--surface, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md, 10px);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.account-card h3 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.account-card--meta .meta-row:last-child {
    margin-bottom: 0;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.06));
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-label {
    font-weight: 600;
    color: var(--text-secondary, #6b7280);
}

.account-panel label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    margin: 0.75rem 0 0.25rem;
    color: var(--text-primary, #111827);
}

.field-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm, 6px);
    font-size: 0.95rem;
    background: var(--surface, #ffffff);
    color: var(--text-primary, #111827);
}

.field-input:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.expiry-row {
    display: flex;
    gap: 1rem;
}

.expiry-row > div {
    flex: 1;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.checkbox-row label {
    margin: 0;
    font-weight: 500;
}

.form-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
}

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm, 6px);
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm, 6px);
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: background-color var(--transition-fast, .12s ease), opacity var(--transition-fast, .12s ease);
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-primary {
    background: var(--brand-primary, #2563eb);
    color: #ffffff;
}

.btn-secondary {
    background: var(--surface-sunken, #f8f9fc);
    color: var(--text-primary, #111827);
    border-color: var(--border-color, #e5e7eb);
}

.btn-danger {
    background: transparent;
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.82rem;
}

/* Mode toggle (light/dark) */
.mode-toggle {
    display: flex;
    gap: 0.5rem;
}

.mode-btn {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-sm, 6px);
    background: var(--surface, #ffffff);
    color: var(--text-primary, #111827);
    cursor: pointer;
    font-weight: 600;
}

.mode-btn.active {
    background: var(--brand-primary, #2563eb);
    color: #ffffff;
    border-color: var(--brand-primary, #2563eb);
}

/* Color preset grid */
.preset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
}

.preset-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md, 10px);
    background: var(--surface, #ffffff);
    cursor: pointer;
}

.preset-swatch.selected {
    border-color: var(--brand-primary, #2563eb);
}

.swatch-colors {
    display: flex;
    gap: 4px;
}

.swatch-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,.1);
}

.swatch-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary, #111827);
}

/* Plan tier picker */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.tier-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1rem;
    border: 2px solid var(--border-color, #e5e7eb);
    border-radius: var(--radius-md, 10px);
    background: var(--surface, #ffffff);
    cursor: pointer;
    font-weight: 600;
}

.tier-card--current {
    border-color: var(--brand-primary, #2563eb);
    cursor: default;
}

.tier-card__badge {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary, #2563eb);
}

/* Import locations table */
.import-location-table {
    width: 100%;
    border-collapse: collapse;
}

.import-location-table th,
.import-location-table td {
    text-align: left;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,.06));
    font-size: 0.9rem;
}

.import-location-table .path-cell {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
