﻿/* profile.css - Account preferences, profile, settings page styles */

/* ==================== ACCOUNT PREFERENCES STYLES ==================== */
.preferences-content {
    padding: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.preferences-content h2 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

#profileTabNav {
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c5bca2 transparent;
}

#profileTabNav::-webkit-scrollbar { height: 6px; }
#profileTabNav::-webkit-scrollbar-thumb { background: #c5bca2; border-radius: 3px; }
#profileTabNav::-webkit-scrollbar-track { background: transparent; }

#profileTabNav .nav-link { flex-shrink: 0; white-space: nowrap; }

.nav-tabs .nav-link {
    color: #6c757d;
    border: none;
    padding: 0.75rem 1.25rem;
    white-space: nowrap;
    font-size: 0.88rem;
}

.nav-tabs .nav-link.active {
    color: #1E6332;
    border-bottom: 2px solid #1E6332;
    background: transparent;
}

/* ==================== FOOTER STYLES ==================== */
.main-footer {
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    position: fixed;
    bottom: 0;
    left: var(--sidebar-width-expanded);
    right: 0;
    z-index: 100;
    transition: var(--sidebar-transition);
}

.sidebar-collapsed .main-footer {
    left: var(--sidebar-width-collapsed);
}

.footer-logo {
    height: 32px;
}

.footer-brand {
    font-weight: 600;
}

/* ==================== PROFILE & USER STYLES ==================== */
.profile-avatar-container {
    position: relative;
    display: inline-block;
}

.role-indicator {
    position: absolute;
    bottom: 0;
    right: -2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.role-indicator.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.role-indicator.standard {
    background: linear-gradient(135deg, #18A74B, #2F8542);
}

.profile-menu-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.profile-menu-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-menu-name {
    font-weight: 600;
    color: #1f2937;
    font-size: 0.95rem;
}

.profile-menu-email {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ==================== ENHANCED PROFILE PAGE ==================== */
.profile-page-container {
    max-width: none;
    margin: 0;
    padding: 0 32px;
    box-sizing: border-box;
}

.profile-header {
    background: linear-gradient(135deg, #1E6332 0%, #2F8542 100%);
    border-radius: 1rem;
    padding: 2rem;
    color: #fff;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Profile avatar edit wrapper */
.profile-avatar-edit-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.profile-header-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid rgba(255,255,255,0.3);
    object-fit: cover;
    background: #fff;
}

.profile-avatar-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(0,0,0,0.55);
    border-radius: 0 0 50px 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.25s;
}

.profile-avatar-edit-wrapper:hover .profile-avatar-overlay {
    opacity: 1;
}

.profile-avatar-overlay i {
    color: #fff;
    font-size: 14px;
}

.profile-avatar-menu {
    display: none;
    position: absolute;
    top: 105px;
    left: 0;
    min-width: 180px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    z-index: 50;
    overflow: hidden;
}

.profile-avatar-menu.open {
    display: block;
}

.profile-avatar-menu button {
    display: flex;
    align-items: center;
    width: 100%;
    border: none;
    background: none;
    padding: 10px 16px;
    font-size: 0.875rem;
    font-family: 'Futura PT', 'Jost', sans-serif;
    color: #1f2937;
    cursor: pointer;
    transition: background 0.15s;
}

.profile-avatar-menu button:hover {
    background: #f3f4f6;
}

.profile-avatar-menu button:last-child {
    color: #dc3545;
}

.profile-avatar-menu button:last-child:hover {
    background: #fff5f5;
}

.profile-header-info {
    flex: 1;
    min-width: 0;
}

.profile-header-info h2 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
}

.profile-header-info p {
    margin: 0;
    opacity: 0.9;
}

/* Last sign-in / last activity stats in profile header */
.profile-header-stats {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.profile-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    padding: 8px 16px;
    backdrop-filter: blur(4px);
}

.profile-stat > i {
    font-size: 0.85rem;
    opacity: 0.7;
    width: 16px;
    text-align: center;
}

.profile-stat-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.65;
    font-weight: 500;
    line-height: 1;
}

.profile-stat-value {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.profile-role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.5rem;
}

.profile-role-badge.admin {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-role-badge.standard {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

.profile-tabs {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.profile-tabs .nav-tabs {
    border-bottom: 2px solid #e9ecef;
    padding: 0 1rem;
    background: #f8f9fa;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #c5bca2 transparent;
}

.profile-tabs .nav-tabs::-webkit-scrollbar {
    height: 6px;
}
.profile-tabs .nav-tabs::-webkit-scrollbar-thumb {
    background: #c5bca2;
    border-radius: 3px;
}
.profile-tabs .nav-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.profile-tabs .nav-tabs .nav-link {
    border: none;
    color: #6c757d;
    padding: 1rem 1.5rem;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.profile-tabs .nav-tabs .nav-link:hover {
    color: #1E6332;
}

.profile-tabs .nav-tabs .nav-link.active {
    color: #1E6332;
    background: transparent;
}

.profile-tabs .nav-tabs .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #1E6332;
    border-radius: 3px 3px 0 0;
}

.profile-tabs .nav-tabs .nav-link i {
    margin-right: 0.5rem;
}

.profile-tab-content {
    padding: 2rem;
}

.profile-section {
    margin-bottom: 2rem;
}

.profile-section:last-child {
    margin-bottom: 0;
}

.profile-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-section-title i {
    color: #1E6332;
}

.form-floating-custom {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating-custom label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
    display: block;
}

.security-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.security-card-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 600;
}

.security-card-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}

.preference-item:last-child {
    border-bottom: none;
}

.preference-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
}

.preference-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* ==================== SETTINGS PAGE ==================== */
.settings-container {
    max-width: 900px;
    margin: 0 auto;
}

.settings-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.settings-card-header {
    background: #f8f9fa;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.settings-card-header i {
    color: #1E6332;
    font-size: 1.25rem;
}

.settings-card-header h5 {
    margin: 0;
    font-weight: 600;
}

.settings-card-body {
    padding: 1.5rem;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.settings-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.settings-item:first-child {
    padding-top: 0;
}

.settings-item-info {
    flex: 1;
    padding-right: 1rem;
}

.settings-item-info h6 {
    margin: 0 0 0.25rem 0;
    font-weight: 500;
    color: #1f2937;
}

.settings-item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

/* Custom Toggle Switch */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #1E6332;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==================== PHOTO CROP EDITOR ==================== */
.photo-crop-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.photo-crop-modal.show {
    display: flex;
}

.photo-crop-container {
    background: #1a1a1a;
    border-radius: 16px;
    width: 480px;
    max-width: 95vw;
    max-height: 95vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}

.photo-crop-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.photo-crop-header h5 {
    margin: 0;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
}

.photo-crop-close {
    background: none;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}

.photo-crop-close:hover {
    color: #fff;
}

.photo-crop-canvas-wrap {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    overflow: hidden;
    background: #111;
    touch-action: none;
}

.photo-crop-canvas-wrap:active {
    cursor: grabbing;
}

.photo-crop-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.photo-crop-controls {
    padding: 14px 20px 8px;
}

.photo-crop-zoom {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #888;
    font-size: 14px;
}

.photo-crop-zoom input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    height: 4px;
    border-radius: 2px;
    background: #333;
    outline: none;
}

.photo-crop-zoom input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1E6332;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.photo-crop-zoom input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1E6332;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.photo-crop-info {
    text-align: center;
    color: #666;
    font-size: 0.75rem;
    margin-top: 8px;
    letter-spacing: 0.2px;
}

.photo-crop-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 20px 18px;
}

.photo-crop-actions .btn-outline-secondary {
    color: #ccc;
    border-color: #444;
}

.photo-crop-actions .btn-outline-secondary:hover {
    background: #333;
    color: #fff;
    border-color: #555;
}

/* ==================== USAGE ACTIVITY TAB ==================== */

/* ==================== USAGE ACTIVITY TAB ==================== */

.usage-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.usage-chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #e5e1da;
    background: #fff;
    color: #6b6560;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: 'Futura PT', 'Jost', sans-serif;
}

.usage-chip:hover {
    border-color: #1E6332;
    color: #1E6332;
    background: #f8faf9;
}

.usage-chip.active {
    background: #1E6332;
    border-color: #1E6332;
    color: #fff;
}

/* Timeline container */
.usage-timeline {
    position: relative;
    padding-left: 16px;
    border-left: 2px solid #e5e1da;
    margin-left: 4px;
}

/* Date separator — pill badge on the timeline line */
.usage-date-separator {
    position: relative;
    margin: 12px 0 6px -17px;
    padding: 0;
}

.usage-date-separator:first-child {
    margin-top: 2px;
}

.usage-date-separator span {
    display: inline-block;
    background: #fff;
    border: 1px solid #e5e1da;
    padding: 3px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    color: #6b6560;
    letter-spacing: 0.3px;
}

/* ── Items ── */
.usage-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 3px 9px;
    margin: 1px 0;
    border-radius: 8px;
    transition: background 0.15s, box-shadow 0.15s;
    position: relative;
}

/* Timeline dot connector */
.usage-item::before {
    content: '';
    position: absolute;
    left: -21px;
    top: 50%;
    transform: translateY(-50%);
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d1cdc8;
    border: 2px solid #fff;
    z-index: 1;
}

.usage-item-action::before {
    background: #1E6332;
    width: 9px;
    height: 9px;
    left: -22px;
}

.usage-item:hover {
    background: #faf9f7;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.usage-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.66rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.usage-body {
    flex: 1;
    min-width: 0;
}

.usage-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.usage-title-row .usage-title {
    flex: 0 1 auto;
    min-width: 0;
}

.usage-title-row .usage-label {
    flex-shrink: 0;
}

.usage-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: #2d2a26;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-label {
    display: inline-block;
    padding: 0 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    white-space: nowrap;
    line-height: 1.5;
}

.usage-target {
    margin-top: 1px;
}

.usage-target-link {
    font-size: 0.8rem;
    color: #1E6332;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s;
}

.usage-target-link:hover {
    text-decoration: underline;
    color: #214A3E;
}

.usage-target-name {
    font-size: 0.8rem;
    color: #6b6560;
}

.usage-meta {
    margin-top: 1px;
    font-size: 0.72rem;
    color: #9b9590;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
}

.usage-meta-sep {
    margin: 0 4px;
    color: #d1cdc8;
}

.usage-meta-badge {
    display: inline-block;
    padding: 1px 7px;
    border-radius: 4px;
    background: #f3f0ec;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: #6b6560;
}

.usage-meta-status {
    text-transform: capitalize;
}

.usage-meta-amount {
    font-weight: 700;
    color: #1E6332;
}

.usage-time {
    flex-shrink: 0;
    font-size: 0.72rem;
    color: #9b9590;
    white-space: nowrap;
    padding-top: 3px;
    font-weight: 500;
}

/* ── Action items — left accent bar ── */
.usage-item-action {
    border-left: 3px solid transparent;
    margin-left: -3px;
}

.usage-item-action:hover {
    border-left-color: #1E6332;
}

/* ── Grouped navigation trail ── */
.usage-nav-group {
    background: #f8f7f5;
    border: 1px solid #ece9e4;
    border-radius: 10px;
}

.usage-nav-group::before {
    background: #C5BCA2;
}

.usage-nav-group:hover {
    background: #f3f1ed;
}

.usage-nav-trail {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    margin-top: 3px;
}

.usage-trail-step {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 500;
    color: var(--trail-color, #6b6560);
    background: #fff;
    border: 1px solid #e5e1da;
    white-space: nowrap;
}

.usage-trail-step i {
    font-size: 0.65rem;
    opacity: 0.7;
}

.usage-trail-arrow {
    font-size: 0.55rem;
    color: #c5bca2;
    margin: 0 2px;
}

/* ── Navigation items — more subtle ── */
.usage-item-nav {
    opacity: 0.7;
    padding: 2px 9px;
}

.usage-item-nav .usage-icon {
    width: 22px;
    height: 22px;
    font-size: 0.6rem;
    border-radius: 6px;
    box-shadow: none;
}

.usage-item-nav .usage-title {
    font-size: 0.8rem;
    font-weight: 400;
    color: #6b6560;
}

.usage-item-nav:hover {
    opacity: 1;
}

/* ── Action items — more prominent ── */
.usage-item-action {
    padding: 4px 9px;
}

.usage-item-action .usage-title {
    font-weight: 600;
}

/* ── Empty state ── */
.usage-empty {
    text-align: center;
    padding: 50px 20px;
    color: #9b9590;
}

.usage-empty i {
    font-size: 2.5rem;
    margin-bottom: 14px;
    display: block;
    color: #d1cdc8;
}

.usage-empty p {
    font-size: 0.9rem;
    margin: 0;
}

/* ==================== SUPPORT REQUESTS / TICKETS ==================== */
.req-form { display: flex; flex-direction: column; gap: 14px; }
.req-form-row { display: flex; }
.req-form-row-2 { gap: 14px; flex-wrap: wrap; }
.req-form-field { flex: 1; min-width: 180px; display: flex; flex-direction: column; }
.req-form-field label {
    font-size: 12px; font-weight: 600; color: #1E6332;
    margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.03em;
}
.req-form-field label .text-muted { text-transform: none; font-weight: 500; letter-spacing: 0; }
.req-form-field input,
.req-form-field select,
.req-form-field textarea {
    width: 100%; box-sizing: border-box;
    border: 1.5px solid #e3ddd0; border-radius: 9px;
    padding: 9px 11px; font-size: 14px;
    font-family: 'Futura PT', 'Jost', sans-serif; color: #212529;
    background: #fcfbf8; transition: border-color 0.15s, box-shadow 0.15s;
}
.req-form-field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.req-form-field input:focus,
.req-form-field select:focus,
.req-form-field textarea:focus {
    outline: none; border-color: #1E6332;
    box-shadow: 0 0 0 3px rgba(30, 99, 50, 0.12); background: #fff;
}
.req-form-actions { display: flex; justify-content: flex-end; }

.req-refresh-btn {
    margin-left: auto; background: transparent; border: none;
    color: #1E6332; cursor: pointer; font-size: 14px; padding: 4px 8px;
    border-radius: 6px; transition: background 0.15s;
}
.req-refresh-btn:hover { background: #F4F0E9; }

.req-list { display: flex; flex-direction: column; gap: 10px; }
.req-card {
    border: 1px solid #e8e3da; border-radius: 12px;
    padding: 13px 15px; background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.req-card-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 6px;
}
.req-card-subject { font-weight: 700; font-size: 14px; color: #212529; }
.req-card-details {
    font-size: 13px; color: #555; line-height: 1.5; margin-bottom: 9px;
    white-space: pre-wrap; word-break: break-word;
}
.req-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.req-badge {
    flex-shrink: 0; font-size: 11px; font-weight: 700;
    padding: 3px 11px; border-radius: 999px; text-transform: uppercase;
    letter-spacing: 0.03em; white-space: nowrap;
}
.req-badge-open        { background: #fef3c7; color: #92600b; }
.req-badge-in_progress { background: #cfe2ff; color: #1c4f9c; }
.req-badge-resolved    { background: #d1e7dd; color: #14613a; }
.req-badge-closed      { background: #e9ecef; color: #5c636a; }

.req-chip {
    display: inline-flex; align-items: center; gap: 5px;
    background: #F4F0E9; color: #6b5e47; border: 1px solid #e3ddd0;
    padding: 3px 9px; border-radius: 999px; font-size: 11px;
    font-weight: 600; text-transform: capitalize;
}
.req-chip i { font-size: 10px; }
.req-pri-high   { background: #fff3e0; color: #b45309; border-color: #f5d9b0; }
.req-pri-urgent { background: #fde8e8; color: #b91c1c; border-color: #f3c0c0; }
.req-chip-ref   { background: #eef2f7; color: #475569; border-color: #dde3ec; }
.req-date { font-size: 11.5px; color: #9ca3af; margin-left: auto; }

.req-empty {
    text-align: center; padding: 28px 16px; color: #8a8276;
    font-size: 13.5px; background: #faf8f4;
    border: 1px dashed #e3ddd0; border-radius: 12px;
}
.req-empty i { color: #1E6332; margin-right: 6px; }

/* Update banner shown at the top of "My Requests" when EFF Support has
   touched any of the user's tickets since their last visit. */
.req-update-banner {
    display: flex; align-items: center; gap: 8px;
    background: linear-gradient(135deg, #E9F5EE, #d6ecdf);
    border: 1px solid #b9dac6; color: #14613a;
    padding: 11px 14px; border-radius: 12px;
    font-size: 13px; margin-bottom: 12px;
    animation: reqBannerIn 0.35s ease-out;
}
.req-update-banner i { color: #1E6332; font-size: 15px; }
@keyframes reqBannerIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Per-card "Updated ..." line shown when EFF Support has changed the status */
.req-card-update {
    font-size: 11.5px; color: #14613a; font-weight: 600;
    margin: -2px 0 8px; display: inline-flex; align-items: center; gap: 5px;
}
.req-card-update i { font-size: 10px; }

/* ──────── 3-tile category picker on the submit form ──────── */
.req-type-picker {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.req-type-tile {
    display: flex; flex-direction: column; align-items: flex-start; text-align: left;
    background: #fff; border: 2px solid #e8e3da; border-radius: 14px;
    padding: 14px 14px 13px; cursor: pointer; transition: all 0.18s ease;
    font-family: 'Futura PT', 'Jost', sans-serif; gap: 6px;
}
.req-type-tile:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(30,99,50,0.10); }
.req-type-icon {
    width: 36px; height: 36px; border-radius: 10px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px; margin-bottom: 4px;
}
.req-type-name { font-weight: 700; font-size: 13.5px; color: #212529; }
.req-type-desc { font-size: 11.5px; color: #6c757d; line-height: 1.4; }

/* Active tile = thicker accented border + tinted background */
.req-type-tile.active { border-width: 2.5px; box-shadow: 0 4px 14px rgba(30,99,50,0.12); }

/* ──────── Per-category palettes — applies to BOTH the form tiles and
   the chips/cards in the list, so visual identity is consistent. ──────── */
.req-type-tile.req-cat-feature_request .req-type-icon { background: #FDF3DE; color: #B8870B; }
.req-type-tile.req-cat-technical       .req-type-icon { background: #FEE7E7; color: #dc2626; }
.req-type-tile.req-cat-general         .req-type-icon { background: #E9F5EE; color: #1E6332; }

.req-type-tile.req-cat-feature_request.active { border-color: #C19A6B; background: #FFFBF1; }
.req-type-tile.req-cat-technical.active       { border-color: #dc2626; background: #FFF6F6; }
.req-type-tile.req-cat-general.active         { border-color: #1E6332; background: #F4FBF6; }

/* Category-colored chip + matching left accent bar on the list cards */
.req-chip-cat.req-cat-feature_request { background: #FDF3DE; color: #B8870B; border-color: #f1d8a8; }
.req-chip-cat.req-cat-technical       { background: #FEE7E7; color: #b91c1c; border-color: #f3c0c0; }
.req-chip-cat.req-cat-general         { background: #E9F5EE; color: #14613a; border-color: #b9dac6; }

.req-card { position: relative; }
.req-card.req-cat-feature_request { border-left: 4px solid #C19A6B; }
.req-card.req-cat-technical       { border-left: 4px solid #dc2626; }
.req-card.req-cat-general         { border-left: 4px solid #1E6332; }

/* ──────── Delete action on open requests (inline two-step confirm) ──────── */
.req-card { transition: opacity 0.28s ease, transform 0.28s ease; }
.req-card-removing { opacity: 0; transform: translateY(-4px); pointer-events: none; }

.req-card-actions {
    display: flex; justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #eee5d6;
}
.req-card-delete-btn {
    background: transparent; border: 1px solid transparent;
    color: #94918a; font-size: 12px; font-weight: 600;
    font-family: 'Futura PT', 'Jost', sans-serif;
    padding: 5px 11px; border-radius: 8px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s ease;
}
.req-card-delete-btn i { font-size: 11px; }
.req-card-delete-btn:hover {
    background: #fef2f2; color: #b91c1c; border-color: #fecaca;
}

.req-card-confirm {
    display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
    background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d;
    border-radius: 10px; padding: 8px 12px;
    font-size: 12.5px; width: 100%; box-sizing: border-box;
    animation: reqConfirmIn 0.2s ease-out;
}
@keyframes reqConfirmIn {
    from { opacity: 0; transform: translateY(-2px); }
    to   { opacity: 1; transform: translateY(0); }
}
.req-card-confirm-text { flex: 1; min-width: 200px; display: inline-flex; align-items: center; gap: 7px; }
.req-card-confirm-text i { color: #b91c1c; }
.req-card-confirm-cancel,
.req-card-confirm-yes {
    border: 1.5px solid; border-radius: 999px; padding: 5px 12px;
    font-size: 12px; font-weight: 600; cursor: pointer;
    font-family: 'Futura PT', 'Jost', sans-serif;
    display: inline-flex; align-items: center; gap: 5px;
    transition: all 0.15s ease;
}
.req-card-confirm-cancel { background: #fff; color: #475569; border-color: #cbd5e1; }
.req-card-confirm-cancel:hover { background: #f1f5f9; }
.req-card-confirm-yes { background: #b91c1c; color: #fff; border-color: #b91c1c; }
.req-card-confirm-yes:hover:not(:disabled) { background: #991b1b; border-color: #991b1b; }
.req-card-confirm-yes:disabled,
.req-card-confirm-cancel:disabled { opacity: 0.6; cursor: default; }

@media (max-width: 768px) {
    .req-form-row-2 { flex-direction: column; gap: 12px; }
    .req-form-field input,
    .req-form-field select,
    .req-form-field textarea { font-size: 16px; } /* prevent iOS zoom */
    .req-card-top { flex-direction: column; align-items: flex-start; }
    .req-date { margin-left: 0; }
    .req-type-picker { grid-template-columns: 1fr; }
    .req-card-actions { justify-content: stretch; }
    .req-card-delete-btn { width: 100%; justify-content: center; padding: 9px 12px; }
    .req-card-confirm { flex-direction: column; align-items: stretch; }
    .req-card-confirm-cancel,
    .req-card-confirm-yes { width: 100%; justify-content: center; }
}

/* ==================== SMS OPT-IN / VERIFY ==================== */
.sms-verify-area { display: flex; align-items: center; }
.sms-locked-number {
    display: inline-flex; align-items: center;
    font-weight: 600; color: #374151;
    background: #f4f0e9; border: 1px solid #e5e1da;
    padding: 7px 12px; border-radius: 8px;
}
.sms-verified-badge {
    display: inline-flex; align-items: center;
    font-weight: 600; color: #1E6332;
    background: #eaf5ee; border: 1px solid #cfe8d8;
    padding: 7px 12px; border-radius: 8px;
}
.sms-verify-status {
    font-size: 0.85rem; margin: 8px 0 0; padding: 8px 12px;
    border-radius: 8px; border-left: 3px solid #6b7280; background: #f8f7f5; color: #4b5563;
}
.sms-verify-status--info { border-left-color: #2563eb; background: #eff6ff; color: #1e40af; }
.sms-verify-status--success { border-left-color: #1E6332; background: #eaf5ee; color: #1E6332; }
.sms-prefs-head { margin: 18px 0 4px; }
.sms-prefs-head h6 { margin: 0; font-weight: 600; color: #1E6332; }
.sms-prefs-head p { margin: 2px 0 0; font-size: 0.85rem; color: #6b7280; }
.sms-prefs-saved { font-size: 0.72rem; font-weight: 600; margin-left: 8px; }
.sms-prefs-saved.is-saving { color: #6b7280; }
.sms-prefs-saved.is-saved { color: #1E6332; }
body.dark-theme .sms-prefs-head h6 { color: #6ee7b7; }
body.dark-theme .sms-prefs-head p { color: var(--theme-text-muted); }
body.dark-theme .sms-prefs-saved.is-saved { color: #6ee7b7; }
body.dark-theme .sms-locked-number { background: var(--theme-surface-alt); color: var(--theme-text); border-color: var(--theme-border); }
body.dark-theme .sms-verified-badge { background: rgba(47,133,66,0.15); color: #6ee7b7; border-color: rgba(47,133,66,0.4); }
body.dark-theme .sms-verify-status { background: var(--theme-surface-alt); color: var(--theme-text-muted); }
