/* ==========================================================================
   Compass İletişim — Admin & Eleman Paneli Stilleri
   ========================================================================== */

:root {
    --vf-red: #E60000;
    --vf-red-dark: #BD0000;
    --sidebar-bg: #141418;
    --sidebar-hover: #222229;
    --bg: #F3F4F6;
    --card: #FFFFFF;
    --text: #1F2937;
    --muted: #6B7280;
    --border: #E5E7EB;
    --radius: 14px;
}

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

body {
    font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

.panel-layout {
    display: flex;
    min-height: 100vh;
}

/* ---------- Sidebar ---------- */
.panel-sidebar {
    width: 265px;
    background: var(--sidebar-bg);
    color: #D1D5DB;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--vf-red);
    color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sidebar-brand strong {
    display: block;
    color: #FFF;
    font-size: 1rem;
    font-weight: 800;
}

.sidebar-brand span {
    display: block;
    font-size: 0.72rem;
    color: #FF6B6B;
    font-weight: 700;
    text-transform: uppercase;
}

.sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex-grow: 1;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #6B7280;
    padding: 12px 12px 6px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #D1D5DB;
    transition: all 0.2s;
}

.sidebar-link:hover {
    background: var(--sidebar-hover);
    color: #FFF;
}

.sidebar-link.active {
    background: var(--vf-red);
    color: #FFF;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.82rem;
}

.user-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}

.role-tag {
    font-size: 0.68rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
}
.role-tag.admin { background: rgba(230, 0, 0, 0.25); color: #FCA5A5; }
.role-tag.staff { background: rgba(59, 130, 246, 0.25); color: #93C5FD; }

/* ---------- Main Area ---------- */
.panel-main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.panel-topbar {
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.panel-topbar h1 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.panel-content {
    padding: 28px;
    max-width: 1380px;
    width: 100%;
}

/* ---------- Cards & Stats ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--text);
    margin-top: 6px;
}

.stat-sub {
    font-size: 0.8rem;
    color: var(--vf-red);
    font-weight: 700;
    margin-top: 4px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    margin-bottom: 22px;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 1.08rem;
    font-weight: 800;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-red { background: var(--vf-red); color: #FFF; }
.btn-red:hover { background: var(--vf-red-dark); }
.btn-dark { background: #1F2937; color: #FFF; }
.btn-dark:hover { background: #111827; }
.btn-light { background: #F3F4F6; color: #374151; border-color: #D1D5DB; }
.btn-light:hover { background: #E5E7EB; }
.btn-danger { background: #FEE2E2; color: #B91C1C; }
.btn-danger:hover { background: #FECACA; }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }

/* ---------- Forms ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    border: 1.5px solid #D1D5DB;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    background: #FFF;
}

.form-control:focus {
    outline: none;
    border-color: var(--vf-red);
    box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
}

.perm-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 6px;
}

.perm-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FAFAFA;
    cursor: pointer;
}

.perm-item:hover { border-color: var(--vf-red); }
.perm-item strong { display: block; font-size: 0.85rem; }
.perm-item small { display: block; font-size: 0.75rem; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

th {
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
    background: #F9FAFB;
}

/* ---------- Badges & Alerts ---------- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
}
.badge-red   { background: #FEE2E2; color: #B91C1C; }
.badge-green { background: #D1FAE5; color: #065F46; }
.badge-blue  { background: #DBEAFE; color: #1E40AF; }
.badge-amber { background: #FEF3C7; color: #92400E; }
.badge-gray  { background: #E5E7EB; color: #374151; }

.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 0.9rem;
    font-weight: 600;
}
.alert-success { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-error   { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }

/* ---------- Login Page ---------- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #141418 0%, #3A0A0A 55%, #C80000 100%);
    padding: 20px;
}

.login-card {
    background: #FFF;
    width: 100%;
    max-width: 420px;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.login-brand {
    text-align: center;
    margin-bottom: 24px;
}

.login-brand .sidebar-logo {
    margin: 0 auto 12px;
    width: 56px;
    height: 56px;
    font-size: 1.6rem;
}

.login-brand h1 { font-size: 1.35rem; font-weight: 900; }
.login-brand p { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }

@media (max-width: 960px) {
    .panel-layout { flex-direction: column; }
    .panel-sidebar { width: 100%; height: auto; position: static; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid, .perm-grid { grid-template-columns: 1fr; }
}
