/* ===== PANEL LAYOUT ===== */
body.panel-body {
    display: flex;
    min-height: 100vh;
    background-color: #f0f2f5;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1e2d40 0%, #162236 100%);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
    padding: 22px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    letter-spacing: 0.3px;
    text-decoration: none;
}

.sidebar-brand i {
    font-size: 24px;
    color: #4f8ef7;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
    overflow-y: auto;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-section-title {
    padding: 10px 24px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 255, 255, 0.28);
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 24px;
    color: rgba(255, 255, 255, 0.58);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav li a:hover {
    color: rgba(255, 255, 255, 0.90);
    background: rgba(255, 255, 255, 0.06);
    border-left-color: rgba(255, 255, 255, 0.15);
}

.sidebar-nav li a.active {
    color: #ffffff;
    background: rgba(79, 142, 247, 0.18);
    border-left-color: #4f8ef7;
    font-weight: 500;
}

.sidebar-nav li a i {
    font-size: 17px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

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

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.42);
    font-size: 13px;
    cursor: pointer;
    padding: 6px 0;
    transition: color 0.15s;
    text-decoration: none;
    width: 100%;
}

.btn-logout:hover {
    color: rgba(255, 255, 255, 0.85);
}

.btn-logout i {
    font-size: 16px;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #ffffff;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #e5e9f0;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.topbar-title {
    font-size: 17px;
    font-weight: 600;
    color: #1e2d40;
    margin: 0;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6c757d;
    font-size: 14px;
}

.topbar-user i {
    font-size: 22px;
    color: #4f8ef7;
}

.content-area {
    padding: 28px 32px;
    flex: 1;
}

/* ===== SEARCH BOX ===== */
.search-wrapper {
    position: relative;
}

.search-wrapper i.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #adb5bd;
    font-size: 15px;
    pointer-events: none;
    z-index: 2;
}

.search-wrapper .form-control {
    padding-left: 38px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    font-size: 14px;
    transition: all 0.2s;
    height: 40px;
}

.search-wrapper .form-control:focus {
    background: #fff;
    border-color: #4f8ef7;
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.12);
}

/* ===== CARDS & TABLE ===== */
.card {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07) !important;
}

.table {
    margin: 0;
    font-size: 14px;
}

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef !important;
    color: #6c757d;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 12px 16px;
    white-space: nowrap;
}

.table thead th:first-child { border-radius: 12px 0 0 0; }
.table thead th:last-child  { border-radius: 0 12px 0 0; }

.table tbody td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5 !important;
    color: #343a40;
}

.table tbody tr:last-child td { border-bottom: none !important; }
.table tbody tr:hover td { background: #fafbfc; }

/* ===== CUSTOMER AVATAR ===== */
.customer-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f8ef7, #7c3aed);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
    flex-shrink: 0;
    user-select: none;
}

/* ===== LOGIN PAGE ===== */
body.login-bg {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e2d40 0%, #2c4a6e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    padding: 44px 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo i {
    font-size: 46px;
    color: #4f8ef7;
}

.login-logo h4 {
    margin-top: 12px;
    font-weight: 700;
    color: #1e2d40;
    font-size: 20px;
}

.login-logo p {
    color: #9ca3af;
    font-size: 13px;
    margin: 4px 0 0;
}

.login-card .form-label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.login-card .input-group-text {
    background: #f8f9fa;
    border-right: none;
    border-radius: 8px 0 0 8px;
}

.login-card .form-control {
    border-left: none;
    border-radius: 0 8px 8px 0;
    padding: 10px 14px;
    font-size: 14px;
}

.login-card .form-control:focus {
    border-color: #4f8ef7;
    box-shadow: 0 0 0 3px rgba(79, 142, 247, 0.15);
    border-left: none;
}

.login-card .input-group:focus-within .input-group-text {
    border-color: #4f8ef7;
}

.btn-login {
    background: linear-gradient(135deg, #4f8ef7, #2563eb);
    border: none;
    border-radius: 8px;
    padding: 11px;
    font-size: 15px;
    font-weight: 600;
    width: 100%;
    color: white;
    cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
    margin-top: 4px;
}

.btn-login:hover {
    opacity: 0.92;
    color: white;
}

.btn-login:active {
    transform: scale(0.99);
}

/* ===== MACERA OYUNLARI — EDİTÖR ===== */
.macera-editor {
    display: flex;
    min-height: calc(100vh - 150px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .07);
    overflow: hidden;
}

.macera-sol {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #e9ecef;
    background: #f8f9fa;
    padding: 18px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.macera-sol-baslik {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(0, 0, 0, .35);
    padding: 0 4px;
}

.macera-sag {
    flex: 1;
    padding: 28px 32px;
    overflow-y: auto;
}

.macera-bos-durum {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    text-align: center;
}

.macera-bos-liste {
    font-size: 12px;
    color: #adb5bd;
    text-align: center;
    padding: 20px 0;
}

/* Sayfa Listesi */
.macera-sayfa-listesi {
    flex: 1;
    overflow-y: auto;
}

.macera-sayfa-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 3px;
    transition: background .15s;
    user-select: none;
}

.macera-sayfa-item:hover { background: #e9ecef; }

.macera-sayfa-item.aktif {
    background: rgba(79, 142, 247, .12);
    color: #2563eb;
}

.macera-sayfa-item.bitis .macera-sayfa-item-no {
    background: #f59e0b;
    color: #fff;
}

.macera-sayfa-item-no {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #dee2e6;
    color: #495057;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.macera-sayfa-item.aktif .macera-sayfa-item-no {
    background: #4f8ef7;
    color: #fff;
}

.macera-sayfa-item-metin {
    font-size: 12px;
    color: #6c757d;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.macera-sayfa-item.aktif .macera-sayfa-item-metin { color: #2563eb; }

/* Editor İçi */
.macera-editor-ust {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 18px;
    margin-bottom: 4px;
}

.macera-sayfa-no-input {
    width: 76px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    color: #1e2d40;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 5px 8px;
    transition: border-color .2s;
}

.macera-sayfa-no-input:focus {
    outline: none;
    border-color: #4f8ef7;
    box-shadow: 0 0 0 3px rgba(79, 142, 247, .12);
}

.macera-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #9ca3af;
}

/* Medya Kartları */
.macera-medya-kart {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 14px;
    background: #fafafa;
}

.macera-medya-baslik {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #9ca3af;
    margin-bottom: 10px;
}

.macera-upload-alani {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 18px 12px;
    cursor: pointer;
    text-align: center;
    color: #adb5bd;
    font-size: 13px;
    transition: border-color .2s, background .2s;
}

.macera-upload-alani:hover {
    border-color: #4f8ef7;
    background: rgba(79, 142, 247, .04);
    color: #4f8ef7;
}

.macera-resim-wrap {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 8px;
}

.macera-resim-wrap img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.macera-resim-sil-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background .15s;
}

.macera-resim-sil-btn:hover { background: rgba(220, 53, 69, .85); }

/* Metin Alanı */
.macera-metin {
    font-size: 14px;
    line-height: 1.65;
    border-radius: 8px;
    resize: vertical;
}

/* Seçenekler */
.macera-secenekler {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.macera-secenek-satir {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 8px 10px;
}

.macera-sec-no {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4f8ef7;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.macera-ok {
    color: #adb5bd;
    font-size: 14px;
    flex-shrink: 0;
}

.macera-hedef {
    width: 72px;
    flex-shrink: 0;
    text-align: center;
}

/* Toast bildirimi */
.macera-toast {
    position: fixed;
    bottom: 28px;
    right: 28px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    z-index: 9999;
    opacity: 0;
    transform: translateY(10px);
    transition: all .25s ease;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .2);
    pointer-events: none;
}

.macera-toast.goster { opacity: 1; transform: translateY(0); }
.macera-toast.macera-toast-success { background: #16a34a; }
.macera-toast.macera-toast-error   { background: #dc2626; }

/* ===== FOTOĞRAF GALERİSİ — PANEL ===== */
.galeri-editor {
    display: flex;
    min-height: calc(100vh - 150px);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
    overflow: hidden;
}

.galeri-sol {
    width: 240px;
    flex-shrink: 0;
    border-right: 1px solid #e9ecef;
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
}

.galeri-sol-ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 14px 12px;
    border-bottom: 1px solid #e9ecef;
}

.galeri-liste {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.galeri-liste-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 2px;
    transition: background .15s;
    user-select: none;
}

.galeri-liste-item:hover  { background: #e9ecef; }
.galeri-liste-item.aktif  { background: rgba(79,142,247,.12); }

.galeri-liste-ikon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    font-size: 17px;
    flex-shrink: 0;
}

.galeri-liste-item.aktif .galeri-liste-ikon {
    background: rgba(79,142,247,.2);
    color: #4f8ef7;
}

.galeri-liste-ad {
    font-size: 13px;
    font-weight: 500;
    color: #343a40;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.galeri-liste-item.aktif .galeri-liste-ad { color: #2563eb; }

.galeri-liste-alt {
    font-size: 11px;
    color: #adb5bd;
}

.galeri-sag {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.galeri-bos {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.galeri-detay-ust {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 12px;
    flex-shrink: 0;
}

.galeri-yukle-alani {
    margin: 16px 24px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 2px dashed #dee2e6;
    border-radius: 10px;
    padding: 22px 12px;
    cursor: pointer;
    text-align: center;
    color: #adb5bd;
    font-size: 14px;
    transition: border-color .2s, background .2s;
    flex-shrink: 0;
}

.galeri-yukle-alani:hover,
.galeri-yukle-alani.dragover {
    border-color: #4f8ef7;
    background: rgba(79,142,247,.04);
    color: #4f8ef7;
}

.galeri-resim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    padding: 0 24px 24px;
    overflow-y: auto;
    flex: 1;
}

.galeri-resim-kart {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    background: #f0f2f5;
    aspect-ratio: 1;
    cursor: zoom-in;
}

.galeri-resim-kart img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .25s;
}

.galeri-resim-kart:hover img { transform: scale(1.05); }

.galeri-resim-cozunurluk {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 4px;
    pointer-events: none;
}

.galeri-resim-sil {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,.45);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    opacity: 0;
    transition: opacity .15s, background .15s;
    z-index: 2;
}

.galeri-resim-kart:hover .galeri-resim-sil { opacity: 1; }
.galeri-resim-sil:hover { background: rgba(220,53,69,.85); }
