/* ==========================================
   Başvuru Sistemi - Ana Stil Dosyası
   ========================================== */

:root {
    --brand-50: #f0f9ff;
    --brand-100: #e0f2fe;
    --brand-200: #bae6fd;
    --brand-500: #0ea5e9;
    --brand-600: #0284c7;
    --brand-700: #0369a1;
    --brand-900: #0c4a6e;
    --indigo-500: #6366f1;
    --indigo-600: #4f46e5;
    --emerald-500: #10b981;
    --emerald-600: #059669;
    --amber-500: #f59e0b;
    --red-500: #ef4444;
    --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;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
    --shadow: 0 4px 24px rgba(0,0,0,.08);
    --shadow-lg: 0 12px 40px rgba(0,0,0,.12);
    --transition: .3s cubic-bezier(.4,0,.2,1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--slate-50);
    color: var(--slate-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ===== LAYOUT ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ===== NAVBAR ===== */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--slate-100);
    padding: 0 20px;
}
.navbar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 72px;
}
.navbar-brand {
    display: flex; align-items: center; gap: 12px;
    font-family: 'Outfit', sans-serif;
    font-weight: 700; font-size: 1.25rem;
    color: var(--slate-900);
}
.navbar-brand img { height: 44px; width: auto; }
.navbar-links { display: flex; align-items: center; gap: 8px; }
.navbar-links a {
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: .875rem; font-weight: 500;
    color: var(--slate-600);
    transition: var(--transition);
}
.navbar-links a:hover { background: var(--slate-100); color: var(--slate-900); }
.navbar-links a.active { background: var(--brand-50); color: var(--brand-700); }

/* ===== HERO ===== */
.hero {
    position: relative; overflow: hidden;
    padding: 80px 20px 60px;
    background: linear-gradient(135deg, #0c4a6e 0%, #0369a1 40%, #6366f1 100%);
    color: #fff; text-align: center;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 6px 16px; border-radius: 50px;
    background: rgba(255,255,255,.15); backdrop-filter: blur(10px);
    font-size: .8rem; font-weight: 600;
    margin-bottom: 24px; border: 1px solid rgba(255,255,255,.2);
}
.hero-badge .dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; animation: pulse 2s infinite; }
.hero h1 {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800; line-height: 1.15;
    margin-bottom: 16px;
}
.hero p { font-size: 1.1rem; opacity: .85; max-width: 520px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 24px; border-radius: var(--radius-sm);
    font-weight: 600; font-size: .9rem;
    border: none; cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.btn-primary {
    background: var(--brand-600); color: #fff;
    box-shadow: 0 4px 14px rgba(14,165,233,.3);
}
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(14,165,233,.4); }
.btn-white { background: #fff; color: var(--slate-800); }
.btn-white:hover { background: var(--slate-100); transform: translateY(-1px); }
.btn-outline {
    background: transparent; color: #fff;
    border: 2px solid rgba(255,255,255,.3);
}
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.5); }
.btn-success { background: var(--emerald-600); color: #fff; }
.btn-success:hover { background: var(--emerald-500); }
.btn-danger { background: var(--red-500); color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-sm { padding: 8px 16px; font-size: .8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-ghost { background: transparent; color: var(--slate-600); }
.btn-ghost:hover { background: var(--slate-100); }
.btn-block { width: 100%; justify-content: center; }

/* ===== CARDS ===== */
.card {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--slate-200);
    overflow: hidden;
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.card-body { padding: 24px; }
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--slate-100);
    display: flex; align-items: center; justify-content: space-between;
}

/* Exam card */
.exam-card { position: relative; }
.exam-card .exam-type-badge {
    display: inline-flex; padding: 4px 12px;
    border-radius: 50px; font-size: .75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: .5px;
}
.badge-lgs { background: #dbeafe; color: #1e40af; }
.badge-tyt { background: #fce7f3; color: #9d174d; }
.badge-ayt { background: #ede9fe; color: #5b21b6; }
.badge-kpss { background: #d1fae5; color: #065f46; }
.badge-other { background: var(--slate-100); color: var(--slate-600); }

.exam-card .institution-name {
    font-size: .8rem; font-weight: 600;
    color: var(--brand-600); margin-bottom: 4px;
}
.exam-card h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem; font-weight: 700;
    color: var(--slate-900); margin-bottom: 12px;
}
.exam-meta { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.exam-meta-item {
    display: flex; align-items: center; gap: 6px;
    font-size: .85rem; color: var(--slate-500);
}
.exam-meta-item i { color: var(--brand-500); width: 16px; text-align: center; }
.exam-card .capacity-bar {
    height: 6px; background: var(--slate-100);
    border-radius: 3px; overflow: hidden; margin-top: 8px;
}
.exam-card .capacity-fill { height: 100%; background: var(--brand-500); border-radius: 3px; transition: width .5s ease; }
.exam-card .capacity-text { font-size: .75rem; color: var(--slate-400); margin-top: 4px; }
.exam-card-footer {
    padding: 16px 24px;
    background: var(--slate-50);
    border-top: 1px solid var(--slate-100);
    display: flex; align-items: center; justify-content: space-between;
}

/* ===== GRID ===== */
.exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 24px; padding: 40px 0;
}

/* ===== FILTERS ===== */
.filter-bar {
    display: flex; gap: 12px; flex-wrap: wrap;
    padding: 20px 0; align-items: center;
}
.filter-bar .search-input {
    flex: 1; min-width: 240px;
    padding: 10px 16px 10px 40px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M8 4a4 4 0 100 8 4 4 0 000-8zM2 8a6 6 0 1110.89 3.476l4.817 4.817a1 1 0 01-1.414 1.414l-4.816-4.816A6 6 0 012 8z'/%3E%3C/svg%3E") 12px center/18px no-repeat;
    font-size: .9rem; transition: var(--transition);
}
.filter-bar .search-input:focus { outline: none; border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(14,165,233,.1); }
.filter-select {
    padding: 10px 36px 10px 14px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    background: #fff; font-size: .9rem;
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%2394a3b8'%3E%3Cpath fill-rule='evenodd' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center; background-size: 18px;
    transition: var(--transition);
}
.filter-select:focus { outline: none; border-color: var(--brand-500); }

/* ===== FORMS ===== */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-size: .85rem; font-weight: 600;
    color: var(--slate-700); margin-bottom: 6px;
}
.form-label .required { color: var(--red-500); }
.form-input, .form-select, .form-textarea {
    width: 100%; padding: 12px 16px;
    border: 2px solid var(--slate-200);
    border-radius: var(--radius-sm);
    font-size: .95rem; background: #fff;
    transition: var(--transition);
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none; border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(14,165,233,.1);
}
.form-textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: .8rem; color: var(--slate-400); margin-top: 4px; }
.form-error { font-size: .8rem; color: var(--red-500); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 20px; border-radius: var(--radius-sm);
    font-size: .9rem; display: flex; align-items: flex-start; gap: 12px;
    margin-bottom: 20px;
}
.alert i { margin-top: 2px; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--brand-50); color: var(--brand-900); border: 1px solid var(--brand-200); }

/* ===== SECTION ===== */
.section { padding: 40px 0; }
.section-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem; font-weight: 700;
    color: var(--slate-900); margin-bottom: 8px;
}
.section-desc { color: var(--slate-500); margin-bottom: 24px; }

/* ===== FOOTER ===== */
.footer {
    background: var(--slate-900); color: var(--slate-400);
    padding: 40px 20px; text-align: center;
    margin-top: 60px;
}
.footer a { color: var(--brand-500); }
.footer a:hover { color: var(--brand-200); }

/* ===== SUCCESS PAGE ===== */
.success-box {
    text-align: center; padding: 60px 30px;
    background: #fff; border-radius: var(--radius-lg);
    border: 1px solid var(--slate-200); max-width: 520px;
    margin: 60px auto;
}
.success-icon {
    width: 80px; height: 80px; border-radius: 50%;
    background: #d1fae5; color: var(--emerald-600);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 2.5rem; margin-bottom: 24px;
    animation: scaleIn .5s ease;
}
.success-code {
    display: inline-block; padding: 12px 28px;
    background: var(--slate-100); border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 1.5rem; font-weight: 700;
    letter-spacing: 3px; color: var(--slate-800);
    margin: 16px 0; border: 2px dashed var(--slate-300);
}

/* ===== STATUS BADGES ===== */
.status-badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 4px 10px; border-radius: 50px;
    font-size: .75rem; font-weight: 600;
}
.status-pending { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: #fff; border-radius: var(--radius-lg);
    width: 100%; max-width: 600px; max-height: 90vh;
    overflow-y: auto; box-shadow: var(--shadow-lg);
    animation: slideUp .3s ease;
}
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--slate-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-family: 'Outfit', sans-serif; font-weight: 700; font-size: 1.2rem; }
.modal-close {
    width: 36px; height: 36px; border-radius: 50%;
    border: none; background: var(--slate-100);
    cursor: pointer; font-size: 1.1rem; color: var(--slate-500);
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
}
.modal-close:hover { background: var(--slate-200); color: var(--slate-800); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px; border-top: 1px solid var(--slate-100);
    display: flex; gap: 12px; justify-content: flex-end;
}

/* ===== ADMIN SIDEBAR ===== */
.admin-layout { display: flex; min-height: 100vh; }
.admin-sidebar {
    width: 260px; background: var(--slate-900); color: #fff;
    padding: 24px 0; flex-shrink: 0;
    display: flex; flex-direction: column;
}
.admin-sidebar .sidebar-brand {
    padding: 0 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.1);
    margin-bottom: 16px;
}
.admin-sidebar .sidebar-brand h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem; font-weight: 700;
}
.admin-sidebar .sidebar-brand small {
    font-size: .75rem; color: var(--slate-400);
}
.sidebar-nav { flex: 1; padding: 0 12px; }
.sidebar-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    color: var(--slate-400); font-size: .9rem; font-weight: 500;
    transition: var(--transition); margin-bottom: 4px;
}
.sidebar-nav a i { width: 20px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active { background: var(--brand-600); color: #fff; }
.sidebar-footer {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1);
    margin-top: auto;
}

.admin-main { flex: 1; padding: 32px; overflow-x: auto; background: var(--slate-50); }
.admin-main .page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem; font-weight: 700;
    color: var(--slate-900); margin-bottom: 4px;
}
.admin-main .page-desc { color: var(--slate-500); margin-bottom: 24px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 32px; }
.stat-card {
    background: #fff; padding: 20px; border-radius: var(--radius);
    border: 1px solid var(--slate-200);
}
.stat-card .stat-value { font-size: 2rem; font-weight: 800; font-family: 'Outfit', sans-serif; color: var(--slate-900); }
.stat-card .stat-label { font-size: .85rem; color: var(--slate-500); margin-top: 4px; }
.stat-card .stat-icon {
    width: 44px; height: 44px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem; margin-bottom: 12px;
}

/* Table */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--slate-200); }
.data-table th {
    padding: 12px 16px; text-align: left;
    font-size: .8rem; font-weight: 600;
    color: var(--slate-500); background: var(--slate-50);
    border-bottom: 2px solid var(--slate-200);
    text-transform: uppercase; letter-spacing: .5px;
}
.data-table td { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); font-size: .9rem; }
.data-table tr:hover td { background: var(--slate-50); }
.data-table .actions { display: flex; gap: 6px; }

/* Login page */
.login-wrapper {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--slate-900) 0%, var(--brand-900) 100%);
    padding: 20px;
}
.login-card {
    background: #fff; border-radius: var(--radius-lg);
    padding: 48px 40px; width: 100%; max-width: 420px;
    box-shadow: var(--shadow-lg);
}
.login-card h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem; font-weight: 700;
    text-align: center; margin-bottom: 8px;
}
.login-card .login-sub { text-align: center; color: var(--slate-500); font-size: .9rem; margin-bottom: 32px; }

/* Deadline warning */
.deadline-closed {
    background: #fee2e2; border: 2px solid #fca5a5;
    border-radius: var(--radius); padding: 20px; text-align: center;
    color: #991b1b;
}

/* ===== ANIMATIONS ===== */
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .5s ease forwards; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .exam-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
    .hero { padding: 60px 20px 40px; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 20px; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .navbar-links { display: none; }
    .form-grid { grid-template-columns: 1fr; }
}
