/* ===================================================================
 * Monsfer Dashboard Design System
 * Based on örnekdashboard Tailwind configuration
 * =================================================================== */

/* Google Fonts - Inter */
/* FONTS REMOVED TO INHERIT DEFAULT SITE FONT */

/* ===================================================================
 * 1. DESIGN TOKENS (CSS Custom Properties)
 * =================================================================== */
:root {
    /* Primitive Palette - Slate */
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;

    /* Primitive Palette - Blue */
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    --blue-700: #1D4ED8;

    /* Primitive Palette - Emerald */
    --emerald-50: #ECFDF5;
    --emerald-500: #10B981;
    --emerald-600: #059669;

    /* Primitive Palette - Other */
    --red-600: #DC2626;
    --orange-500: #F59E0B;
    --purple-500: #9333EA;
    --purple-50: #FAF5FF;
    --indigo-500: #6366F1;
    --indigo-50: #EEF2FF;

    /* Semantic Tokens */
    --monsfer-bg: var(--slate-50);
    --monsfer-surface: #FFFFFF;
    --monsfer-surface-secondary: var(--slate-50);
    --monsfer-ink: var(--slate-900);
    --monsfer-body: var(--slate-700);
    --monsfer-muted: var(--slate-500);
    --monsfer-border: var(--slate-200);
    --monsfer-accent: var(--blue-600);

    /* Brand */
    --brand-primary: var(--blue-600);
    --brand-surface: var(--blue-50);

    /* Status */
    --status-success: var(--emerald-600);
    --status-error: var(--red-600);
    --status-warning: var(--orange-500);

    /* Shadows */
    --shadow-low: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-mid: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-saas: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 18px 40px rgba(112, 144, 176, 0.12);

    /* Spacing */
    --space-section: 2rem;
    --space-card: 1.5rem;
    --space-gap: 0.75rem;

    /* Border Radius */
    --radius-panel: 0.5rem;
    --radius-card: 1rem;
    --radius-pill: 9999px;
}

/* ===================================================================
 * 2. BASE STYLES
 * =================================================================== */
.monsfer-dashboard {
    background-color: transparent;
    color: var(--monsfer-ink);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    max-width: none;
    /* Max width kaldırıldı */
    width: auto;
    /* Kalan alanı doldur */

    /* GÜÇLÜ MARGIN: Sidebar (280px) + 20px Boşluk */
    margin-left: 300px !important;

    padding: 1rem 2rem 3rem 0;
    /* Sol padding gerekmez, margin var */
    box-sizing: border-box;
}

/* Eğer dashboard .main-content içindeyse (Wrapper varsa), margin'i sıfırla */
.main-content .monsfer-dashboard {
    margin-left: 0 !important;
    padding-left: 0;
    padding-right: 2rem;
}

/* Mobile: Margin'i kaldır ve padding ekle */
@media (max-width: 992px) {
    .monsfer-dashboard {
        margin-left: 0 !important;
        padding: 1rem 1.5rem 3rem 1.5rem;
    }
}

/* Clean Scrollbar */
.monsfer-dashboard ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.monsfer-dashboard ::-webkit-scrollbar-track {
    background: transparent;
}

.monsfer-dashboard ::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 3px;
}

.monsfer-dashboard ::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}

/* ===================================================================
 * 3. HEADER SECTION
 * =================================================================== */
.monsfer-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 1.5rem;
}

.monsfer-welcome {
    font-size: 0.875rem;
    color: var(--monsfer-muted);
    margin-bottom: 5px;
}

.monsfer-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--monsfer-ink);
    margin: 0;
    line-height: 1.2;
}

.monsfer-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

/* Status Badge */
.monsfer-badge {
    padding: 8px 16px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.monsfer-badge-admin {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.monsfer-badge-premium {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.monsfer-badge-trial {
    background: var(--blue-50);
    color: var(--blue-600);
}

.monsfer-badge-standard {
    background: var(--slate-100);
    color: var(--slate-600);
}

.monsfer-badge svg {
    margin-right: 6px;
}

/* Notification Bell */
.monsfer-bell {
    background: transparent !important;
    border: none !important;
    color: var(--slate-500) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    position: relative !important;
    padding: 0 !important;
}

.monsfer-bell:hover {
    background: var(--slate-100) !important;
    color: var(--monsfer-ink) !important;
}

.monsfer-bell svg {
    width: 22px !important;
    height: 22px !important;
    display: block !important;
    stroke: currentColor !important;
    fill: none !important;
}

.monsfer-bell-dot {
    position: absolute !important;
    top: 6px !important;
    right: 6px !important;
    width: 8px !important;
    height: 8px !important;
    background: var(--red-600) !important;
    border-radius: 50% !important;
    border: 2px solid #fff !important;
}

/* Profile Avatar */
.monsfer-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: var(--shadow-mid);
    cursor: pointer;
}

/* ===================================================================
 * 4. BAND SCORE CARD (Focus Zone)
 * =================================================================== */
.monsfer-score-card {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--monsfer-border);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-saas);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .monsfer-score-card {
        flex-direction: row;
    }
}

/* Left: Score Display */
.monsfer-score-left {
    width: 100%;
    padding: 1.5rem 2rem;
    background: rgba(248, 250, 252, 0.5);
    border-bottom: 1px solid var(--monsfer-border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

@media (min-width: 768px) {
    .monsfer-score-left {
        width: 33.333%;
        border-bottom: none;
        border-right: 1px solid var(--monsfer-border);
        text-align: left;
        min-height: 340px;
    }
}

.monsfer-score-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--monsfer-muted);
    margin-bottom: 1rem;
}

.monsfer-score-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .monsfer-score-value {
        justify-content: flex-start;
    }
}

.monsfer-score-big {
    font-size: 5rem;
    font-weight: 700;
    color: var(--monsfer-ink);
    letter-spacing: -0.04em;
    line-height: 1;
    margin-left: -4px;
}

@media (min-width: 768px) {
    .monsfer-score-big {
        font-size: 5.5rem;
    }
}

.monsfer-score-max {
    font-size: 1.25rem;
    color: var(--monsfer-muted);
    font-weight: 500;
    transform: translateY(-0.5rem);
}

.monsfer-score-gap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

@media (min-width: 768px) {
    .monsfer-score-gap {
        justify-content: flex-start;
    }
}

.monsfer-gap-positive {
    font-weight: 700;
    color: var(--emerald-600);
}

.monsfer-gap-negative {
    font-weight: 700;
    color: var(--red-600);
}

.monsfer-confidence {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--monsfer-muted);
    opacity: 0.8;
    margin-top: 0.25rem;
}

@media (min-width: 768px) {
    .monsfer-confidence {
        justify-content: flex-start;
    }
}

.monsfer-confidence-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--slate-400);
}

/* Target Edit Button */
.monsfer-target-edit-btn {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 2px;
    padding: 0;
}

.monsfer-target-edit-btn:hover {
    color: var(--brand-primary);
}

.monsfer-score-cta {
    padding-top: 1.5rem;
}

.monsfer-btn-primary {
    width: 100%;
    height: 56px;
    background: #344054 !important;
    /* Kullanıcı görseline uygun koyu ton */
    color: #fff !important;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.monsfer-btn-primary:hover {
    background: #1f2937 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.monsfer-btn-primary:active {
    transform: scale(0.98);
}

.monsfer-score-hint {
    font-size: 10px;
    color: var(--monsfer-muted);
    text-align: center;
    margin-top: 0.75rem;
    opacity: 0.7;
    display: none;
}

@media (min-width: 768px) {
    .monsfer-score-hint {
        display: block;
    }
}

/* Right: Critical Insight */
.monsfer-score-right {
    display: none;
    width: 66.666%;
    padding: 1.5rem 2rem;
    flex-direction: column;
    background: #fff;
}

@media (min-width: 768px) {
    .monsfer-score-right {
        display: flex;
    }
}

.monsfer-insight-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--monsfer-ink);
    margin-bottom: 0.75rem;
}

.monsfer-insight-title span {
    color: var(--brand-primary);
}

.monsfer-insight-text {
    font-size: 0.875rem;
    color: var(--slate-600);
    line-height: 1.6;
    max-width: 600px;
    margin-bottom: 1.25rem;
}

/* Suggestion Card */
.monsfer-suggestion-card {
    background: rgba(239, 246, 255, 0.5);
    border: 1px solid var(--blue-100);
    border-radius: 12px;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 0.75rem;
}

.monsfer-suggestion-card:hover {
    background: var(--blue-50);
    border-color: var(--blue-200);
}

.monsfer-suggestion-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    box-shadow: var(--shadow-low);
    flex-shrink: 0;
}

.monsfer-suggestion-content {
    flex: 1;
    min-width: 0;
}

.monsfer-suggestion-label {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--brand-primary);
    margin-bottom: 2px;
}

.monsfer-suggestion-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--monsfer-ink);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.monsfer-suggestion-title .dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--slate-300);
}

.monsfer-suggestion-title .factor {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--slate-500);
}

.monsfer-suggestion-arrow {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--blue-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
    transition: all 0.2s;
}

.monsfer-suggestion-card:hover .monsfer-suggestion-arrow {
    background: var(--brand-primary);
    color: #fff;
}

.monsfer-suggestion-hint {
    font-size: 10px;
    color: var(--monsfer-muted);
    opacity: 0.7;
    padding-left: 4px;
}

/* ===================================================================
 * 5. SECTION TITLE
 * =================================================================== */
.monsfer-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--monsfer-ink);
    margin-bottom: 1rem;
}

/* ===================================================================
 * 6. SKILL CARDS GRID (Pratiğe Başla)
 * =================================================================== */
.monsfer-skill-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .monsfer-skill-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .monsfer-skill-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.monsfer-skill-card {
    background: #fff;
    border: 1px solid var(--monsfer-border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

.monsfer-skill-card:hover {
    box-shadow: var(--shadow-mid);
    transform: translateY(-2px);
}

.monsfer-skill-header {
    padding: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.monsfer-skill-icon-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.monsfer-skill-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.monsfer-skill-icon svg {
    width: 24px;
    height: 24px;
}

.monsfer-skill-icon-writing {
    background: var(--blue-50);
    color: var(--blue-600);
}

.monsfer-skill-icon-speaking {
    background: var(--purple-50);
    color: var(--purple-500);
}

.monsfer-skill-icon-reading {
    background: var(--emerald-50);
    color: var(--emerald-500);
}

.monsfer-skill-icon-task {
    background: #FFF7ED;
    color: #EA580C;
}

.monsfer-skill-info {
    flex: 1;
    min-width: 0;
}

.monsfer-skill-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--monsfer-ink);
    margin-bottom: 4px;
}

.monsfer-skill-desc {
    font-size: 0.8125rem;
    color: var(--monsfer-muted);
}

.monsfer-skill-arrow {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* Usage Bar */
.monsfer-usage-bar {
    padding: 0.75rem 1.25rem 1rem;
    border-top: 1px solid var(--slate-100);
}

.monsfer-usage-header {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--monsfer-muted);
    margin-bottom: 6px;
}

.monsfer-usage-track {
    height: 6px;
    background: var(--slate-200);
    border-radius: 3px;
    overflow: hidden;
}

.monsfer-usage-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.monsfer-usage-fill-green {
    background: var(--emerald-500);
}

.monsfer-usage-fill-orange {
    background: var(--orange-500);
}

.monsfer-usage-fill-red {
    background: var(--red-600);
}

/* ===================================================================
 * 7. MAIN GRID (Performance + Activities)
 * =================================================================== */
.monsfer-main-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 992px) {
    .monsfer-main-grid {
        grid-template-columns: 1fr 1.6fr;
    }
}

/* ===================================================================
 * 8. CARDS
 * =================================================================== */
.monsfer-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
}

.monsfer-card-header {
    margin-bottom: 1rem;
}

.monsfer-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--monsfer-ink);
    margin: 0;
}

/* ===================================================================
 * 9. CONTROL PANEL (Dark Block)
 * =================================================================== */
.monsfer-control-dark {
    background: var(--slate-800);
    border-radius: var(--radius-card);
    padding: 1.25rem;
    color: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    margin-bottom: 1.5rem;
}

.monsfer-control-dark-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.monsfer-control-dark-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.8;
}

.monsfer-control-dark-badge {
    font-size: 10px;
    background: var(--slate-700);
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid var(--slate-600);
}

.monsfer-usage-item {
    margin-bottom: 0.75rem;
}

.monsfer-usage-item-header {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    opacity: 0.9;
    margin-bottom: 4px;
}

.monsfer-usage-item-track {
    height: 4px;
    background: var(--slate-700);
    border-radius: 2px;
    overflow: hidden;
}

.monsfer-usage-item-fill {
    height: 100%;
    background: var(--blue-500);
}

.monsfer-control-hint {
    font-size: 9px;
    color: var(--slate-400);
    margin-top: 0.75rem;
    opacity: 0.8;
}

/* ===================================================================
 * 10. QUICK ACTIONS
 * =================================================================== */
.monsfer-quick-actions {
    background: #fff;
    border-radius: var(--radius-card);
    border: 1px solid var(--monsfer-border);
    padding: 1.25rem;
    box-shadow: var(--shadow-low);
}

.monsfer-quick-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.monsfer-quick-header svg {
    color: #F59E0B;
}

.monsfer-quick-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--monsfer-ink);
}

.monsfer-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background 0.2s;
    cursor: pointer;
    margin-bottom: 0.5rem;
    border: 1px solid transparent;
    text-decoration: none;
    color: inherit;
}

.monsfer-action-row:hover {
    background: var(--slate-50);
}

.monsfer-action-row:last-child {
    margin-bottom: 0;
}

.monsfer-action-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--monsfer-muted);
    flex-shrink: 0;
    margin-right: 0.75rem;
}

.monsfer-action-info {
    flex: 1;
    min-width: 0;
}

.monsfer-action-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--monsfer-ink);
    margin-bottom: 2px;
}

.monsfer-action-desc {
    font-size: 10px;
    color: var(--monsfer-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.monsfer-action-arrow {
    color: var(--slate-300);
}

.monsfer-action-row:hover .monsfer-action-arrow {
    color: var(--slate-500);
}

/* ===================================================================
 * 11. PERFORMANCE CHART
 * =================================================================== */
.monsfer-chart-container {
    flex: 1;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.monsfer-chart-inner {
    height: 250px;
    position: relative;
    width: 100%;
}

@media (max-width: 768px) {
    .monsfer-chart-inner {
        min-width: 400px;
    }

    .monsfer-chart-inner canvas {
        height: 250px !important;
    }
}

/* Chart Tabs */
.monsfer-chart-tabs {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.monsfer-chart-tabs::-webkit-scrollbar {
    display: none;
}

.monsfer-chart-tab {
    padding: 6px 12px;
    border-radius: var(--radius-pill);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    background: transparent;
    color: var(--slate-500);
}

.monsfer-chart-tab:hover {
    background: var(--slate-50);
}

.monsfer-chart-tab.active {
    background: var(--blue-50);
    color: var(--brand-primary);
    border-color: var(--blue-100);
}

/* Chart Footer */
.monsfer-chart-footer {
    background: var(--slate-50);
    border-top: 1px solid var(--monsfer-border);
    padding: 1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 -1.25rem -1.25rem;
}

@media (min-width: 768px) {
    .monsfer-chart-footer {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.monsfer-chart-analysis {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.monsfer-chart-analysis-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--monsfer-muted);
}

.monsfer-chart-analysis-text {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--monsfer-ink);
}

.monsfer-chart-cta {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    gap: 4px;
    background: #fff;
    border: 1px solid var(--slate-200);
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

@media (min-width: 768px) {
    .monsfer-chart-cta {
        background: transparent;
        border: none;
        padding: 0;
    }
}

.monsfer-chart-cta:hover {
    text-decoration: underline;
}

/* ===================================================================
 * 12. ACTIVITIES TABLE
 * =================================================================== */
.monsfer-activities {
    flex: 1;
    overflow-x: auto;
}

.monsfer-activities-table {
    width: 100%;
    border-collapse: collapse;
}

.monsfer-activity-row {
    border-bottom: 1px solid var(--slate-100);
}

.monsfer-activity-row:last-child {
    border-bottom: none;
}

.monsfer-activity-cell {
    padding: 1rem 0.5rem;
    vertical-align: middle;
}

.monsfer-activity-type {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--monsfer-ink);
}

.monsfer-activity-time {
    font-size: 11px;
    color: var(--slate-400);
    margin-top: 2px;
}

.monsfer-activity-content {
    font-size: 0.8125rem;
    color: var(--monsfer-body);
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monsfer-activity-score {
    background: var(--slate-800);
    color: #fff;
    min-width: 36px;
    height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 700;
    font-size: 12px;
}

.monsfer-activity-score-empty {
    background: var(--slate-100);
    color: var(--slate-400);
}

.monsfer-activity-link {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: 10px;
    color: var(--brand-primary);
    transition: all 0.2s;
    text-decoration: none;
}

.monsfer-activity-link:hover {
    background: var(--blue-100);
}

.monsfer-empty-state {
    text-align: center;
    padding: 2rem;
    color: var(--slate-400);
}

/* ===================================================================
 * 13. DROPDOWNS
 * =================================================================== */
.monsfer-dropdown {
    display: none;
    position: absolute;
    top: 55px;
    right: 0;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 100;
    border: 1px solid var(--monsfer-border);
    overflow: hidden;
}

.monsfer-dropdown.show {
    display: block;
}

.monsfer-dropdown-notifications {
    width: 340px;
    right: 50px;
}

.monsfer-dropdown-profile {
    width: 300px;
}

@media (max-width: 768px) {

    .monsfer-dropdown-notifications,
    .monsfer-dropdown-profile {
        position: fixed !important;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: 70vh !important;
        border-radius: 20px 20px 0 0 !important;
        z-index: 9999 !important;
    }
}

.monsfer-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background: #fff;
    gap: 4px;
}

.monsfer-dropdown-title {
    font-weight: 700;
    color: var(--monsfer-ink);
    font-size: 15px;
    margin-bottom: 10px;
    align-self: flex-start;
    /* Title solda kalsın */
    display: none;
    /* Profil başlığına gerek yok, görsel var */
}

/* Bildirim dropdown'ı için özel header */
.monsfer-dropdown-notifications .monsfer-dropdown-header {
    background: var(--slate-50);
    flex-direction: row;
    justify-content: space-between;
    gap: 0;
}

.monsfer-dropdown-notifications .monsfer-dropdown-title {
    display: block;
    margin-bottom: 0;
}

.monsfer-dropdown-content {
    max-height: 350px;
    overflow-y: auto;
}

/* Profile Tabs - Segmented Control Style */
.monsfer-profile-tabs {
    display: flex;
    background: var(--slate-100);
    padding: 4px;
    border-radius: 8px;
    margin: 15px 20px 0 20px;
    border: none;
}

.monsfer-profile-tab {
    flex: 1;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-500);
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.monsfer-profile-tab:hover:not(.active) {
    color: var(--monsfer-ink);
    background: rgba(255, 255, 255, 0.5);
}

.monsfer-profile-tab.active {
    color: var(--monsfer-ink);
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.monsfer-profile-content {
    padding: 20px;
}

/* ===================================================================
 * 14. ANIMATIONS
 * =================================================================== */
@keyframes monsfer-fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.monsfer-animate-in {
    animation: monsfer-fadeIn 0.3s ease-out;
}

/* ===================================================================
 * 15. UTILITIES
 * =================================================================== */
.monsfer-text-primary {
    color: var(--brand-primary);
}

.monsfer-text-success {
    color: var(--status-success);
}

.monsfer-text-error {
    color: var(--status-error);
}

.monsfer-text-muted {
    color: var(--monsfer-muted);
}

.monsfer-font-bold {
    font-weight: 700;
}

.monsfer-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Link Fixes */
.monsfer-activity-link {
    width: auto !important;
    height: 32px;
    padding: 0 12px;
    gap: 6px;
}

.monsfer-activity-link-text {
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

/* Chart Scroll Fix for Flexbox */
.monsfer-chart-container {
    min-width: 0;
    /* Critical for flex item scrolling */
}

@media (max-width: 480px) {
    .monsfer-activity-link {
        padding: 0 8px;
    }

    .monsfer-activity-link-text {
        font-size: 10px;
    }
}


/* Fix Chart Scrolling - Force wider width */
@media (max-width: 768px) {
    .monsfer-chart-inner {
        min-width: 600px !important;
        /* Force scroll */
    }
}

/* Fix Activities Overflow */
.monsfer-activities {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
    /* Space for scrollbar */
}

/* Fix View Details Button size on Mobile */
@media (max-width: 480px) {
    .monsfer-activity-link .monsfer-activity-link-text {
        display: none;
        /* Hide text on mobile to make it small */
    }

    .monsfer-activity-link {
        width: 32px !important;
        /* Icon box size */
        padding: 0 !important;
        justify-content: center;
    }
}


/* Mobile Recent Activities Card Layout Refactor */
@media (max-width: 768px) {

    /* Reset Table to Block for Card View */
    .monsfer-activities-table,
    .monsfer-activities-table tbody,
    .monsfer-activities-table tr,
    .monsfer-activities-table td {
        display: block !important;
        width: 100% !important;
    }

    .monsfer-activities {
        overflow: visible !important;
        /* Allow cards to show shadow */
        padding-bottom: 0;
    }

    /* Card Styling for Rows */
    .monsfer-activity-row {
        background: #fff;
        border: 1px solid var(--monsfer-border);
        border-radius: 12px;
        margin-bottom: 1.25rem;
        padding: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Cell Resets & Styling */
    .monsfer-activity-cell {
        padding: 0.75rem 0 !important;
        border-bottom: 1px solid var(--slate-100);
        display: flex;
        flex-direction: column;
        align-items: center;
        /* Center content */
        text-align: center !important;
        gap: 4px;
    }

    .monsfer-activity-cell:last-child {
        border-bottom: none;
        padding-bottom: 0 !important;
        padding-top: 1rem !important;
    }

    .monsfer-activity-cell:first-child {
        padding-top: 0 !important;
    }

    /* Label Styling via data-label */
    .monsfer-activity-cell::before {
        content: attr(data-label);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        color: var(--monsfer-muted);
        margin-bottom: 4px;
    }

    /* Content Styling Adjustments */
    .monsfer-activity-type {
        font-size: 1rem;
    }

    .monsfer-activity-content {
        max-width: 100%;
        text-align: center;
        white-space: normal;
        /* Allow wrapping */
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* Button Transformation */
    .monsfer-activity-link {
        width: 100% !important;
        height: 48px !important;
        background: var(--slate-900) !important;
        color: #fff !important;
        border-radius: 8px;
        justify-content: center;
        text-decoration: none;
        margin-top: 0.5rem;
    }

    .monsfer-activity-link:hover {
        background: var(--slate-700) !important;
    }

    .monsfer-activity-link .monsfer-activity-link-text {
        display: inline-block !important;
        /* Force show text */
        color: #fff;
        font-size: 0.9rem;
    }

    .monsfer-activity-link svg {
        display: none;
        /* Hide icon if text is enough, or keep it */
    }

    /* Hide label for button cell */
    .monsfer-activity-cell:last-child::before {
        display: none;
    }
}


/* AGGRESSIVE Container Overflow Fix */
@media (max-width: 768px) {

    .monsfer-main-grid,
    .monsfer-card {
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .monsfer-activities,
    .monsfer-activities-table,
    .monsfer-activity-row {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .monsfer-activity-cell,
    .monsfer-activity-content {
        max-width: 100% !important;
        overflow: hidden !important;
        word-break: break-word !important;
        box-sizing: border-box !important;
    }

    /* Ensure button does not stretch past container */
    .monsfer-activity-link {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}


/* CRITICAL FIX - Main Grid Mobile Overflow */
@media (max-width: 768px) {
    .monsfer-main-grid {
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden !important;
    }

    .monsfer-main-grid>.monsfer-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        flex-shrink: 0;
    }

    /* Chart container fixes */
    .monsfer-chart-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: scroll !important;
        -webkit-overflow-scrolling: touch;
    }

    .monsfer-chart-inner {
        min-width: 500px;
        /* Force scroll on chart, not parent */
    }
}


/* Clean up activity card borders on mobile */
@media (max-width: 768px) {

    /* Remove all default borders */
    .monsfer-activity-row {
        border: none !important;
        border-bottom: none !important;
    }

    .monsfer-activity-cell {
        border: none !important;
        border-bottom: 1px solid var(--slate-100) !important;
    }

    /* First cell - no top padding, has bottom border */
    .monsfer-activity-cell:first-child {
        padding-top: 0 !important;
    }

    /* Last cell (button) - no border */
    .monsfer-activity-cell:last-child {
        border-bottom: none !important;
    }

    /* PUAN cell - also no border if its content looks weird */
    .monsfer-activity-cell[data-label="PUAN"] {
        border-bottom: 1px solid var(--slate-100) !important;
    }
}

/* =================================================================
   LANGUAGE SWITCHER OVERRIDES (Theme button hot-pink override)
   ================================================================= */
.ielts-lang-switcher {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    z-index: 100 !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
}

/* Base button styling overrides theme global buttons */
.ielts-lang-switcher .ielts-lang-switcher-btn,
.monsfer-header-actions .ielts-lang-switcher-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 8px 16px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 9999px !important; /* matches var(--radius-pill) / capsule */
    background: #ffffff !important;
    color: #475569 !important; /* slate-600 */
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    line-height: 1.2 !important;
    height: auto !important;
    min-height: unset !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 0 !important;
    width: auto !important;
}

/* Hover state overrides */
.ielts-lang-switcher .ielts-lang-switcher-btn:hover,
.monsfer-header-actions .ielts-lang-switcher-btn:hover {
    background: #f8fafc !important; /* slate-50 */
    color: #1e293b !important; /* slate-800 */
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08) !important;
}

/* Active/Open dropdown state */
.ielts-lang-switcher.open .ielts-lang-switcher-btn {
    border-color: #2563eb !important; /* brand-primary */
    background: #f8fafc !important;
    color: #1e293b !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1) !important;
}

/* Inner elements */
.ielts-lang-flag {
    font-size: 15px !important;
    line-height: 1 !important;
    display: inline-block !important;
}

.ielts-lang-label {
    letter-spacing: normal !important;
    font-size: 13px !important;
    font-weight: 600 !important;
}

.ielts-lang-chevron {
    transition: transform 0.2s ease !important;
    opacity: 0.6 !important;
    stroke-width: 2.5 !important;
    margin-left: 2px !important;
    stroke: currentColor !important;
    fill: none !important;
    display: inline-block !important;
    vertical-align: middle !important;
}

.ielts-lang-switcher.open .ielts-lang-chevron {
    transform: rotate(180deg) !important;
}

/* Dropdown menu overrides */
.ielts-lang-switcher .ielts-lang-dropdown {
    position: absolute !important;
    top: calc(100% + 6px) !important;
    right: 0 !important;
    display: none;
    flex-direction: column !important;
    min-width: 140px !important;
    padding: 6px !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    animation: ieltsLangDropIn 0.15s ease-out !important;
    z-index: 9999 !important;
}

@keyframes ieltsLangDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dropdown option overrides */
.ielts-lang-switcher .ielts-lang-option {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    padding: 8px 12px !important;
    border: none !important;
    border-radius: 8px !important;
    background: transparent !important;
    cursor: pointer !important;
    font-family: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    transition: all 0.15s ease !important;
    text-align: left !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    margin: 0 !important;
}

.ielts-lang-switcher .ielts-lang-option:hover {
    background: rgba(37, 99, 235, 0.06) !important;
    color: #2563eb !important;
}

.ielts-lang-switcher .ielts-lang-option.active {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    font-weight: 600 !important;
}

.ielts-lang-option-flag {
    font-size: 18px !important;
    line-height: 1 !important;
}

.ielts-lang-option-name {
    flex: 1 !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .ielts-lang-switcher .ielts-lang-switcher-btn,
    .monsfer-header-actions .ielts-lang-switcher-btn {
        padding: 6px 12px !important;
        font-size: 12px !important;
        border-radius: 9999px !important;
    }

    .ielts-lang-flag {
        font-size: 14px !important;
    }

    .ielts-lang-switcher .ielts-lang-dropdown {
        min-width: 130px !important;
    }
}

/* =================================================================
   GOOGLE TRANSLATE WIDGET HIDING & OVERRIDES
   ================================================================= */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
.goog-te-balloon-frame {
    display: none !important;
}
body {
    top: 0 !important;
}
#goog-gt-tt {
    display: none !important;
    visibility: hidden !important;
}
.goog-text-highlight {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* =================================================================
   THEME SYNCHRONIZATION OVERRIDES (CACHE & DISCREPANCY FIX)
   ================================================================= */
body:not(.toefl-dark) {
    background-color: #f8fafc !important;
    background-image: none !important;
}
body:not(.toefl-dark) #primary,
body:not(.toefl-dark) #content,
body:not(.toefl-dark) .site-content,
body:not(.toefl-dark) .ast-container,
body:not(.toefl-dark) #main {
    background-color: #f8fafc !important;
    background-image: none !important;
}

body.toefl-dark {
    background-color: #0f172a !important;
}
body.toefl-dark #primary,
body.toefl-dark #content,
body.toefl-dark .site-content,
body.toefl-dark .ast-container,
body.toefl-dark #main {
    background-color: #0f172a !important;
}