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

.password-hint { font-size: 12px; color: #9ca3af; margin-top: 4px; }

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

/* Tabs */
.tabs { display: flex; gap: 6px; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 24px; overflow-x: auto; }
.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;
    white-space: nowrap;
}
.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: 6px; background: #f3f4f6; border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.sub-tab {
    padding: 9px 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; white-space: nowrap;
}
.sub-tab:hover { color: #374151; }
.sub-tab.active { background: #fff; color: #FF8C00; border-color: #FF8C00; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.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; }

/* Modal box */
.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 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: 8px; justify-content: flex-end; }
.modal-actions button { padding: 10px 16px; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; font-family: inherit; }
.modal-cancel { background: #fff; border: 1px solid #d1d5db; color: #374151; }
.modal-confirm { background: #ef4444; border: none; color: #fff; }

/* Users & Roles tables */
.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;
    display: inline-flex; align-items: center; gap: 6px;
}
.btn-add-card:hover { background: #16a34a; border-color: #16a34a; }
.btn-add-card:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-icon-add { width: 36px; height: 36px; border-radius: 8px; border: none; background: #22c55e; color: #fff; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s; flex-shrink: 0; }
.btn-icon-add:hover { background: #16a34a; }

.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-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; }
.btn-action svg { width: 16px; height: 16px; }
.btn-action:disabled { opacity: 0.35; cursor: not-allowed; pointer-events: none; }

/* 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 — admin-style module cards */
#rm_perms_group { margin-top: 12px; }
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    padding: 4px 0;
}
.perms-module-card {
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.perms-module-card:hover { border-color: #d1d5db; }
.perms-module-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}
.perms-module-card-name {
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    flex: 1;
}
.perms-module-toggle {
    position: relative;
    width: 32px;
    height: 18px;
    background: #d1d5db;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
    flex-shrink: 0;
}
.perms-module-toggle::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}
.perms-module-toggle.active { background: #FF8C00; }
.perms-module-toggle.active::after { transform: translateX(14px); }
.perms-module-card-count {
    font-size: 11px;
    font-weight: 500;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
}
.perms-module-card-body {
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 4px 6px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.1s;
}
.perm-item:hover { background: #f9fafb; }
.perm-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #FF8C00;
    cursor: pointer;
    flex-shrink: 0;
}
.perm-item-text { color: #4b5563; line-height: 1.3; }

/* Notification preferences */
.notif-prefs-desc { font-size: 13px; color: #6b7280; margin-bottom: 20px; }
.notif-cards-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.notif-card { background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; transition: box-shadow 0.2s; }
.notif-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.notif-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: #f9fafb; border-bottom: 1px solid #f3f4f6; }
.notif-card-icon { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.notif-card-icon--orders { background: #FFF7ED; color: #f97316; }
.notif-card-icon--tickets { background: #f3e8ff; color: #8b5cf6; }
.notif-card-title { font-size: 14px; font-weight: 600; color: #111827; }
.notif-card-body { padding: 4px 16px; }
.notif-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f3f4f6; }
.notif-row:last-child { border-bottom: none; }
.notif-label { font-size: 13px; color: #374151; }
.notif-row.locked { opacity: 0.45; }
.notif-row.locked .toggle { cursor: not-allowed; }

/* 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 { flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
.widget-card-icon--weather { background: #eff6ff; color: #3b82f6; }
.widget-card-icon--currency { background: #f0fdf4; color: #10b981; }
.widget-card-icon--calendar { background: #fef3c7; color: #f59e0b; }
.widget-card-icon--clock { background: #f3e8ff; color: #8b5cf6; }
.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: 5px 12px; border: 1px solid #e5e7eb; border-radius: 8px; font-size: 13px; color: #111827; background: #fff; transition: border-color 0.2s, box-shadow 0.2s; box-sizing: border-box; height: 28px; }
.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-weather-row { align-items: flex-end; gap: 12px; }
.widget-weather-row .widget-field--weather-city { flex: 1; }
.widget-currency-row { align-items: flex-end; gap: 12px; }
.widget-currency-row .widget-field--base { flex: 0 0 auto; }
.widget-currency-row .widget-field--pairs { flex: 1; }
.widget-clock-row { align-items: flex-start; gap: 12px; }
.widget-clock-row .widget-field--cities { flex: 1; }
.widget-clock-row .widget-field--city-select { flex: 0 0 180px; }
.widget-save-btn { flex-shrink: 0; padding: 4px 16px; background: #FF8C00; color: #fff; border: 1px solid #FF8C00; border-radius: 8px; font-size: 13px; font-weight: 500; cursor: pointer; transition: background 0.2s; align-self: flex-end; box-sizing: border-box; height: 32px; }
.widget-save-btn:hover { background: #E07B00; }
.clock-cities-tags { display: grid; grid-template-columns: 1fr 1fr; 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; }

/* Password wrapper */
.password-wrapper { position: relative; display: flex; }
.password-wrapper input { flex: 1; padding-right: 40px; }
.password-toggle {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: #9ca3af; padding: 4px;
    display: flex; align-items: center; justify-content: center;
}
.password-toggle:hover { color: #6b7280; }
.password-toggle svg { width: 18px; height: 18px; }

/* Language grid */
.language-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.language-card {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 20px 16px; border: 2px solid #e5e7eb; border-radius: 12px;
    cursor: pointer; transition: all 0.2s; background: #fff;
}
.language-card:hover { border-color: #d1d5db; background: #f9fafb; }
.language-card.selected { border-color: #FF8C00; background: #FFF7ED; }
.language-card.selected::after {
    content: '\2713'; display: block; font-size: 11px; font-weight: 700;
    color: #fff; background: #FF8C00; width: 20px; height: 20px; line-height: 20px;
    text-align: center; border-radius: 50%; margin-top: 4px;
}
.language-flag { font-size: 32px; line-height: 1; }
.language-name { font-weight: 600; font-size: 14px; color: #111827; }
.language-native { font-size: 12px; color: #6b7280; }

/* Password change card */
.pw-card-header { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.pw-card-icon {
    flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #fef3c7; color: #f59e0b;
}
.pw-card-icon svg { width: 20px; height: 20px; }
h3.pw-card-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0 0 6px; line-height: 1; }
.pw-card-desc { font-size: 13px; color: #9ca3af; margin: 4px 0 0; line-height: 1; }
.pw-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pw-form-actions { margin-top: 20px; }

/* Roles header */
.roles-header-left { display: flex; align-items: center; gap: 12px; }
.roles-header-icon {
    flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #eff6ff; color: #3b82f6;
}
.roles-header-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0; }
.roles-header-desc { font-size: 13px; color: #9ca3af; margin: 2px 0 0; }

/* Role cards list */
.roles-list { display: flex; flex-direction: column; gap: 8px; }
.role-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border: 1px solid #e5e7eb; border-radius: 10px;
    background: #fff; transition: box-shadow 0.2s;
}
.role-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.role-card-left { display: flex; align-items: center; gap: 12px; }
.role-card-icon {
    flex-shrink: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center;
    border-radius: 8px; background: #f0fdf4; color: #10b981;
}
.role-card-info { min-width: 0; }
.role-card-name { font-size: 14px; font-weight: 600; color: #111827; }
.role-card-slug { font-size: 12px; color: #9ca3af; margin-top: 2px; }
.role-card-right { display: flex; align-items: center; gap: 16px; }
.role-card-stats { display: flex; gap: 12px; }
.role-stat {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 12px; font-weight: 500; color: #6b7280;
    padding: 4px 10px; background: #f9fafb; border-radius: 6px;
}
.role-stat svg { color: #9ca3af; }

/* Role card action buttons */
.role-card .actions-cell { display: flex; gap: 2px; }

/* User inline form */
.user-form-card { border: 1px solid #e5e7eb; }
.user-form-header .btn-action { border-color: #e5e7eb; color: #6b7280; }
.user-form-header .btn-action:hover { background: #f9fafb; border-color: #d1d5db; color: #374151; }
.user-form-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.user-form-header-left { display: flex; align-items: center; gap: 14px; }
.user-form-icon {
    flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #f0fdf4; color: #10b981;
}
h3.user-form-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0 0 6px; line-height: 1; }
.user-form-desc { font-size: 13px; color: #9ca3af; margin: 4px 0 0; line-height: 1; }
.user-fields-grid input:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; border-color: #e5e7eb; }
.user-fields-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.user-fields-grid .form-group { margin-bottom: 0; }
.um-active-field { display: flex; align-items: flex-end; }
.um-active-field .checkbox-label { padding-bottom: 8px; }
.user-form-bottom { display: flex; align-items: center; justify-content: flex-end; margin-top: 20px; }
.user-form-actions { display: flex; gap: 10px; }
.user-form-actions .btn-save {
    padding: 10px 20px; font-size: 13px; font-weight: 600; border-radius: 8px; margin-top: 0;
}
.user-form-actions .modal-cancel {
    padding: 10px 20px; font-size: 13px; font-weight: 600; border-radius: 8px;
    background: #fff; border: 1px solid #d1d5db; color: #374151; cursor: pointer; font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.user-form-actions .modal-cancel:hover { background: #f9fafb; border-color: #9ca3af; }
.pw-section-divider { height: 1px; background: #e5e7eb; margin: 16px 0; }
.pw-section .pw-card-header { margin-bottom: 12px; }
.pw-section .pw-fields-grid { gap: 12px; }
.pw-section .pw-fields-grid .form-group { margin-bottom: 0; }
.pw-section .pw-form-actions { margin-top: 14px; }

/* User list header */
.user-list-header-left { display: flex; align-items: center; gap: 12px; }
.user-list-icon {
    flex-shrink: 0; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center;
    border-radius: 10px; background: #eff6ff; color: #3b82f6;
}
.user-list-title { font-size: 16px; font-weight: 600; color: #111827; margin: 0; }
.user-list-desc { font-size: 13px; color: #9ca3af; margin: 2px 0 0; }
