/**
 * Journal d'Auto-Observation - Design Dark Premium
 * Inspiré de Reboot Mental
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* FOND DE PAGE SOMBRE */
body {
    background: #0a0a0f !important;
    min-height: 100vh;
}

/* Support pour différents thèmes WordPress */
html,
body,
#page,
#content,
.site,
.site-content,
main,
article,
.entry-content,
.page-content,
.post-content,
.elementor,
.elementor-section,
.elementor-container,
.elementor-widget-container,
.wp-block-group,
.wp-site-blocks {
    background: #0a0a0f !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0f;
    --bg-card: #12121a;
    --bg-card-hover: #1a1a25;
    --bg-input: #1e1e2a;
    --border: #2a2a3a;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --accent-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --accent-pink: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --success-gradient: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --danger-gradient: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --warning: #ffc107;
    --accent: #764ba2;
    --accent-light: #9d6dc9;
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --shadow: 0 20px 40px rgba(0,0,0,0.4);
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.3);
}

.reboot-tracker {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

/* Wrapper pour padding sur page sombre */
.reboot-tracker-wrapper {
    background: #0a0a0f;
    padding: 20px;
    min-height: 100vh;
}

/* ========================================
   HEADER
   ======================================== */

.reboot-header {
    background: var(--accent-gradient);
    padding: 30px 25px;
    text-align: center;
    position: relative;
}

.reboot-header h2 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.reboot-subtitle {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.reboot-sync-status {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.15);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.sync-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.sync-indicator.synced {
    background: #38ef7d;
    box-shadow: 0 0 10px #38ef7d;
}

.sync-indicator.syncing {
    background: var(--warning);
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.9); }
}

/* ========================================
   NAVIGATION TABS
   ======================================== */

.reboot-nav {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-btn {
    flex: 1;
    min-width: max-content;
    padding: 16px 20px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-btn:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-btn.active {
    color: var(--text-primary);
}

.nav-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.nav-btn .nav-icon {
    font-size: 16px;
}

/* ========================================
   SECTIONS
   ======================================== */

.reboot-section {
    display: none;
    padding: 20px;
}

.reboot-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   BOUTON SOS
   ======================================== */

.sos-banner {
    background: var(--danger-gradient);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.sos-text {
    font-size: 14px;
    font-weight: 600;
}

.sos-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sos-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* ========================================
   STATS GRID
   ======================================== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px 15px;
    text-align: center;
    transition: all 0.3s;
}

.stat-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.stat-card.highlight {
    background: var(--accent-gradient);
    border: none;
}

.stat-card.success {
    background: var(--success-gradient);
    border: none;
}

.stat-card.danger {
    background: var(--danger-gradient);
    border: none;
}

.stat-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.stat-card.highlight .stat-label,
.stat-card.success .stat-label,
.stat-card.danger .stat-label {
    color: rgba(255,255,255,0.85);
}

/* ========================================
   BOUTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(118, 75, 162, 0.4);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
}

.btn-success {
    background: var(--success-gradient);
    color: white;
}

.btn-danger {
    background: var(--danger-gradient);
    color: white;
}

.btn-full {
    width: 100%;
}

.btn-sm {
    padding: 10px 16px;
    font-size: 13px;
}

/* ========================================
   CONTROLES JOURNAL
   ======================================== */

.journal-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.journal-controls .btn {
    flex: 1;
    min-width: 140px;
}

/* Contrôles vue */
.view-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.view-btn {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.view-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

/* ========================================
   LISTE DES ENTRÉES (Mobile-first)
   ======================================== */

.entries-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.entry-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all 0.3s;
}

.entry-card:hover {
    border-color: var(--accent);
}

.entry-header {
    background: var(--bg-input);
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
}

.entry-header:hover {
    background: var(--bg-card-hover);
}

.entry-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.entry-toggle {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: all 0.3s;
}

.entry-card.open .entry-toggle {
    transform: rotate(180deg);
}

.entry-date {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.entry-time {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: 8px;
}

.entry-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.entry-tag {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--bg-card);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.entry-tag.emotion {
    background: rgba(240, 147, 251, 0.15);
    border-color: rgba(240, 147, 251, 0.3);
    color: #f093fb;
}

.entry-tag.trigger {
    background: rgba(235, 51, 73, 0.15);
    border-color: rgba(235, 51, 73, 0.3);
    color: #eb3349;
}

.entry-tag.location {
    background: rgba(102, 126, 234, 0.15);
    border-color: rgba(102, 126, 234, 0.3);
    color: #667eea;
}

.entry-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.entry-delete {
    background: var(--danger-gradient);
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.entry-delete:hover {
    transform: scale(1.1);
}

.entry-body {
    padding: 15px;
    display: none;
    border-top: 1px solid var(--border);
}

.entry-card.open .entry-body {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.entry-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.entry-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.entry-field.full {
    grid-column: 1 / -1;
}

.entry-field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.entry-field select,
.entry-field input,
.entry-field textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 10px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.entry-field select:focus,
.entry-field input:focus,
.entry-field textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

.entry-field textarea {
    min-height: 60px;
    resize: vertical;
}

/* ========================================
   CALENDRIER
   ======================================== */

.calendar-section {
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    padding: 20px;
    margin-bottom: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-title {
    font-size: 18px;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.calendar-nav button:hover {
    border-color: var(--accent);
    background: var(--accent);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
}

.calendar-weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-input);
    border: 1px solid transparent;
}

.calendar-day:hover:not(.empty) {
    transform: scale(1.1);
    z-index: 2;
}

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day.clean {
    background: var(--success-gradient);
    color: white;
}

.calendar-day.relapse {
    background: var(--danger-gradient);
    color: white;
}

.calendar-day.today {
    border: 2px solid var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.3);
}

.calendar-day.future {
    opacity: 0.3;
    cursor: default;
}

.calendar-day-count {
    font-size: 9px;
    opacity: 0.8;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.legend-clean {
    background: var(--success-gradient);
}

.legend-relapse {
    background: var(--danger-gradient);
}

/* ========================================
   ANALYSE AVANCÉE
   ======================================== */

.analysis-section {
    margin-top: 20px;
}

.analysis-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.analysis-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.analysis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 20px;
}

.analysis-card h4 {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--accent-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Barres de progression */
.analysis-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.analysis-bar-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.analysis-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.analysis-bar-name {
    color: var(--text-primary);
    font-weight: 500;
}

.analysis-bar-value {
    color: var(--text-muted);
}

.analysis-bar-track {
    height: 8px;
    background: var(--bg-input);
    border-radius: 4px;
    overflow: hidden;
}

.analysis-bar-fill {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.analysis-bar-fill.danger {
    background: var(--danger-gradient);
}

/* Grille heures/jours */
.time-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}

.time-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border-radius: 6px;
    font-size: 10px;
    transition: all 0.2s;
}

.time-cell.hot {
    background: var(--danger-gradient);
    color: white;
}

.time-cell.warm {
    background: rgba(235, 51, 73, 0.5);
    color: white;
}

.time-cell-label {
    font-weight: 600;
}

.time-cell-count {
    font-size: 9px;
    opacity: 0.8;
}

/* Insights */
.insights-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.insight-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    border-left: 3px solid var(--accent);
}

.insight-icon {
    font-size: 20px;
}

.insight-text {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.insight-text strong {
    color: var(--text-primary);
}

/* ========================================
   MODAL SOS
   ======================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-header {
    background: var(--accent-gradient);
    padding: 25px;
    text-align: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 14px;
    opacity: 0.9;
}

.modal-body {
    padding: 25px;
}

.sos-techniques {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sos-technique {
    background: var(--bg-input);
    border-radius: var(--radius-xs);
    padding: 20px;
    border-left: 4px solid var(--accent);
}

.sos-technique h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sos-technique p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.modal-close {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: var(--radius-xs);
    width: 100%;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

.modal-close:hover {
    border-color: var(--accent);
}

/* ========================================
   MODAL NOUVELLE ENTRÉE
   ======================================== */

.modal-entry-content {
    max-width: 600px;
}

.modal-entry-content .modal-header {
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.entry-form-modal .form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.entry-form-modal .form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.entry-form-modal .form-field.full {
    grid-column: 1 / -1;
}

.entry-form-modal .form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.entry-form-modal input,
.entry-form-modal select,
.entry-form-modal textarea {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 14px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.entry-form-modal input:focus,
.entry-form-modal select:focus,
.entry-form-modal textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

.entry-form-modal textarea {
    resize: vertical;
    min-height: 80px;
}

.entry-form-modal select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

.form-buttons {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.form-buttons .btn {
    flex: 1;
    padding: 14px 20px;
    border-radius: var(--radius-xs);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.form-buttons .btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.form-buttons .btn-secondary:hover {
    border-color: var(--text-secondary);
    color: var(--text-primary);
}

.form-buttons .btn-primary {
    background: var(--accent-gradient);
    color: white;
}

.form-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(118, 75, 162, 0.4);
}

@media (max-width: 500px) {
    .entry-form-modal .form-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-entry-content {
        max-height: 95vh;
    }
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (min-width: 768px) {
    .reboot-section {
        padding: 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .entry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .analysis-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .time-grid {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 480px) {
    .reboot-header {
        padding: 25px 15px;
    }
    
    .reboot-header h2 {
        font-size: 20px;
    }
    
    .reboot-sync-status {
        position: static;
        justify-content: center;
        margin-top: 15px;
    }
    
    .nav-btn {
        padding: 14px 12px;
        font-size: 12px;
    }
    
    .nav-btn .nav-text {
        display: none;
    }
    
    .nav-btn .nav-icon {
        font-size: 18px;
    }
    
    .journal-controls {
        flex-direction: column;
    }
    
    .journal-controls .btn {
        width: 100%;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .calendar-day {
        font-size: 11px;
    }
}

/* ========================================
   AUTHENTIFICATION (Dark Mode)
   ======================================== */

.reboot-auth-container {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    border-radius: var(--radius);
    max-width: 450px;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.auth-tabs {
    display: flex;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.auth-tab-btn {
    flex: 1;
    padding: 16px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.auth-tab-btn:hover {
    color: var(--text-primary);
}

.auth-tab-btn.active {
    color: var(--text-primary);
}

.auth-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
}

.auth-panel {
    display: none;
    padding: 30px 25px;
}

.auth-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.auth-header h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
}

.auth-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(118, 75, 162, 0.2);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.input-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 50px;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.6;
}

.toggle-password:hover {
    opacity: 1;
}

.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.forgot-link {
    font-size: 13px;
    color: var(--accent-light);
    text-decoration: none;
}

.forgot-link:hover {
    text-decoration: underline;
}

.form-message {
    min-height: 20px;
}

.msg-success {
    padding: 12px 16px;
    background: rgba(56, 239, 125, 0.1);
    border: 1px solid rgba(56, 239, 125, 0.3);
    border-radius: var(--radius-xs);
    color: #38ef7d;
    font-size: 14px;
}

.msg-error {
    padding: 12px 16px;
    background: rgba(235, 51, 73, 0.1);
    border: 1px solid rgba(235, 51, 73, 0.3);
    border-radius: var(--radius-xs);
    color: #eb3349;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--border);
}

.auth-footer p {
    font-size: 14px;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-light);
    text-decoration: none;
    font-weight: 600;
}

.auth-benefits {
    margin: 0 25px 25px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.auth-benefits h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-benefits ul {
    list-style: none;
}

.auth-benefits li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-secondary);
}
