/* =============================================
   KARATE FEDERASYONU SİCİL SİSTEMİ
   Ana Stil Dosyası - Lacivert & Kırmızı Tema
   ============================================= */

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

/* === CSS Variables === */
:root {
    --primary: #0a1628;
    --primary-light: #132040;
    --primary-dark: #060e1a;
    --accent: #c8102e;
    --accent-light: #e8253f;
    --accent-dark: #a00d24;
    --secondary: #1a3a6b;
    --secondary-light: #2558a3;
    --gold: #d4a843;
    --gold-light: #f0c75e;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,.1), 0 2px 4px -2px rgba(0,0,0,.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,.1), 0 8px 10px -6px rgba(0,0,0,.1);
    --transition: all .3s cubic-bezier(.4,0,.2,1);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--secondary-light); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; }
ul, ol { list-style: none; }

/* === Auth Pages (Login/Register) === */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 50%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: 20px;
}
.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(200,16,46,.15) 0%, transparent 70%);
    top: -200px; right: -200px;
    border-radius: 50%;
    animation: pulse 8s ease-in-out infinite;
}
.auth-wrapper::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(212,168,67,.1) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    border-radius: 50%;
    animation: pulse 6s ease-in-out infinite reverse;
}
@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.1); opacity: 1; }
}
.auth-card {
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 460px;
    box-shadow: var(--shadow-xl), 0 0 60px rgba(0,0,0,.2);
    position: relative;
    z-index: 1;
    animation: slideUp .6s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}
.auth-logo .logo-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(200,16,46,.3);
}
.auth-logo .logo-icon i { font-size: 32px; color: var(--white); }
.auth-logo h1 {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -.5px;
}
.auth-logo p { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 28px;
}
.auth-tab {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    background: transparent;
}
.auth-tab.active, .auth-tab:hover {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow);
}

/* === Form Elements === */
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 6px;
}
.form-group label .required { color: var(--accent); }
.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--secondary-light);
    box-shadow: 0 0 0 3px rgba(37,88,163,.15);
}
.form-control.error { border-color: var(--danger); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2364748b' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
textarea.form-control { resize: vertical; min-height: 100px; }

.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .form-control { padding-left: 44px; }
.input-icon-wrap i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
}
.form-hint { font-size: 12px; color: var(--gray-500); margin-top: 4px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--secondary), var(--secondary-light)); color: var(--white); box-shadow: 0 4px 12px rgba(26,58,107,.3); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(26,58,107,.4); color: var(--white); }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-light)); color: var(--white); box-shadow: 0 4px 12px rgba(200,16,46,.3); }
.btn-accent:hover { box-shadow: 0 6px 20px rgba(200,16,46,.4); color: var(--white); }
.btn-success { background: var(--success); color: var(--white); }
.btn-danger { background: var(--danger); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--gray-300); color: var(--gray-600); }
.btn-outline:hover { border-color: var(--secondary-light); color: var(--secondary-light); }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: var(--radius-sm); }

/* === Dashboard Layout === */
.dashboard { display: flex; min-height: 100vh; }
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    overflow-y: auto;
    transition: var(--transition);
}
.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: 14px;
}
.sidebar-header .s-logo {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.sidebar-header .s-logo i { font-size: 20px; color: var(--white); }
.sidebar-header .s-info h3 { font-size: 15px; font-weight: 700; }
.sidebar-header .s-info p { font-size: 11px; opacity: .6; }

.sidebar-nav { padding: 16px 12px; }
.sidebar-nav .nav-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,.35);
    padding: 8px 12px 6px;
    margin-top: 12px;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.7);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,.08); color: var(--white); }
.nav-item.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(200,16,46,.3);
}
.nav-item i { font-size: 18px; width: 22px; text-align: center; }
.nav-item .badge-nav {
    margin-left: auto;
    background: rgba(255,255,255,.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

/* === Main Content === */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* === Topbar === */
.topbar {
    background: var(--white);
    padding: 0 32px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-left h2 { font-size: 20px; font-weight: 700; color: var(--primary); }
.topbar-left .breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-500); }
.topbar-left .breadcrumb a { color: var(--gray-500); }
.topbar-left .breadcrumb a:hover { color: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.topbar-user:hover { background: var(--gray-50); }
.topbar-user .avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--secondary), var(--secondary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
}
.topbar-user .user-info span { display: block; font-size: 13px; font-weight: 600; color: var(--gray-800); }
.topbar-user .user-info small { font-size: 11px; color: var(--gray-500); }

.menu-toggle {
    display: none;
    background: none; border: none;
    font-size: 24px; color: var(--gray-600);
    cursor: pointer;
}

/* === Page Content === */
.page-content { padding: 32px; flex: 1; }

/* === Stat Cards === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100px;
    border-radius: 50%;
    opacity: .05;
    transform: translate(30%, -30%);
}
.stat-card.red::after { background: var(--accent); }
.stat-card.blue::after { background: var(--secondary-light); }
.stat-card.green::after { background: var(--success); }
.stat-card.gold::after { background: var(--gold); }
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 16px;
}
.stat-card.red .stat-icon { background: rgba(200,16,46,.1); color: var(--accent); }
.stat-card.blue .stat-icon { background: rgba(37,88,163,.1); color: var(--secondary-light); }
.stat-card.green .stat-icon { background: rgba(16,185,129,.1); color: var(--success); }
.stat-card.gold .stat-icon { background: rgba(212,168,67,.1); color: var(--gold); }
.stat-card .stat-value { font-size: 28px; font-weight: 800; color: var(--primary); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }

/* === Cards === */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 { font-size: 16px; font-weight: 700; color: var(--primary); }
.card-body { padding: 24px; }
.card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* === Tables === */
.table-responsive { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    background: var(--gray-50);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--gray-500);
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}
.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-700);
}
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--gray-50); }
.data-table .actions { display: flex; gap: 6px; }

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: rgba(16,185,129,.1); color: var(--success); }
.badge-danger { background: rgba(239,68,68,.1); color: var(--danger); }
.badge-warning { background: rgba(245,158,11,.1); color: var(--warning); }
.badge-info { background: rgba(59,130,246,.1); color: var(--info); }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }

/* === Belt Colors === */
.belt-badge { padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; display: inline-block; }
.belt-white { background: #f0f0f0; color: #333; border: 1px solid #ddd; }
.belt-yellow { background: #fef3c7; color: #92400e; }
.belt-orange { background: #ffedd5; color: #9a3412; }
.belt-green { background: #d1fae5; color: #065f46; }
.belt-blue { background: #dbeafe; color: #1e40af; }
.belt-brown { background: #e8d5b7; color: #5c3d1e; }
.belt-black { background: #1e293b; color: #fff; }

/* === Alerts === */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown .3s ease;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert-success { background: rgba(16,185,129,.1); color: #065f46; border-left: 4px solid var(--success); }
.alert-danger { background: rgba(239,68,68,.1); color: #991b1b; border-left: 4px solid var(--danger); }
.alert-warning { background: rgba(245,158,11,.1); color: #92400e; border-left: 4px solid var(--warning); }
.alert-info { background: rgba(59,130,246,.1); color: #1e40af; border-left: 4px solid var(--info); }
.alert-close {
    margin-left: auto;
    background: none; border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: .5;
    color: inherit;
}
.alert-close:hover { opacity: 1; }

/* === Pagination === */
.pagination { display: flex; justify-content: center; gap: 4px; margin-top: 24px; }
.page-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    text-decoration: none;
}
.page-btn:hover, .page-btn.active {
    background: var(--secondary-light);
    color: var(--white);
    border-color: var(--secondary-light);
}

/* === Modal === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp .3s ease;
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 18px; font-weight: 700; }
.modal-close { background: none; border: none; font-size: 24px; cursor: pointer; color: var(--gray-400); }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; gap: 12px; justify-content: flex-end; }

/* === Empty State === */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state i { font-size: 56px; color: var(--gray-300); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--gray-600); margin-bottom: 8px; }
.empty-state p { color: var(--gray-400); font-size: 14px; margin-bottom: 24px; }

/* === Verification Code Input === */
.code-inputs { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.code-inputs input {
    width: 52px; height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}
.code-inputs input:focus { border-color: var(--secondary-light); box-shadow: 0 0 0 3px rgba(37,88,163,.15); }

/* === Loading === */
.spinner { display: inline-block; width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.3); border-radius: 50%; border-top-color: var(--white); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading .btn-text { display: none; }
.btn.loading .spinner { display: inline-block; }

/* === Responsive === */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .form-row { flex-direction: column; gap: 0; }
}
@media (max-width: 768px) {
    .topbar { padding: 0 16px; height: 60px; }
    .page-content { padding: 16px; }
    .stats-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 22px; }
    .auth-card { padding: 32px 24px; }
    .code-inputs input { width: 44px; height: 52px; font-size: 20px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
    [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}
