/* RCS ISOLATED Styles - No WordPress Theme Conflicts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* 
 * VIKTIG: Alle stiler er isolert med .rcs- prefikser
 * Dette sikrer at INGEN WordPress-tema stiler påvirkes
 */

/* Flyt-inspired Color Palette - kun for RCS */
.rcs-wrapper,
.rcs-dashboard,
.rcs-checklist,
.rcs-admin-config {
    --rcs-primary: #65ABA8;        /* New teal color */
    --rcs-secondary: #7BC4C0;      /* Lighter teal variant */
    --rcs-accent: #ed8936;         /* Orange accent */
    --rcs-success: #38a169;        /* Green */
    --rcs-background: #f7fafc;     /* Light background */
    --rcs-white: #ffffff;
    --rcs-gray-50: #f9fafb;
    --rcs-gray-100: #f3f4f6;
    --rcs-gray-200: #e5e7eb;
    --rcs-gray-300: #d1d5db;
    --rcs-gray-400: #9ca3af;
    --rcs-gray-500: #6b7280;
    --rcs-gray-600: #4b5563;
    --rcs-gray-700: #374151;
    --rcs-gray-800: #1f2937;
    --rcs-gray-900: #111827;
    --rcs-text: #1a202c;
    --rcs-text-light: #718096;
    --rcs-border: #e2e8f0;
    --rcs-shadow: rgba(0, 0, 0, 0.1);
    --rcs-radius: 12px;
    --rcs-radius-lg: 16px;
}

/* Base RCS Container Styles - ISOLERT */
.rcs-wrapper * {
    box-sizing: border-box;
}

.rcs-wrapper,
.rcs-dashboard,
.rcs-checklist,
.rcs-admin-config {
    font-family: 'Inter', sans-serif !important;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
    background: var(--rcs-white);
    border-radius: var(--rcs-radius-lg);
    box-shadow: 0 4px 24px var(--rcs-shadow);
    border: 1px solid var(--rcs-border);
    color: var(--rcs-text);
    line-height: 1.6;
}

/* Dashboard Styles */
.rcs-dashboard {
    background: var(--rcs-background);
    padding: 0;
    box-shadow: none;
    border: none;
}

.rcs-header {
    background: linear-gradient(135deg, var(--rcs-primary) 0%, var(--rcs-secondary) 100%);
    color: var(--rcs-white);
    padding: 40px;
    border-radius: var(--rcs-radius-lg) var(--rcs-radius-lg) 0 0;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}

.rcs-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: linear-gradient(45deg, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(50px, -50px);
}

.rcs-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    position: relative;
    z-index: 5;
}

@media (max-width: 768px) {
    .rcs-header-content {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    
    .rcs-user-info {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .rcs-logout {
        min-width: 120px;
        justify-content: center;
        display: flex;
        align-items: center;
    }
}

.rcs-header-logo {
    display: flex;
    align-items: center;
    gap: 20px;
}

.rcs-logo {
    height: 70px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.rcs-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    font-family: 'Inter', sans-serif !important;
    background: linear-gradient(135deg, #ffffff 0%, rgba(255,255,255,0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.rcs-user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    position: relative;
    z-index: 10;
}

button.rcs-logout,
a.rcs-logout {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    padding: 10px 18px;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    position: relative;
    z-index: 20;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    white-space: nowrap;
    cursor: pointer;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
    line-height: 1.4;
}

button.rcs-logout:hover,
a.rcs-logout:hover {
    background: rgba(255,255,255,0.2);
    color: white !important;
    text-decoration: none !important;
    border-color: rgba(255,255,255,0.6);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* Login Container */
.rcs-login-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px;
}

.rcs-login-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 40px 0;
}

.rcs-login-form, .rcs-register-info {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Alerts - BARE innenfor RCS */
.rcs-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
    position: relative;
    font-family: 'Inter', sans-serif !important;
}

.rcs-alert-success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.rcs-alert-error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.rcs-alert-info {
    background: #d1ecf1;
    border-left-color: #17a2b8;
    color: #0c5460;
}

/* Welcome alert special styling */
.rcs-welcome-alert {
    background: linear-gradient(135deg, #065f46 0%, #10b981 100%) !important;
    color: white !important;
    border-left-color: #34d399 !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
    animation: rcs-slideInDown 0.6s ease-out;
}

.rcs-welcome-alert h4 {
    margin: 0 0 12px 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: white !important;
}

.rcs-welcome-alert p {
    margin: 8px 0 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    line-height: 1.5 !important;
}

.rcs-welcome-alert em {
    color: #86efac !important;
}

@keyframes rcs-slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.rcs-alert-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

.rcs-alert-close:hover {
    opacity: 1;
}

.rcs-alert-date {
    font-size: 12px;
    opacity: 0.7;
    margin-left: 10px;
}

/* Progress Overview */
.rcs-progress-overview {
    text-align: center;
    margin: 30px 0;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rcs-progress-circle {
    display: inline-block;
}

.rcs-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--rcs-primary);
    margin: 0 auto 15px;
    position: relative;
    font-family: 'Inter', sans-serif !important;
}

/* Quick Navigation */
.rcs-quick-nav {
    margin: 30px 0;
}

.rcs-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* User Info Card for regular users */
.rcs-user-info-card {
    background: linear-gradient(135deg, var(--rcs-gray-50) 0%, var(--rcs-gray-100) 100%);
    padding: 25px;
    border-radius: 12px;
    border: 2px solid var(--rcs-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.rcs-user-info-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.rcs-user-info-card .rcs-nav-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.rcs-user-info-card h4 {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--rcs-primary);
    font-family: 'Inter', sans-serif !important;
}

.rcs-user-info-card p {
    margin: 8px 0;
    color: var(--rcs-text);
    line-height: 1.5;
    font-family: 'Inter', sans-serif !important;
}

/* Registration Section */
.rcs-registration-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 2px solid var(--rcs-border);
    animation: rcs-fadeIn 0.5s ease;
}

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

/* Admin Welcome Section */
.rcs-admin-welcome {
    background: linear-gradient(135deg, var(--rcs-primary) 0%, var(--rcs-secondary) 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    margin: 20px 0;
    text-align: center;
}

.rcs-admin-welcome h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 700;
    font-family: 'Inter', sans-serif !important;
}

.rcs-admin-welcome p {
    margin: 0 0 25px 0;
    font-size: 16px;
    opacity: 0.9;
    line-height: 1.5;
}

.rcs-admin-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.rcs-stat-item {
    text-align: center;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    min-width: 120px;
    backdrop-filter: blur(10px);
}

.rcs-stat-item strong {
    display: block;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'Inter', sans-serif !important;
}

.rcs-stat-item span {
    font-size: 14px;
    opacity: 0.8;
}

.rcs-nav-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    text-decoration: none !important;
    color: inherit !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: 'Inter', sans-serif !important;
}

.rcs-nav-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border-color: var(--rcs-primary);
    text-decoration: none !important;
    color: inherit !important;
}

.rcs-nav-card:focus {
    outline: 3px solid rgba(44, 82, 130, 0.3);
    outline-offset: 2px;
    text-decoration: none !important;
}

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

.rcs-nav-card h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    font-family: 'Inter', sans-serif !important;
}

.rcs-nav-card p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Content Sections */
.rcs-section {
    display: none;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin: 20px 0;
}

.rcs-section-active {
    display: block;
}

/* Buttons - BARE RCS */
.rcs-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--rcs-radius);
    text-decoration: none !important;
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Inter', sans-serif !important;
    font-size: 15px;
    line-height: 1.4;
    position: relative;
    overflow: hidden;
}

.rcs-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rcs-btn:hover::before {
    left: 100%;
}

.rcs-btn-primary {
    background: linear-gradient(135deg, var(--rcs-primary) 0%, var(--rcs-secondary) 100%);
    color: var(--rcs-white) !important;
    box-shadow: 0 4px 12px rgba(44, 82, 130, 0.3);
}

.rcs-btn-primary:hover {
    background: linear-gradient(135deg, var(--rcs-secondary) 0%, var(--rcs-primary) 100%);
    color: var(--rcs-white) !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 82, 130, 0.4);
}

.rcs-btn-secondary {
    background: var(--rcs-white);
    color: var(--rcs-primary) !important;
    border-color: var(--rcs-border);
    box-shadow: 0 2px 8px var(--rcs-shadow);
}

.rcs-btn-secondary:hover {
    background: var(--rcs-gray-50);
    color: var(--rcs-primary) !important;
    text-decoration: none !important;
    border-color: var(--rcs-primary);
    transform: translateY(-1px);
}

.rcs-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

.rcs-btn-delete {
    background: #dc3545;
    color: white !important;
}

.rcs-btn-delete:hover {
    background: #c82333;
    color: white !important;
    text-decoration: none !important;
}

.rcs-btn-delete-small {
    background: #dc3545;
    color: white !important;
    padding: 4px 8px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Forms - BARE innenfor RCS containere */
.rcs-wrapper .rcs-form-group,
.rcs-dashboard .rcs-form-group,
.rcs-admin-config .rcs-form-group {
    margin-bottom: 16px;
}

.rcs-wrapper .rcs-form-group label,
.rcs-dashboard .rcs-form-group label,
.rcs-admin-config .rcs-form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--rcs-text);
    font-family: 'Inter', sans-serif !important;
}

.rcs-wrapper .rcs-form-group small,
.rcs-dashboard .rcs-form-group small,
.rcs-admin-config .rcs-form-group small {
    display: block;
    margin-top: 4px;
    color: #666;
    font-size: 12px;
}

.rcs-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.rcs-form-col {
    display: flex;
    flex-direction: column;
}

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

/* Input styling - CLEAN & MINIMAL */
.rcs-wrapper input[type="text"],
.rcs-wrapper input[type="email"],
.rcs-wrapper input[type="password"],
.rcs-wrapper input[type="date"],
.rcs-wrapper input[type="number"],
.rcs-wrapper input[type="color"],
.rcs-wrapper select,
.rcs-wrapper textarea,
.rcs-dashboard input[type="text"],
.rcs-dashboard input[type="email"],
.rcs-dashboard input[type="password"],
.rcs-dashboard input[type="date"],
.rcs-dashboard input[type="number"],
.rcs-dashboard input[type="color"],
.rcs-dashboard select,
.rcs-dashboard textarea,
.rcs-admin-config input[type="text"],
.rcs-admin-config input[type="email"],
.rcs-admin-config input[type="password"],
.rcs-admin-config input[type="date"],
.rcs-admin-config input[type="number"],
.rcs-admin-config input[type="color"],
.rcs-admin-config select,
.rcs-admin-config textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--rcs-gray-300);
    border-radius: 6px;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background: var(--rcs-white);
    color: var(--rcs-text);
}

.rcs-wrapper input:focus,
.rcs-wrapper select:focus,
.rcs-wrapper textarea:focus,
.rcs-dashboard input:focus,
.rcs-dashboard select:focus,
.rcs-dashboard textarea:focus,
.rcs-admin-config input:focus,
.rcs-admin-config select:focus,
.rcs-admin-config textarea:focus {
    outline: none;
    border-color: var(--rcs-primary);
    box-shadow: 0 0 0 2px rgba(44, 82, 130, 0.1);
}

/* Task Blocks */
.rcs-task-block {
    background: var(--rcs-gray-50);
    border: 1px solid var(--rcs-border);
    border-radius: var(--rcs-radius);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif !important;
}

.rcs-task-block:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.rcs-task-block h4 {
    margin: 0 0 15px 0;
    color: var(--rcs-text);
    font-size: 20px;
    font-weight: 600;
    font-family: 'Inter', sans-serif !important;
}

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

/* Subtasks */
.rcs-subtasks {
    margin: 15px 0;
}

.rcs-subtask {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.rcs-subtask:last-child {
    border-bottom: none;
}

.rcs-subtask.rcs-completed {
    opacity: 0.7;
}

.rcs-subtask.rcs-completed .rcs-subtask-text {
    text-decoration: line-through;
}

.rcs-subtask label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
    width: 100%;
    font-family: 'Inter', sans-serif !important;
}

.rcs-subtask input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

.rcs-subtask-text {
    flex: 1;
    line-height: 1.5;
}

/* Progress Bars */
.rcs-progress-wrapper {
    background: var(--rcs-gray-200);
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin: 15px 0 10px 0;
}

.rcs-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--rcs-primary) 0%, var(--rcs-success) 100%);
    border-radius: 6px;
    transition: width 0.5s ease;
}

.rcs-progress-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--rcs-text);
    margin: 5px 0;
    font-family: 'Inter', sans-serif !important;
}

.rcs-progress-mini {
    width: 80px;
    height: 6px;
    background: var(--rcs-gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.rcs-progress-mini .rcs-progress-bar {
    height: 100%;
}

.rcs-progress-text {
    font-size: 12px;
    color: #666;
}

/* Status Badges */
.rcs-completion-badge {
    background: #d4edda;
    color: #155724;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
    font-family: 'Inter', sans-serif !important;
}

.rcs-progress-badge {
    background: #fff3cd;
    color: #856404;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
    font-family: 'Inter', sans-serif !important;
}

.rcs-todo-badge {
    background: #f8d7da;
    color: #721c24;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    display: inline-block;
    margin-top: 10px;
    font-family: 'Inter', sans-serif !important;
}

.rcs-status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    font-family: 'Inter', sans-serif !important;
}

.rcs-status.completed {
    background: #d4edda;
    color: #155724;
}

.rcs-status.in-progress {
    background: #fff3cd;
    color: #856404;
}

.rcs-status.not-started {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Tables */
.rcs-admin-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
}

.rcs-admin-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--rcs-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    font-family: 'Inter', sans-serif !important;
}

.rcs-admin-table th,
.rcs-admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-family: 'Inter', sans-serif !important;
}

.rcs-admin-table th {
    background: var(--rcs-gray-50);
    font-weight: 600;
    color: var(--rcs-text);
}

.rcs-admin-table tr:hover {
    background: var(--rcs-gray-50);
}



/* Info Box */
.rcs-info-box {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: var(--rcs-radius);
    padding: 20px;
    margin: 20px 0;
}

/* Action Card Info Style */
.rcs-action-card.rcs-info-card {
    background: #f0f9ff;
    border: 2px solid #bfdbfe;
    color: #1e40af;
    cursor: default;
}

.rcs-action-card.rcs-info-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-color: #93c5fd;
}

.rcs-info-box h4 {
    margin: 0 0 15px 0;
    color: #004085;
    font-family: 'Inter', sans-serif !important;
}

.rcs-info-box ul {
    margin: 10px 0 0 20px;
}

.rcs-info-box li {
    margin-bottom: 5px;
}

/* User Statistics */
.rcs-user-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.rcs-stat-card {
    background: white;
    padding: 25px;
    border-radius: var(--rcs-radius);
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.rcs-stat-card h4 {
    font-size: 36px;
    margin: 0 0 10px 0;
    color: var(--rcs-primary);
    font-weight: 700;
    font-family: 'Inter', sans-serif !important;
}

.rcs-stat-card p {
    margin: 0;
    color: #666;
    font-weight: 500;
}

/* Admin Configuration Styles - CLEAN & MINIMAL */
.rcs-admin-config {
    background: white;
    box-shadow: none;
    border: none;
    border-radius: 0;
}

.rcs-config-header {
    margin-bottom: 20px;
    padding: 0;
    background: none;
    color: var(--rcs-text);
    border-radius: 0;
    text-align: left;
}

.rcs-config-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    font-family: 'Inter', sans-serif !important;
    color: var(--rcs-text);
}

.rcs-config-header p {
    margin: 0;
    font-size: 16px;
    color: var(--rcs-text-light);
}

.rcs-config-tabs {
    background: white;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
}

.rcs-tab-buttons {
    display: flex;
    background: white;
    border-bottom: 2px solid var(--rcs-gray-200);
    margin-bottom: 20px;
}

.rcs-tab-btn {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 15px;
    color: var(--rcs-gray-600);
    transition: all 0.2s ease;
    position: relative;
    font-family: 'Inter', sans-serif !important;
    border-bottom: 2px solid transparent;
}

.rcs-tab-btn:hover {
    background: transparent;
    color: var(--rcs-primary);
}

.rcs-tab-btn.active {
    background: transparent;
    color: var(--rcs-primary);
    box-shadow: none;
    border-bottom-color: var(--rcs-primary);
}

.rcs-tab-btn.active::after {
    display: none;
}

.rcs-tab-content {
    display: none;
    padding: 0;
}

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

.rcs-config-section {
    max-width: 100%;
    margin: 0;
}

.rcs-config-section h3 {
    color: var(--rcs-text);
    font-size: 20px;
    margin-bottom: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif !important;
}

.rcs-config-section > p {
    color: var(--rcs-text-light);
    margin-bottom: 24px;
    font-size: 15px;
}

.rcs-config-form {
    background: white;
    padding: 0;
    border-radius: 0;
    margin-top: 0;
}

.rcs-email-template-section {
    background: white;
    padding: 16px 0;
    border-radius: 0;
    margin-bottom: 16px;
    border: none;
    border-bottom: 1px solid var(--rcs-gray-200);
}

.rcs-email-template-section h4 {
    color: var(--rcs-text);
    margin: 0 0 12px 0;
    font-size: 17px;
    font-weight: 600;
    padding-bottom: 0;
    border-bottom: none;
    font-family: 'Inter', sans-serif !important;
}

/* Chapter Popup Fields - CLEAN */
.chapter-popup-fields {
    background: var(--rcs-gray-50) !important;
    border: 1px solid var(--rcs-gray-200) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin: 8px 0 !important;
}

.chapter-popup-fields h4 {
    color: var(--rcs-text);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Inter', sans-serif !important;
}

.chapter-popup-item {
    background: white;
    border: 1px solid var(--rcs-gray-200);
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
}

.chapter-popup-item h5 {
    color: var(--rcs-text);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px 0;
    font-family: 'Inter', sans-serif !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rcs-wrapper, .rcs-dashboard {
        padding: 15px;
        margin: 10px;
    }
    
    .rcs-config-header {
        padding: 20px;
    }
    
    .rcs-config-header h2 {
        font-size: 24px;
    }
    
    .rcs-tab-buttons {
        flex-direction: column;
    }
    
    .rcs-tab-content {
        padding: 20px;
    }
    
    .rcs-config-form {
        padding: 20px;
    }
    
    .rcs-form-actions {
        flex-direction: column;
    }
    
    .rcs-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .rcs-login-wrapper {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rcs-nav-grid {
        grid-template-columns: 1fr;
    }
    
    .rcs-form-row {
        grid-template-columns: 1fr;
    }
    
    .rcs-user-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rcs-stat-card {
        padding: 15px;
    }
    
    .rcs-stat-card h4 {
        font-size: 24px;
    }
}

/* Print Styles */
@media print {
    .rcs-nav-grid,
    .rcs-btn,
    .rcs-header {
        display: none !important;
    }
    
    .rcs-section {
        display: block !important;
        box-shadow: none;
        page-break-inside: avoid;
    }
    
    .rcs-task-block {
        page-break-inside: avoid;
        margin-bottom: 20px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .rcs-btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .rcs-progress-bar {
        background: #000;
    }
    
    .rcs-nav-card:hover {
        border-color: #000;
    }
}

/* Theme Email Selection Styling */
.rcs-theme-email-selection {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 15px 0;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid var(--rcs-gray-200);
}

.rcs-theme-email-selection .rcs-form-group {
    margin: 0;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--rcs-gray-200);
    transition: all 0.2s ease;
}

.rcs-theme-email-selection .rcs-form-group:hover {
    border-color: var(--rcs-primary);
    box-shadow: 0 2px 8px rgba(101, 171, 168, 0.1);
}

.rcs-theme-email-selection .rcs-form-group label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: var(--rcs-gray-700);
    margin: 0;
    cursor: pointer;
}

.rcs-theme-email-selection input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.1);
}

.rcs-theme-email-selection input[type="checkbox"]:checked + span {
    color: var(--rcs-primary);
    font-weight: 600;
}

@media (max-width: 768px) {
    .rcs-theme-email-selection {
        grid-template-columns: 1fr;
    }
}

/* Welcome Section Styling */
.rcs-welcome-content {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 15px;
    margin-top: 10px;
    max-width: 800px;
}

.rcs-user-welcome-section {
    margin-bottom: 30px;
}

.rcs-user-progress-overview {
    text-align: center;
    padding: 12px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 8px;
    border: 1px solid var(--rcs-gray-200);
}

.rcs-user-progress-overview h4 {
    margin: 0 0 8px 0;
    color: var(--rcs-gray-700);
    font-weight: 600;
    font-size: 13px;
}

.rcs-user-progress-overview .rcs-progress-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px auto;
    background: conic-gradient(var(--rcs-primary) 0deg, #e0e0e0 0deg);
    position: relative;
    transition: all 0.6s ease;
}

.rcs-user-progress-overview .rcs-progress-circle::before {
    content: '';
    position: absolute;
    width: 55px;
    height: 55px;
    background: white;
    border-radius: 50%;
    z-index: 1;
}

.rcs-user-progress-overview .rcs-progress-circle span {
    position: relative;
    z-index: 2;
    font-size: 13px;
    font-weight: 700;
    color: var(--rcs-primary);
}

.rcs-user-progress-overview p {
    margin: 0;
    font-size: 11px;
    color: var(--rcs-gray-600);
}

.rcs-quick-actions {
    padding: 12px;
}

.rcs-quick-actions h4 {
    margin: 0 0 8px 0;
    color: var(--rcs-gray-700);
    font-weight: 600;
    font-size: 13px;
}

.rcs-quick-actions p {
    font-size: 12px;
    line-height: 1.4;
    color: var(--rcs-gray-600);
    margin-bottom: 10px;
}

/* Persistent Alerts Styling */
.rcs-alerts-persistent {
    position: relative;
    z-index: 1000;
    margin-bottom: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 15px;
}

.rcs-alerts-persistent h3 {
    font-size: 14px;
    margin: 0 0 10px 0;
    color: var(--rcs-gray-700);
}

.rcs-alerts-persistent .rcs-alert {
    margin-bottom: 8px;
    padding: 12px 15px;
    font-size: 13px;
}

.rcs-alerts-persistent .rcs-alert-date {
    font-size: 11px;
}

@media (max-width: 768px) {
    .rcs-welcome-content {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .rcs-user-progress-overview {
        order: 2;
        padding: 12px;
    }
    
    .rcs-quick-actions {
        order: 1;
        padding: 12px;
    }
    
    .rcs-alerts-persistent {
        position: relative;
        top: auto;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .rcs-wrapper *,
    .rcs-wrapper *::before,
    .rcs-wrapper *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}