/* ==========================================================================
   KRİMP TEKNİK - YÖNETİM PANELDİ TEMİZ & SADE TASARIM (CLEAN UI)
   ========================================================================== */

:root {
    --admin-bg: #f8fafc;
    --admin-card-bg: #ffffff;
    --admin-sidebar-bg: #0f172a;
    --admin-sidebar-text: #94a3b8;
    --admin-primary: #2563eb;
    --admin-primary-hover: #1d4ed8;
    --admin-accent: #f97316;
    --admin-text-main: #0f172a;
    --admin-text-muted: #64748b;
    --admin-border: #e2e8f0;
    --admin-success: #10b981;
    --admin-danger: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--admin-bg);
    color: var(--admin-text-main);
    display: flex;
    min-height: 100vh;
    line-height: 1.5;
    animation: smoothPageFadeIn 0.4s ease-out forwards;
}

@keyframes smoothPageFadeIn {
    0% { opacity: 0; transform: translateY(4px); }
    100% { opacity: 1; transform: translateY(0); }
}

a, button, input, select, textarea, .btn-action, .btn-add, .card-box, .admin-sidebar a {
    transition: background-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                border-color 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

/* SIDEBAR */
.admin-sidebar {
    width: 260px;
    background-color: var(--admin-sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    top: 0;
    left: 0;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.05);
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.sidebar-header h2 span {
    color: var(--admin-accent);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex-grow: 1;
    overflow-y: auto;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
    color: var(--admin-sidebar-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: var(--admin-accent);
}

.sidebar-menu li a.active {
    font-weight: 700;
}

.badge-count {
    background-color: var(--admin-primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 10px;
    text-align: center;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--admin-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-logout:hover {
    background-color: var(--admin-danger);
    color: white;
}

/* MAIN AREA */
.admin-main {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-topbar {
    height: 70px;
    background-color: var(--admin-card-bg);
    border-bottom: 1px solid var(--admin-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-title h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--admin-text-main);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.site-link {
    color: var(--admin-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    background: #eff6ff;
    padding: 6px 14px;
    border-radius: 20px;
}

.user-info {
    font-size: 14px;
    font-weight: 600;
    color: var(--admin-text-main);
}

.admin-content {
    padding: 35px;
    flex-grow: 1;
}

/* CARDS & PANELS */
.card-box {
    background-color: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--admin-border);
}

.card-header-flex h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--admin-text-main);
}

/* QUICK ACTION CARDS GRID */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.quick-card {
    background-color: var(--admin-card-bg);
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    color: var(--admin-text-main);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s ease;
}

.quick-card:hover {
    border-color: var(--admin-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08);
}

.quick-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background-color: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.quick-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 2px;
}

.quick-desc {
    font-size: 12px;
    color: var(--admin-text-muted);
}

/* FORMS */
.admin-form .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group-admin {
    margin-bottom: 20px;
}

.form-group-admin label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--admin-text-main);
    margin-bottom: 8px;
}

.form-control-admin {
    width: 100%;
    padding: 11px 14px;
    background-color: #ffffff;
    border: 1px solid var(--admin-border);
    border-radius: 8px;
    color: var(--admin-text-main);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-admin:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* BUTTONS */
.btn-add {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--admin-primary);
    color: white;
    padding: 10px 22px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-add:hover {
    background-color: var(--admin-primary-hover);
}

.btn-action {
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
}

.btn-edit {
    background-color: #eff6ff;
    color: var(--admin-primary);
}

.btn-delete {
    background-color: #fef2f2;
    color: var(--admin-danger);
}

/* TABLES */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--admin-border);
    font-size: 14px;
}

.admin-table th {
    background-color: #f8fafc;
    color: var(--admin-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.status-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background-color: #ecfdf5;
    color: var(--admin-success);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* RESPONSIVE MEDIA QUERIES FOR ADMIN PANEL */
@media (max-width: 992px) {
    body {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-menu {
        display: flex;
        flex-wrap: wrap;
        padding: 10px 0;
    }
    
    .sidebar-menu li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 10px 16px;
    }
    
    .sidebar-menu li a:hover,
    .sidebar-menu li a.active {
        border-left-color: transparent;
        border-bottom-color: var(--admin-accent);
    }
    
    .admin-main {
        margin-left: 0;
    }

    .admin-topbar {
        padding: 0 20px;
        height: auto;
        min-height: 60px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .admin-content {
        padding: 20px 16px;
    }

    .card-box {
        padding: 18px 14px;
    }

    .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .sidebar-header h2 { font-size: 18px; }
    .topbar-title h1 { font-size: 17px; }
    .topbar-right { gap: 10px; }
    .site-link { font-size: 11px; padding: 4px 10px; }
    .user-info { font-size: 12px; }
}
