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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #3b0764, #020617 50%, #000000 100%);
    color: #e5e7eb;
    min-height: 100vh;
}

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

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 220px;
    background: linear-gradient(to bottom, #020617, #020617 60%, #111827);
    border-right: 1px solid rgba(148, 27, 210, 0.7);
    box-shadow: 0 0 25px rgba(148, 27, 210, 0.6);
    padding: 16px 12px;
    position: relative;
    z-index: 2;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(148, 27, 210, 0.4);
}

.logo-text {
    font-size: 26px;
    font-weight: 800;
    color: #f97316;
    text-shadow: 0 0 12px rgba(248, 113, 113, 0.9);
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 14px;
}

.nav-item {
    padding: 8px 10px;
    border-radius: 8px;
    background: transparent;
    color: #e5e7eb;
    transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}

.nav-item:hover {
    background: radial-gradient(circle, rgba(148, 27, 210, 0.9), transparent);
    transform: translateX(2px);
    box-shadow: 0 0 18px rgba(129, 140, 248, 0.6);
}

.nav-item.disabled {
    opacity: 0.5;
    cursor: default;
}

.nav-section-title {
    margin-top: 16px;
    margin-bottom: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
}

/* Main */

.main-content {
    flex: 1;
    padding: 16px 20px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(90deg, #22c55e, #65a30d);
    padding: 8px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

.topbar-greet {
    font-weight: 600;
}

.badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.09em;
}

.badge-green {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.7);
}

/* Content */

.page-content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* Panels */

.panel {
    border-radius: 18px;
    background: radial-gradient(circle at top left, rgba(79, 70, 229, 0.85), rgba(15, 23, 42, 0.97));
    border: 1px solid rgba(129, 140, 248, 0.7);
    box-shadow:
        0 0 14px rgba(129, 140, 248, 0.5),
        0 0 30px rgba(15, 23, 42, 0.9);
    padding: 14px 16px;
}

.panel-title {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
}

.panel-body {
    font-size: 14px;
    color: #e5e7eb;
}

/* Stats */

.stat-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stat-card {
    border-radius: 18px;
    padding: 12px 14px;
    background: radial-gradient(circle at top, rgba(15, 23, 42, 1), rgba(2, 6, 23, 1));
    border: 1px solid rgba(96, 165, 250, 0.9);
    box-shadow:
        0 0 18px rgba(56, 189, 248, 0.7),
        0 0 35px rgba(15, 23, 42, 1);
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    color: #9ca3af;
    letter-spacing: 0.08em;
}

.stat-main {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
}

.stat-sub {
    margin-top: 2px;
    font-size: 12px;
    color: #a5b4fc;
}

/* Grid rows */

.grid-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    gap: 14px;
}

.panel-full {
    width: 100%;
}

/* Tables */

.ann-table,
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.ann-table th,
.ann-table td,
.user-table th,
.user-table td {
    padding: 6px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.ann-table th,
.user-table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #9ca3af;
}

/* Forms & buttons */

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

.form-label {
    font-size: 13px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-input {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.6);
    padding: 6px 8px;
    color: #e5e7eb;
    font-size: 13px;
}

.form-input:focus {
    outline: none;
    border-color: rgba(59, 130, 246, 0.9);
    box-shadow: 0 0 14px rgba(59, 130, 246, 0.7);
}

.form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.btn-primary {
    border: none;
    padding: 7px 16px;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #ec4899);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow:
        0 0 12px rgba(129, 140, 248, 0.9),
        0 0 18px rgba(244, 114, 182, 0.8);
    transition: transform 0.05s ease, box-shadow 0.1s ease;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow:
        0 0 16px rgba(129, 140, 248, 1),
        0 0 24px rgba(244, 114, 182, 1);
}

.btn-small {
    border: none;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.8);
    color: white;
    font-size: 11px;
    cursor: pointer;
    margin-right: 4px;
}

.btn-danger {
    background: rgba(220, 38, 38, 0.9);
}

/* Alerts */

.alert-success,
.alert-error {
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 8px;
}

.alert-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.9);
}

.alert-error {
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(220, 38, 38, 0.9);
}

/* Auth page */

.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.auth-container {
    max-width: 420px;
    width: 100%;
    padding: 20px;
}

.auth-card {
    border-radius: 22px;
    padding: 24px 22px 26px;
    background: radial-gradient(circle at top, rgba(79, 70, 229, 0.95), rgba(15, 23, 42, 1));
    box-shadow:
        0 0 22px rgba(129, 140, 248, 0.9),
        0 0 40px rgba(15, 23, 42, 1);
    border: 1px solid rgba(129, 140, 248, 0.8);
}

.auth-logo {
    font-size: 32px;
    font-weight: 800;
    color: #f97316;
    text-shadow: 0 0 16px rgba(248, 113, 113, 1);
    text-align: center;
    margin-bottom: 8px;
}

.auth-title {
    text-align: center;
    margin-bottom: 14px;
    font-size: 20px;
}

.auth-label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    margin-bottom: 8px;
}

.auth-input {
    background: rgba(15, 23, 42, 1);
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 8px 10px;
    color: #e5e7eb;
}

.auth-input:focus {
    outline: none;
    border-color: rgba(129, 140, 248, 1);
    box-shadow: 0 0 16px rgba(129, 140, 248, 0.9);
}

.auth-btn {
    width: 100%;
    margin-top: 8px;
}

.auth-error {
    background: rgba(248, 113, 113, 0.15);
    border: 1px solid rgba(248, 113, 113, 0.9);
    color: #fee2e2;
    border-radius: 12px;
    padding: 6px 10px;
    margin-bottom: 10px;
    font-size: 13px;
}

.auth-footer {
    margin-top: 10px;
    font-size: 12px;
    color: #e5e7eb;
    text-align: center;
}

/* Responsive */

/* ------------------------------------------------------------
   Modern & Clean Accordion Sidebar (Kutucuksuz)
------------------------------------------------------------- */

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

/* Her kategori grubu */
.nav-group {
    padding: 0;
    border: none;
    background: transparent;
}

/* Kategori başlıkları */
.nav-group summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 6px;
    color: #dbe4ff;
    border-radius: 4px;
    list-style: none;
    transition: 0.15s ease;
}

.nav-group summary:hover {
    background: rgba(255,255,255,0.06);
}

/* Açık kategori */
.nav-group[open] summary {
    background: rgba(255,255,255,0.08);
}

/* Alt linkler */
.nav-sublink {
    display: block;
    padding: 6px 20px;
    margin: 2px 0;
    font-size: 13px;
    color: #cbd3f5;
    transition: 0.15s ease;
}

.nav-sublink:hover {
    background: rgba(255,255,255,0.08);
    border-radius: 4px;
    color: white;
}
/* Logo Yazısı */
.sidebar-logo-title {
    font-size: 22px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: #f97316;
    text-shadow: 0 0 10px rgba(249,115,22,0.6);
}

/* Ana Sayfa & Telegram Butonu */
.top-button {
    display: block;
    padding: 8px 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    text-align: center;
    margin-bottom: 6px;
    transition: 0.2s;
    font-weight: 600;
    color: #e5e7eb;
}

.top-button:hover {
    background: rgba(255,255,255,0.12);
}

/* Ayırıcı çizgi */
.sidebar-separator {
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 12px 0;
}

/* Kategoriler */
.nav-group summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 4px;
    color: #dbe4ff;
    transition: 0.2s;
    border-radius: 4px;
}

.nav-group summary:hover {
    background: rgba(255,255,255,0.06);
}

.nav-group[open] summary {
    background: rgba(255,255,255,0.08);
}

/* Alt linkler */
.nav-sublink {
    padding: 6px 20px;
    font-size: 13px;
    display: block;
    color: #cbd3f5;
    transition: 0.2s;
}

.nav-sublink:hover {
    background: rgba(255,255,255,0.10);
    border-radius: 4px;
    color: white;
}
/* ------------------------------------
    MOBİL MENU DÜZELTME (KESİN ÇALIŞIR)
------------------------------------- */

@media(max-width:960px) {

    /* Menü butonu aktif olacak */
    .menu-toggle-btn {
        display: inline-block;
        font-size: 28px;
        padding: 6px 10px;
        border-radius: 6px;
        border: 1px solid rgba(255,255,255,0.5);
        background: rgba(255,255,255,0.08);
        color: white;
        cursor: pointer;
    }

    /* Sidebar masaüstündeki gibi sabit durmasın, mobilde kaydırılabilir olsun */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 260px;
        height: 100vh;
        background: #020617;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 9999;
        padding-top: 20px;
        overflow-y: auto;
        border-right: 1px solid rgba(148, 27, 210, 0.4);
    }

    /* Tıklanınca açılacak */
    .sidebar.sidebar-open {
        transform: translateX(0);
    }

    /* İçerik sol boşluk almasın */
    .main-content {
        padding-left: 0 !important;
    }
}