/**
 * Akıllı Fotoğraf Yarışması — Üye Paneli (Dashboard) Stilleri
 * Modern Vercel/Geist Design System esintili minimalist tasarım.
 */

:root {
    --afy-dash-bg:            #ffffff;
    --afy-dash-fg:            #1f2937;
    --afy-dash-border:        #e5e3dd;
    --afy-dash-accent:        #8c1f21;       /* Kurumsal Bordo */
    --afy-dash-accent-hover:  #731719;       /* Koyu Bordo */
    --afy-dash-accent-yellow: #f1ab1a;       /* Kurumsal Altın-Sarı */
    --afy-dash-muted:         #4b5563;
    --afy-dash-bg-subtle:     #faf9f5;       /* Sıcak Krem Zemin */
    
    --afy-dash-error:         #dc2626;
    --afy-dash-success:       #059669;       /* Yeşil Durum */
    --afy-dash-success-bg:    #ecfdf5;
    --afy-dash-warning:       #d97706;       /* Sarı/Turuncu Durum */
    --afy-dash-warning-bg:    #fffbeb;
    --afy-dash-radius:        8px;
    --afy-dash-shadow:        0 4px 12px rgba(0, 0, 0, 0.03);
}

.afy-dashboard-wrapper,
.afy-dashboard-auth-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--afy-dash-fg);
    background: transparent;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Auth Card & Dashboard Card */
.afy-auth-card,
.afy-dashboard-card {
    background: var(--afy-dash-bg);
    border: 1px solid var(--afy-dash-border);
    border-radius: var(--afy-dash-radius) !important;
    box-shadow: var(--afy-dash-shadow);
    padding: 40px;
    box-sizing: border-box;
}

.afy-auth-header,
.afy-dashboard-header {
    margin-bottom: 30px;
}

.afy-auth-title,
.afy-dashboard-header h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.afy-auth-desc,
.afy-user-role {
    color: var(--afy-dash-muted);
    font-size: 14px;
    margin: 0;
}

/* User Info Box in Header */
.afy-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--afy-dash-border);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.afy-user-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.afy-user-avatar {
    width: 48px;
    height: 48px;
    background: var(--afy-dash-fg);
    color: var(--afy-dash-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.afy-user-name {
    margin: 0 0 2px 0;
    font-size: 18px;
    font-weight: 600;
}

/* Auth Tabs & Nav Tabs */
.afy-auth-tabs,
.afy-dashboard-tabs {
    display: flex;
    border-bottom: 1px solid var(--afy-dash-border);
    margin-bottom: 30px;
    gap: 24px;
}

.afy-auth-tab,
.afy-dashboard-tab {
    padding: 12px 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--afy-dash-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s ease;
}

.afy-auth-tab:hover,
.afy-dashboard-tab:hover {
    color: var(--afy-dash-fg);
}

.afy-auth-tab.active,
.afy-dashboard-tab.active {
    color: var(--afy-dash-fg);
    font-weight: 600;
}

.afy-auth-tab.active::after,
.afy-dashboard-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--afy-dash-fg);
}

/* Forms */
.afy-auth-form {
    display: none;
}

.afy-auth-form.active,
.afy-tab-content.active {
    display: block;
}

.afy-tab-content {
    display: none;
}

/* Stats Grid */
.afy-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.afy-stat-card {
    border: 1px solid var(--afy-dash-border);
    border-radius: var(--afy-dash-radius) !important;
    padding: 20px;
    background: var(--afy-dash-bg-subtle);
}

.afy-stat-card.success {
    border-color: #a7f3d0;
    background: #f0fdf4;
}

.afy-stat-card.warning {
    border-color: #fde047;
    background: #fefce8;
}

.afy-stat-title {
    font-size: 13px;
    color: var(--afy-dash-muted);
    font-weight: 500;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.afy-stat-value {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -1px;
}

.afy-info-section {
    border: 1px solid var(--afy-dash-border);
    border-radius: var(--afy-dash-radius) !important;
    padding: 24px;
    background: var(--afy-dash-bg);
}

/* Entries View */
.afy-entries-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.afy-entry-card {
    border: 1px solid var(--afy-dash-border);
    border-radius: var(--afy-dash-radius) !important;
    background: var(--afy-dash-bg);
    overflow: hidden;
}

.afy-entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--afy-dash-bg-subtle);
    padding: 16px 20px;
    border-bottom: 1px solid var(--afy-dash-border);
}

.afy-entry-ref {
    font-weight: 600;
    font-size: 15px;
    margin-right: 12px;
}

.afy-entry-date {
    font-size: 13px;
    color: var(--afy-dash-muted);
}

.afy-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px !important;
    text-transform: uppercase;
}

.afy-status-badge.paid {
    background: #d1fae5;
    color: #065f46;
}

.afy-status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.afy-status-badge.failed {
    background: #fee2e2;
    color: #991b1b;
}

.afy-entry-card-body {
    padding: 20px;
}

.afy-entry-meta-info {
    display: flex;
    gap: 30px;
    margin-bottom: 16px;
    font-size: 14px;
}

.afy-entry-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.afy-entry-photo-thumb {
    aspect-ratio: 1;
    width: 90px !important;
    height: 90px !important;
    border-radius: 6px !important;
    overflow: hidden;
    border: 1px solid var(--afy-dash-border);
    background: var(--afy-dash-bg-subtle);
    cursor: pointer;
}

.afy-entry-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.afy-entry-photo-thumb:hover .afy-entry-thumb-img {
    transform: scale(1.05);
}

.afy-entry-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--afy-dash-border);
    background: var(--afy-dash-bg-subtle);
    display: flex;
    justify-content: flex-end;
}

/* Empty State */
.afy-empty-state {
    text-align: center;
    padding: 60px 40px;
    border: 1px dashed var(--afy-dash-border);
    border-radius: var(--afy-dash-radius) !important;
}

/* Messages */
.afy-auth-message,
.afy-profile-message {
    margin-top: 15px;
    padding: 10px 14px;
    border-radius: 6px !important;
    font-size: 13px;
    display: none;
}

.afy-auth-message.error,
.afy-profile-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
    display: block;
}

.afy-auth-message.success,
.afy-profile-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

/* Responsive */
@media (max-width: 600px) {
    .afy-auth-card,
    .afy-dashboard-card {
        padding: 24px;
    }
    
    .afy-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .afy-logout-btn {
        width: 100%;
        text-align: center;
    }
}

/* Dashboard Language Switcher Overrides */
.afy-dashboard-wrapper .afy-lang-switcher,
.afy-dashboard-auth-container .afy-lang-switcher {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: inline-flex !important;
    gap: 4px !important;
    background: #e5e3dd !important; /* matches --afy-dash-border */
    padding: 3px !important;
    border: none !important;
    border-radius: 99px !important;
    z-index: 10 !important;
    height: 34px !important;
    box-sizing: border-box !important;
    align-items: center !important;
    margin: 0 !important;
}

.afy-dashboard-wrapper .afy-lang-btn,
.afy-dashboard-auth-container .afy-lang-btn {
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    border-radius: 99px !important;
    color: var(--afy-dash-muted) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    user-select: none !important;
    letter-spacing: 0.5px !important;
    height: 28px !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.afy-dashboard-wrapper .afy-lang-btn.active,
.afy-dashboard-auth-container .afy-lang-btn.active {
    background: #ffffff !important;
    color: var(--afy-dash-fg) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04) !important;
}
