/* =========================================================
   THORIST ADMIN PANEL - FULL CLEAN CSS
   Eski sürüm çakışmalarını bitirmek için tek parça sürüm
========================================================= */

html, body {
    margin: 0;
    padding: 0;
}

body.admin-panel-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 28%),
        radial-gradient(circle at bottom right, rgba(8, 145, 178, 0.08), transparent 30%),
        #020617 !important;
    color: #e5e7eb !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

body.admin-panel-page *,
body.admin-panel-page *::before,
body.admin-panel-page *::after {
    box-sizing: border-box;
}

body.admin-panel-page a {
    text-decoration: none;
    color: inherit;
}

body.admin-panel-page h1,
body.admin-panel-page h2,
body.admin-panel-page h3,
body.admin-panel-page h4,
body.admin-panel-page h5,
body.admin-panel-page h6,
body.admin-panel-page p,
body.admin-panel-page span,
body.admin-panel-page strong,
body.admin-panel-page small,
body.admin-panel-page label,
body.admin-panel-page td,
body.admin-panel-page th,
body.admin-panel-page div {
    font-family: inherit;
}

/* =========================
   APP LAYOUT
========================= */

.admin-app {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 270px;
    flex: 0 0 270px;
    background: linear-gradient(180deg, #0f172a 0%, #0b1220 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.10);
    padding: 24px 18px;
}

.admin-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.admin-content {
    padding: 24px;
}

/* =========================
   SIDEBAR
========================= */

.admin-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 18px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
}

.admin-brand-logo {
    width: 54px;
    height: 54px;
    border-radius: 16px;
    background: linear-gradient(135deg, #2563eb, #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: .5px;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
    flex: 0 0 auto;
}

.admin-brand-text strong {
    display: block;
    margin: 0 0 4px;
    color: #ffffff !important;
    font-size: 22px;
    line-height: 1.15;
    font-weight: 700;
}

.admin-brand-text small {
    display: block;
    color: #94a3b8 !important;
    font-size: 13px;
    line-height: 1.3;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 14px;
    color: #cbd5e1 !important;
    font-size: 14px;
    font-weight: 600;
    transition: .2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(8, 145, 178, 0.10));
    color: #ffffff !important;
}

.admin-nav-icon {
    width: 18px;
    text-align: center;
    flex: 0 0 auto;
    opacity: .95;
}

/* =========================
   TOPBAR
========================= */

.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    background: rgba(15, 23, 42, 0.74);
    backdrop-filter: blur(12px);
}

.admin-topbar-left h1 {
    margin: 0 0 6px;
    color: #ffffff !important;
    font-size: 32px;
    line-height: 1.1;
    font-weight: 700;
}

.admin-topbar-left p {
    margin: 0;
    color: #94a3b8 !important;
    font-size: 14px;
    line-height: 1.4;
}

.admin-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(2, 6, 23, 0.40);
    color: #cbd5e1 !important;
    font-size: 13px;
    font-weight: 600;
}

.admin-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.14);
}

/* =========================
   BUTTONS
========================= */

.admin-btn {
    border: 0;
    outline: 0;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    transition: .2s ease;
}

.admin-btn:hover {
    transform: translateY(-1px);
}

.admin-btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: #ffffff !important;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #2563eb, #0891b2);
    color: #ffffff !important;
}

/* =========================
   CARD
========================= */

.admin-card {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(10, 15, 30, 0.96));
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    margin-bottom: 20px;
}

.admin-card:last-child {
    margin-bottom: 0;
}

.admin-mt-20 {
    margin-top: 20px;
}

/* =========================
   HERO
========================= */

.dashboard-hero {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(8, 145, 178, 0.08));
}

.dashboard-hero-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-badge {
    display: inline-block;
    margin: 0 0 12px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(59, 130, 246, 0.14);
    color: #bfdbfe !important;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.dashboard-title {
    margin: 0 0 10px;
    color: #ffffff !important;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
}

.dashboard-text {
    margin: 0;
    max-width: 760px;
    color: #94a3b8 !important;
    font-size: 15px;
    line-height: 1.7;
}

.dashboard-hero-side {
    flex: 0 0 auto;
}

.hero-mini-box {
    min-width: 180px;
    padding: 18px;
    border-radius: 18px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.10);
}

.hero-mini-box span {
    display: block;
    margin-bottom: 8px;
    color: #94a3b8 !important;
    font-size: 13px;
}

.hero-mini-box strong {
    color: #ffffff !important;
    font-size: 22px;
    font-weight: 700;
}

/* =========================
   STATS
========================= */

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card-modern .stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-card-modern .stat-top span {
    color: #94a3b8 !important;
    font-size: 14px;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.12);
    font-size: 18px;
}

.stat-card-modern strong {
    display: block;
    margin-bottom: 8px;
    color: #ffffff !important;
    font-size: 30px;
    line-height: 1.2;
    font-weight: 700;
}

.stat-card-modern small {
    color: #94a3b8 !important;
    font-size: 13px;
    line-height: 1.5;
}

.text-success {
    color: #10b981 !important;
}

.text-warning {
    color: #f59e0b !important;
}

/* =========================
   GRID / SUMMARY
========================= */

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.3fr .9fr;
    gap: 20px;
    margin-bottom: 20px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.section-head h2 {
    margin: 0;
    color: #ffffff !important;
    font-size: 22px;
    line-height: 1.2;
    font-weight: 700;
}

.section-desc {
    margin: 8px 0 0;
    color: #94a3b8 !important;
    font-size: 14px;
    line-height: 1.6;
}

.summary-list,
.quick-status {
    display: grid;
    gap: 14px;
}

.summary-item,
.quick-status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.08);
}

.summary-label {
    color: #94a3b8 !important;
    font-size: 14px;
}

.summary-value {
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    text-align: right;
}

.quick-status-item {
    justify-content: flex-start;
    color: #e5e7eb !important;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex: 0 0 auto;
}

.dot-success {
    background: #10b981;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.12);
}

.dot-warning {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.12);
}

/* =========================
   TABLE
========================= */

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    white-space: nowrap;
    font-size: 14px;
}

.table th {
    color: #cbd5e1 !important;
    font-weight: 700;
}

.table td {
    color: #e5e7eb !important;
}

.empty-state {
    padding: 28px 10px 10px;
    text-align: center;
}

.empty-icon {
    font-size: 30px;
    margin-bottom: 10px;
}

.muted {
    color: #94a3b8 !important;
}

/* =========================
   SETTINGS
========================= */

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.setting-box {
    background: rgba(2, 6, 23, 0.45);
    border: 1px solid rgba(148, 163, 184, 0.10);
    border-radius: 16px;
    padding: 18px;
}

.setting-box-highlight {
    background: linear-gradient(180deg, rgba(37, 99, 235, 0.10), rgba(15, 23, 42, 0.65));
    border: 1px solid rgba(59, 130, 246, 0.20);
}

.setting-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.setting-title {
    margin: 0 0 6px;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 700;
}

.setting-help {
    margin: 0;
    color: #94a3b8 !important;
    font-size: 14px;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

.form-actions .admin-btn,
.form-actions .btn {
    min-width: 220px;
}

/* form inputs scoped */
body.admin-panel-page .form-group {
    margin-bottom: 16px;
}

body.admin-panel-page .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #cbd5e1 !important;
    font-size: 14px;
    font-weight: 600;
}

body.admin-panel-page .form-group input,
body.admin-panel-page .form-group textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.16);
    background: #0b1220 !important;
    color: #ffffff !important;
    border-radius: 14px;
    padding: 12px 14px;
    outline: none;
    font-size: 14px;
    font-family: inherit;
    transition: .2s ease;
}

body.admin-panel-page .form-group input {
    min-height: 48px;
}

body.admin-panel-page .form-group textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.6;
}

body.admin-panel-page .form-group input:focus,
body.admin-panel-page .form-group textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.10);
}

.switch {
    position: relative;
    display: inline-flex;
    width: 64px;
    height: 36px;
    flex: 0 0 auto;
}

.switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: relative;
    width: 100%;
    height: 100%;
    background: #1e293b;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    cursor: pointer;
    transition: .25s ease;
}

.switch-slider::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #ffffff;
    transition: .25s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.switch input:checked + .switch-slider {
    background: linear-gradient(135deg, #2563eb, #0891b2);
}

.switch input:checked + .switch-slider::before {
    transform: translateX(28px);
}

/* =========================
   TOAST
========================= */

.admin-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 260px;
    max-width: 340px;
    padding: 14px 16px;
    border-radius: 14px;
    color: #ffffff !important;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.25);
    transform: translateY(-12px);
    opacity: 0;
    transition: .25s ease;
    z-index: 9999;
}

.admin-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.admin-toast-success {
    background: linear-gradient(135deg, #059669, #10b981);
}

.admin-toast-error {
    background: linear-gradient(135deg, #dc2626, #ef4444);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1200px) {
    .dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991px) {
    .admin-sidebar {
        width: 94px;
        flex-basis: 94px;
        padding: 16px 10px;
    }

    .admin-brand-text {
        display: none;
    }

    .admin-nav a {
        justify-content: center;
        padding: 12px 10px;
    }

    .admin-nav a span:last-child {
        display: none;
    }

    .admin-nav-icon {
        width: auto;
    }

    .admin-topbar {
        padding: 18px;
    }

    .admin-content {
        padding: 18px;
    }
}

@media (max-width: 768px) {
    .admin-app {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        flex-basis: auto;
        border-right: 0;
        border-bottom: 1px solid rgba(148, 163, 184, 0.10);
    }

    .admin-brand-text {
        display: block;
    }

    .admin-nav a {
        justify-content: flex-start;
    }

    .admin-nav a span:last-child {
        display: inline;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-topbar-right {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .dashboard-hero-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-title {
        font-size: 24px;
    }

    .dashboard-stats,
    .settings-grid {
        grid-template-columns: 1fr;
    }

    .setting-toggle-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .admin-btn,
    .form-actions .btn {
        width: 100%;
        min-width: 0;
    }
}