/* ============================================================
   Admin Panel - Stil Dosyası
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary:      #1B2B6B;
    --primary-dark: #0f1a42;
    --accent:       #C8A84B;
    --sidebar-w:    260px;
    --white:        #ffffff;
    --off-white:    #f7f8fc;
    --border:       #e2e6f0;
    --text:         #2d3748;
    --text-muted:   #6b7280;
    --success:      #22c55e;
    --danger:       #ef4444;
    --warning:      #f59e0b;
    --info:         #3b82f6;
    --shadow:       0 2px 12px rgba(27,43,107,.1);
    --radius:       10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--off-white);
    color: var(--text);
    font-size: .9rem;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--primary); transition: all .2s; }

/* --- Sidebar --- */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--primary-dark);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    z-index: 100;
    transition: transform .3s;
}

.sidebar-brand {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.07);
}

.sidebar-brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -.3px;
}

.sidebar-brand-name span { color: var(--accent); }
.sidebar-tagline { font-size: .7rem; color: rgba(255,255,255,.35); letter-spacing: 1px; text-transform: uppercase; margin-top: .2rem; }

.sidebar-nav { padding: 1rem 0; flex: 1; }

.nav-section-label {
    font-size: .68rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255,255,255,.25);
    padding: 1rem 1.5rem .4rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .72rem 1.5rem;
    color: rgba(255,255,255,.55);
    font-size: .875rem;
    font-weight: 500;
    transition: all .2s;
    position: relative;
    border-radius: 0;
}

.sidebar-link i { font-size: 1rem; width: 18px; text-align: center; }

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--white);
    background: rgba(255,255,255,.06);
}

.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--accent);
    border-radius: 0 2px 2px 0;
}

.sidebar-link.active i { color: var(--accent); }

.badge-count {
    margin-left: auto;
    background: var(--accent);
    color: var(--primary-dark);
    font-size: .68rem;
    font-weight: 700;
    padding: .2rem .55rem;
    border-radius: 50px;
    min-width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,.07);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .75rem;
}

.sidebar-avatar {
    width: 36px; height: 36px;
    background: var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.sidebar-user-info .name { color: var(--white); font-size: .85rem; font-weight: 600; }
.sidebar-user-info .role { color: rgba(255,255,255,.35); font-size: .73rem; text-transform: uppercase; letter-spacing: .5px; }

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: rgba(255,255,255,.4);
    font-size: .82rem;
    padding: .4rem 0;
    transition: all .2s;
}
.sidebar-logout:hover { color: #ef4444; }

/* --- Main Content --- */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    background: var(--white);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 1px 4px rgba(27,43,107,.06);
}

.admin-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-breadcrumb {
    font-size: .8rem;
    color: var(--text-muted);
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: .4rem;
    align-items: center;
}

.admin-breadcrumb li::after { content: '/'; margin-left: .4rem; color: var(--border); }
.admin-breadcrumb li:last-child::after { display: none; }
.admin-breadcrumb a { color: var(--text-muted); }
.admin-breadcrumb a:hover { color: var(--primary); }

.admin-header-actions { display: flex; align-items: center; gap: 1rem; }

.header-btn {
    background: none;
    border: none;
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .2s;
    position: relative;
}

.header-btn:hover { background: var(--off-white); color: var(--primary); }

.admin-content { padding: 2rem; flex: 1; }

/* --- Dashboard Cards --- */
.stat-widget {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: all .2s;
}

.stat-widget:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(27,43,107,.12); }

.stat-widget-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-widget-icon.blue   { background: rgba(59,130,246,.12);  color: #3b82f6; }
.stat-widget-icon.green  { background: rgba(34,197,94,.12);   color: #22c55e; }
.stat-widget-icon.gold   { background: rgba(200,168,75,.15);  color: var(--accent); }
.stat-widget-icon.navy   { background: rgba(27,43,107,.1);    color: var(--primary); }
.stat-widget-icon.red    { background: rgba(239,68,68,.1);    color: #ef4444; }
.stat-widget-icon.purple { background: rgba(168,85,247,.1);   color: #a855f7; }

.stat-widget-info .label { font-size: .78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.stat-widget-info .value { font-size: 1.6rem; font-weight: 700; color: var(--primary); line-height: 1.2; margin-top: .1rem; }

/* --- Data Tables --- */
.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.admin-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.admin-card-body { padding: 1.5rem; }

.table-responsive { overflow-x: auto; }

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.admin-table th {
    background: var(--off-white);
    color: var(--text-muted);
    font-size: .73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.admin-table td {
    padding: .9rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:hover { background: rgba(27,43,107,.03); }

.badge-active   { background: rgba(34,197,94,.12);  color: #166534; font-size: .72rem; padding: .3rem .7rem; border-radius: 50px; font-weight: 600; }
.badge-inactive { background: rgba(239,68,68,.1);   color: #991b1b; font-size: .72rem; padding: .3rem .7rem; border-radius: 50px; font-weight: 600; }
.badge-unread   { background: rgba(59,130,246,.12); color: #1e40af; font-size: .72rem; padding: .3rem .7rem; border-radius: 50px; font-weight: 600; }
.badge-read     { background: rgba(107,114,128,.1); color: #6b7280; font-size: .72rem; padding: .3rem .7rem; border-radius: 50px; font-weight: 600; }

.action-btn {
    width: 30px; height: 30px;
    border: none;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    cursor: pointer;
    transition: all .15s;
    text-decoration: none;
}

.action-btn.edit  { background: rgba(59,130,246,.1);  color: #3b82f6; }
.action-btn.delete{ background: rgba(239,68,68,.1);  color: #ef4444; }
.action-btn.view  { background: rgba(34,197,94,.1);  color: #22c55e; }
.action-btn.toggle{ background: rgba(245,158,11,.1); color: #f59e0b; }

.action-btn:hover { filter: brightness(.85); transform: scale(1.05); }

/* --- Forms --- */
.form-section { margin-bottom: 2rem; }
.form-section-title { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }

.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: 8px;
    padding: .65rem .9rem;
    font-size: .88rem;
    color: var(--text);
    background: var(--white);
    transition: all .2s;
    width: 100%;
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27,43,107,.08);
}

.form-label { font-size: .83rem; font-weight: 600; color: var(--primary); margin-bottom: .35rem; display: block; }
.form-text  { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

textarea.form-control { min-height: 120px; resize: vertical; }

/* --- Buttons --- */
.btn { font-size: .875rem; font-weight: 600; border-radius: 8px; padding: .55rem 1.25rem; cursor: pointer; transition: all .2s; display: inline-flex; align-items: center; gap: .5rem; border: 2px solid transparent; }
.btn-primary { background: var(--primary); color: var(--white); border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--primary-dark); border-color: var(--accent); }
.btn-accent:hover { filter: brightness(.9); }
.btn-success { background: #22c55e; color: var(--white); border-color: #22c55e; }
.btn-danger { background: #ef4444; color: var(--white); border-color: #ef4444; }
.btn-outline { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-outline:hover { background: var(--off-white); border-color: var(--primary); }
.btn-sm { padding: .35rem .9rem; font-size: .8rem; }

/* --- Alert --- */
.alert { padding: .85rem 1.2rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1.25rem; display: flex; align-items: center; gap: .75rem; }
.alert-success { background: rgba(34,197,94,.1); border: 1px solid rgba(34,197,94,.3); color: #166534; }
.alert-danger   { background: rgba(239,68,68,.1); border: 1px solid rgba(239,68,68,.3);  color: #991b1b; }
.alert-warning  { background: rgba(245,158,11,.1);border: 1px solid rgba(245,158,11,.3); color: #92400e; }
.alert-info     { background: rgba(59,130,246,.1);border: 1px solid rgba(59,130,246,.3); color: #1e40af; }

/* --- Login Page --- */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, #2d44a0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    background: var(--white);
    border-radius: 16px;
    padding: 3rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 40px 80px rgba(15,26,66,.4);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo .brand { font-size: 1.6rem; font-weight: 700; color: var(--primary); }
.login-logo .brand span { color: var(--accent); }
.login-logo .subtitle { font-size: .8rem; color: var(--text-muted); letter-spacing: 1px; text-transform: uppercase; margin-top: .3rem; }

.login-title { font-size: 1.3rem; font-weight: 700; color: var(--primary); margin-bottom: .4rem; }
.login-subtitle { font-size: .85rem; color: var(--text-muted); margin-bottom: 2rem; }

.login-input-wrap { position: relative; margin-bottom: 1rem; }
.login-input-wrap i {
    position: absolute;
    left: 1rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .95rem;
}
.login-input-wrap .form-control { padding-left: 2.75rem; }

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 8px;
    padding: .85rem;
    font-size: .95rem;
    font-weight: 600;
    margin-top: .5rem;
    cursor: pointer;
    transition: all .2s;
}

.btn-login:hover { opacity: .9; transform: translateY(-1px); }

/* --- Responsive --- */
@media (max-width: 991px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 1rem; }
}
