/* profile.css — page-specific styles for profile.html */

/* Override: narrower main content */
.main { max-width: 1100px; }

/* Tabs */
.tabs { display: flex; gap: 6px; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab {
    padding: 10px 18px; border: 1.5px solid #d1d5db; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
    background: transparent; color: #6b7280; font-family: inherit; transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tab:hover { color: #374151; }
.tab.active { background: #fff; color: #FF8C00; border-color: #FF8C00; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }

.tab-content { display: none; }
.tab-content.active { display: block; }

/* Sub-tabs inside Security */
.sub-tabs { display: flex; gap: 0; border-bottom: 2px solid #e5e7eb; margin-bottom: 20px; }
.sub-tab {
    padding: 10px 20px; border: none; background: transparent; font-size: 13px; font-weight: 600;
    color: #6b7280; cursor: pointer; font-family: inherit; position: relative;
    transition: color 0.2s; border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.sub-tab:hover { color: #374151; }
.sub-tab.active { color: #FF8C00; border-bottom-color: #FF8C00; }
.sub-tab-content { display: none; }
.sub-tab-content.active { display: block; }

/* Card sections */
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); margin-bottom: 16px; }
.card h3 { font-size: 16px; font-weight: 600; margin-bottom: 16px; }

/* Save button */
.btn-save {
    padding: 10px 20px; background: #FF8C00; color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.2s;
    margin-top: 8px;
}
.btn-save:hover { background: #E07B00; }

/* Courier status */
.courier-active { color: #10b981; }
.courier-inactive { color: #9ca3af; }

/* Table override */
th { padding: 10px 14px; }
td { padding: 10px 14px; }

/* Bank cards */
.cards-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cards-header h3 { margin-bottom: 0; }
.btn-add-card {
    padding: 10px 18px; background: #22c55e; color: #fff; border: 1.5px solid #22c55e; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: color 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn-add-card:hover { background: #16a34a; border-color: #16a34a; }

.bank-cards-list { display: flex; flex-direction: column; gap: 12px; }
.bank-card-item {
    display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #e5e7eb;
    border-radius: 10px; background: #fff; transition: border-color 0.2s;
}
.bank-card-item.is-default { border-color: #FF8C00; background: #fffbf5; }
.bank-card-icon {
    width: 48px; height: 32px; border-radius: 4px; display: flex; align-items: center;
    justify-content: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.bank-card-icon.visa { background: #1a1f71; }
.bank-card-icon.mastercard { background: #eb001b; }
.bank-card-icon.other { background: #6b7280; }
.bank-card-info { flex: 1; min-width: 0; }
.bank-card-number { font-size: 14px; font-weight: 600; font-family: 'SF Mono', 'Courier New', monospace; }
.bank-card-meta { font-size: 12px; color: #6b7280; margin-top: 2px; }
.bank-card-default-badge {
    font-size: 11px; font-weight: 600; color: #FF8C00; background: #fff3e0;
    padding: 2px 8px; border-radius: 4px;
}
.bank-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.bank-card-actions button {
    padding: 5px 10px; border-radius: 6px; font-size: 12px; font-weight: 500;
    cursor: pointer; font-family: inherit; border: 1px solid #e5e7eb; background: #fff; color: #374151; transition: all 0.2s;
}
.bank-card-actions button:hover { background: #f9fafb; }
.bank-card-actions .btn-delete { color: #ef4444; border-color: #fecaca; }
.bank-card-actions .btn-delete:hover { background: #fef2f2; }
.bank-card-actions .btn-star {
    border: none; background: none; padding: 4px; cursor: pointer; color: #d1d5db;
    transition: color 0.2s; display: flex; align-items: center;
}
.bank-card-actions .btn-star:hover { color: #FF8C00; background: transparent; }
.bank-card-actions .btn-star.active { color: #FF8C00; cursor: default; }
.bank-card-actions .btn-star svg { width: 18px; height: 18px; }

/* Modal box (card add/delete modals) */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 1000; align-items: center; justify-content: center; }
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff; border-radius: 12px; padding: 24px; width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}
.modal-box .modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.modal-box .modal-header h3 { margin-bottom: 4px; }
.modal-box .modal-header p { margin-bottom: 0; }
.modal-box .modal-header .modal-close { background: none; border: none; font-size: 22px; cursor: pointer; color: #9ca3af; padding: 0 4px; line-height: 1; }
.modal-box .modal-header .modal-close:hover { color: #374151; }
.modal-box h3 { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.modal-box p { font-size: 13px; color: #6b7280; margin-bottom: 16px; }
.modal-box .form-group { margin-bottom: 14px; }
.modal-box .form-group label { font-size: 13px; font-weight: 500; color: #374151; margin-bottom: 5px; }
.modal-box .form-group input, .modal-box .form-group select {
    width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
    font-size: 13px; color: #6b7280; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.modal-box .form-group input:focus, .modal-box .form-group select:focus { border-color: #FF8C00; }
.modal-box .form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.modal-actions button { padding: 10px 18px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; transition: background 0.2s, border-color 0.2s; margin: 0; flex: 1; text-align: center; }
.modal-cancel { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.modal-confirm { background: #ef4444; border: none; color: #fff; }

/* Input with map button */
.input-with-map-btn { display: flex; gap: 8px; align-items: center; }
.input-with-map-btn input { flex: 1; }

/* Phone prefix override: different style for profile */
.phone-prefix { padding: 0 10px; font-weight: 600; color: #6b7280; font-size: 14px; border-right: 1px solid #e5e7eb; background: #f9fafb; line-height: 38px; }

/* Users & Roles tables */
.users-table, .roles-table { width: 100%; border-collapse: collapse; }
.users-table th, .roles-table th { text-align: left; font-size: 12px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; border-bottom: 1px solid #e5e7eb; }
.users-table td, .roles-table td { border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.users-table tr:last-child td, .roles-table tr:last-child td { border-bottom: none; }

/* Users header */
.users-header-right { display: flex; align-items: center; gap: 12px; }
.user-limit-info { font-size: 12px; color: #6b7280; font-weight: 500; }

/* Status badges */
.status-active { color: #10b981; font-weight: 500; }
.status-inactive { color: #9ca3af; font-weight: 500; }
.badge-self { font-size: 10px; background: #dbeafe; color: #2563eb; padding: 1px 6px; border-radius: 4px; font-weight: 600; vertical-align: middle; }
.badge-system { font-size: 10px; background: #f3f4f6; color: #6b7280; padding: 1px 6px; border-radius: 4px; font-weight: 600; vertical-align: middle; }

/* Action buttons in tables */
.actions-cell { white-space: nowrap; text-align: right; }
.btn-action {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border: 1px solid #e5e7eb; border-radius: 6px;
    background: #fff; cursor: pointer; font-size: 14px; color: #6b7280;
    transition: all 0.15s; padding: 0;
}
.btn-action:hover { background: #f9fafb; color: #374151; border-color: #d1d5db; }
.btn-action-danger:hover { background: #fef2f2; color: #ef4444; border-color: #fecaca; }

/* Checkbox label */
.checkbox-label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #374151; cursor: pointer; }
.checkbox-label input[type=checkbox] { width: 16px; height: 16px; accent-color: #FF8C00; }

/* Wide modal for roles */
.modal-box-wide { max-width: 600px; }

/* Permissions grid */
.permissions-grid { display: flex; flex-direction: column; gap: 12px; max-height: 350px; overflow-y: auto; padding: 4px 0; }
.perm-module { border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; }
.perm-module-name { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 8px; }
.perm-module-items { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.perm-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; }
.perm-check input[type=checkbox] { width: 15px; height: 15px; accent-color: #FF8C00; }

/* Disabled add button */
.btn-add-card:disabled { opacity: 0.5; cursor: not-allowed; }

/* Notification preferences */
.notif-prefs-desc { font-size: 13px; color: #6b7280; margin-bottom: 24px; }
.notif-section { margin-bottom: 24px; }
.notif-section:last-child { margin-bottom: 0; }
.notif-section-title { font-size: 14px; font-weight: 700; color: #111827; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 1px solid #e5e7eb; }
.notif-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid #f3f4f6; }
.notif-row:last-child { border-bottom: none; }
.notif-label { font-size: 14px; color: #374151; }
.notif-row.locked { opacity: 0.45; }
.notif-row.locked .toggle { cursor: not-allowed; }

/* User data section */
.user-section { margin-top: 24px; padding-top: 24px; border-top: 2px solid #e5e7eb; }

/* Password change section */
.pw-section { margin-top: 24px; padding-top: 24px; border-top: 2px solid #e5e7eb; }
.pw-change-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; padding: 20px; margin: 20px 0; }
.pw-card-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pw-card-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #FFF7ED; color: #FF8C00; flex-shrink: 0; }
h3.pw-card-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0 0 6px; line-height: 1; }
.pw-card-desc { font-size: 12px; color: #9ca3af; margin: 0; }
.pw-reset-cell { display: flex; align-items: flex-end; }
.btn-reset-pw { padding: 10px 16px; font-size: 13px; font-weight: 500; color: #dc2626; background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; cursor: pointer; white-space: nowrap; transition: background 0.15s; }
.btn-reset-pw:hover { background: #fee2e2; }
.btn-reset-pw:disabled { opacity: 0.5; cursor: not-allowed; }
.pw-reset-cooldown-text { font-size: 13px; color: #dc2626; font-weight: 500; padding-bottom: 8px; }
.pw-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; margin-bottom: 16px; }
.password-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }

/* Bottom row: sender toggle + close account */
.profile-bottom-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 8px; padding-top: 24px; border-top: 2px solid #e5e7eb; }
.sender-toggle-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 12px; }
.close-account-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; background: #fef2f2; border: 1px solid #fecaca; border-radius: 12px; }
.close-account-left { display: flex; align-items: center; gap: 12px; }
.close-account-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #fee2e2; color: #ef4444; flex-shrink: 0; }
.close-account-title { font-size: 13px; font-weight: 600; color: #991b1b; }
.close-account-desc { font-size: 12px; color: #dc2626; margin-top: 2px; }
.btn-danger-sm { padding: 10px 16px; background: #ef4444; color: #fff; border: 1px solid #ef4444; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.2s; flex-shrink: 0; }
.btn-danger-sm:hover { background: #dc2626; }
.sender-toggle-left { display: flex; align-items: center; gap: 12px; }
.sender-toggle-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: #eff6ff; color: #3b82f6; flex-shrink: 0; }
.sender-toggle-title { font-size: 13px; font-weight: 600; color: #111827; }
.sender-toggle-desc { font-size: 12px; color: #9ca3af; margin-top: 2px; }

/* Toggle switch */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
    position: absolute; cursor: pointer; inset: 0;
    background: #d1d5db; border-radius: 24px; transition: background 0.3s;
}
.toggle-slider::before {
    content: ''; position: absolute; width: 18px; height: 18px;
    left: 3px; bottom: 3px; background: #fff; border-radius: 50%;
    transition: transform 0.3s;
}
.toggle input:checked + .toggle-slider { background: #FF8C00; }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle input:disabled + .toggle-slider { cursor: not-allowed; opacity: 0.6; }

/* Widget cards grid */
.widget-cards-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.widget-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.widget-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.widget-card.locked { opacity: 0.5; }
.widget-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f9fafb; border-bottom: 1px solid #f3f4f6; }
.widget-card-icon { font-size: 20px; line-height: 1; flex-shrink: 0; width: 28px; text-align: center; }
.widget-card-info { flex: 1; min-width: 0; }
.widget-card-title { font-size: 14px; font-weight: 600; color: #111827; }
.widget-card-desc { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.widget-card-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 12px; }
.widget-field { display: flex; flex-direction: column; gap: 5px; }
.widget-field-label { font-size: 12px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: 0.03em; }
.widget-field-row { display: flex; gap: 8px; align-items: center; }
.widget-field-input { flex: 1; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; color: #111827; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; }
.widget-field-input:focus { outline: none; border-color: #FF8C00; box-shadow: 0 0 0 3px rgba(255,140,0,0.1); }
.widget-field-input--short { max-width: 120px; }
.widget-field-hint { font-size: 11px; color: #9ca3af; }
.widget-field-hint-inline { font-weight: 400; color: #9ca3af; }
.widget-save-btn { flex-shrink: 0; padding: 10px 16px; background: #FF8C00; color: #fff; border: none; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.2s; }
.widget-save-btn:hover { background: #E07B00; }
.clock-cities-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.clock-city-tag { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; background: #FFF7ED; border: 1px solid #FDBA74; border-radius: 20px; font-size: 12px; font-weight: 500; color: #9A3412; }
.clock-city-tag button { background: none; border: none; cursor: pointer; color: #C2410C; font-size: 14px; line-height: 1; padding: 0; margin-left: 2px; transition: color 0.15s; }
.clock-city-tag button:hover { color: #7C2D12; }

/* Profile form actions — save + close account on one line */
.profile-form-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; flex-wrap: wrap; gap: 12px; }
.profile-form-actions .btn-save { margin-top: 0; }
.close-account-inline { display: flex; align-items: center; gap: 10px; }
.danger-hint { color: #9ca3af; font-size: 12px; }
.btn-danger {
    padding: 10px 20px; background: #dc2626; color: #fff; border: none; border-radius: 8px;
    font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; transition: background 0.2s;
}
.btn-danger:hover { background: #b91c1c; }
.modal-confirm-danger { background: #dc2626 !important; }
.modal-confirm-danger:hover { background: #b91c1c !important; }

/* Closure PIN inputs */
.closure-error { display: none; color: #dc2626; font-size: 13px; text-align: center; margin-bottom: 12px; }
#closurePinModal .code-inputs { display: flex; gap: 8px; justify-content: center; margin-bottom: 16px; }
#closurePinModal .code-inputs input {
    width: 48px; height: 56px; text-align: center; font-size: 22px; font-weight: 600;
    font-family: 'SF Mono', 'Courier New', monospace; border: 2px solid #d1d5db; border-radius: 10px;
    outline: none; transition: border-color 0.2s, box-shadow 0.2s; background: #fff;
}
#closurePinModal .code-inputs input:focus { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,0.15); }
#closurePinModal .code-inputs input.filled { border-color: #dc2626; }
#closurePinModal .code-inputs input.error { border-color: #ef4444; background: #fef2f2; }
#closurePinModal .resend-row { text-align: center; font-size: 13px; color: #6b7280; }
#closurePinModal .resend-link {
    color: #dc2626; cursor: pointer; font-weight: 500; background: none; border: none;
    font-family: inherit; font-size: 13px;
}
#closurePinModal .resend-link:hover { text-decoration: underline; }
#closurePinModal .resend-link:disabled { color: #9ca3af; cursor: not-allowed; text-decoration: none; }
