:root {
    --m-sidebar-width: 280px;
    --m-bg: #0a0a0c;
    --m-glass: rgba(255, 255, 255, 0.03);
    --m-glass-border: rgba(255, 255, 255, 0.08);
    --m-accent-cyan: #06b6d4;
    --m-accent-violet: #8b5cf6;
    --m-accent-pink: #ec4899;
    --m-text: #f8fafc;
    --m-text-muted: #94a3b8;
}

.m-hub-container {
    display: flex;
    background: var(--m-bg);
    min-height: 100vh;
    color: var(--m-text);
    font-family: 'Inter', sans-serif;
}

/* SIDEBAR */
.m-hub-sidebar {
    width: var(--m-sidebar-width);
    background: rgba(0, 0, 0, 0.3);
    border-right: 1px solid var(--m-glass-border);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 1001; /* Above mobile toggle */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.m-hub-sidebar.mobile-active {
    transform: translateX(0) !important;
}

.m-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
}

.m-sidebar-overlay.active {
    display: block;
}

.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--m-accent-violet);
    color: #fff;
    border: none;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    z-index: 999;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
}

.m-hub-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.m-hub-logo img {
    height: 32px;
}

.m-hub-logo span {
    font-weight: 900;
    letter-spacing: 2px;
    font-size: 1.2rem;
    background: linear-gradient(135deg, #fff, var(--m-accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.m-hub-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    overflow-y: auto;
    padding-right: 5px;
}

.m-hub-nav::-webkit-scrollbar { width: 4px; }
.m-hub-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.05); border-radius: 10px; }

.nav-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 18px;
    border-radius: 12px;
    color: var(--m-text-muted);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.nav-link i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.nav-link:hover {
    background: rgba(255,255,255,0.03);
    color: #fff;
}

.nav-link.active {
    background: rgba(6, 182, 212, 0.08);
    color: var(--m-accent-cyan);
    border-color: rgba(6, 182, 212, 0.2);
}

.nav-link.active i {
    opacity: 1;
    color: var(--m-accent-cyan);
}

.nav-category {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--m-text-muted);
    letter-spacing: 1.5px;
    margin: 25px 0 10px 18px;
    text-transform: uppercase;
    opacity: 0.5;
}

.nav-sub {
    margin-left: 45px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.nav-link-sub {
    display: block;
    padding: 8px 15px;
    color: var(--m-text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
}

.nav-link-sub:hover, .nav-link-sub.active {
    color: var(--m-accent-cyan);
}

.m-hub-user-puck {
    margin-top: auto;
    background: rgba(255, 255, 255, 0.02);
    padding: 12px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--m-glass-border);
    transition: 0.3s;
}

.m-hub-user-puck img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    object-fit: cover;
}

.puck-info {
    flex: 1;
    overflow: hidden;
}

.puck-name {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.puck-role {
    font-size: 0.7rem;
    color: var(--m-accent-cyan);
    font-weight: 800;
}

/* MAIN CONTENT */
.m-hub-main {
    flex: 1;
    margin-left: var(--m-sidebar-width);
    padding: 40px;
    max-width: 1600px;
}

.m-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
}

.m-hub-header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    letter-spacing: -1px;
}

.m-hub-header p {
    color: var(--m-text-muted);
    margin: 5px 0 0;
}

.m-hub-search {
    background: var(--m-glass);
    border: 1px solid var(--m-glass-border);
    border-radius: 14px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 300px;
}

.m-hub-search input {
    background: none;
    border: none;
    color: #fff;
    font-family: inherit;
    outline: none;
    width: 100%;
}

.dashboard-stats-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-hero-card {
    background: linear-gradient(135deg, var(--m-accent-violet), var(--m-accent-pink));
    padding: 30px;
    border-radius: 24px;
    color: white;
}

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

.mini-label {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--m-text-muted);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.mini-activity-list {
    display: grid;
    gap: 8px;
}

.mini-act {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #fff;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

/* STUDIO GRID (Series, Webtoons, Movies Management) */
.studio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    padding-bottom: 40px;
}

.studio-card {
    background: var(--m-glass);
    border: 1px solid var(--m-glass-border);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.studio-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 15px 35px rgba(139, 92, 246, 0.2);
}

.studio-card-img {
    width: 100%;
    aspect-ratio: 2/3;
    object-fit: cover;
    border-bottom: 1px solid var(--m-glass-border);
}

.studio-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
}

.studio-card-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.studio-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--m-text-muted);
    font-weight: 600;
}

.studio-card-progress {
    margin-top: 5px;
}

.studio-card-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: auto;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.8rem;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    text-align: center;
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: #fff;
}

.sparkline {
    width: 100%;
    height: 40px;
}

/* TABLES */
.m-hub-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.m-hub-table th {
    padding: 15px 20px;
    text-align: left;
    color: var(--m-text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.m-hub-table td {
    background: var(--m-glass);
    padding: 15px 20px;
    border-top: 1px solid var(--m-glass-border);
    border-bottom: 1px solid var(--m-glass-border);
}

.m-hub-table tr td:first-child {
    border-left: 1px solid var(--m-glass-border);
    border-radius: 14px 0 0 14px;
}

.m-hub-table tr td:last-child {
    border-right: 1px solid var(--m-glass-border);
    border-radius: 0 14px 14px 0;
}

.m-hub-table button {
    background: rgba(255,255,255,0.05);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 5px;
    transition: all 0.2s;
}

.m-hub-table button:hover {
    background: var(--m-accent-cyan);
    transform: scale(1.1);
}

/* DASHBOARD SECONDARY */
.dashboard-secondary {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.glass-panel {
    background: var(--m-glass);
    border: 1px solid var(--m-glass-border);
    border-radius: 24px;
    padding: 25px;
}

.glass-panel h3 {
    margin: 0 0 20px 0;
    font-size: 1.2rem;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.activity-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--m-text-muted);
    margin-top: 3px;
}

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

.action-buttons button {
    padding: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    text-align: left;
}

.action-buttons button i {
    margin-right: 10px;
    color: var(--m-accent-cyan);
}

/* NEW UI COMPONENTS */
.content-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    background: var(--m-glass);
    padding: 15px 25px;
    border-radius: 18px;
    border: 1px solid var(--m-glass-border);
}

.filter-pill {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--m-text-muted);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: 0.3s;
    margin-left: 8px;
}

.filter-pill.active {
    background: var(--m-accent-cyan);
    color: #fff;
    border-color: var(--m-accent-cyan);
}

.type-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}
.type-badge.drama { background: rgba(6, 182, 212, 0.15); color: var(--m-accent-cyan); }
.type-badge.movie { background: rgba(139, 92, 246, 0.15); color: var(--m-accent-violet); }
.type-badge.webtoon { background: rgba(236, 72, 153, 0.15); color: var(--m-accent-pink); }

.status-badge {
    font-size: 0.8rem;
    font-weight: 700;
}
.status-badge.Tamamlandı { color: #10b981; }
.status-badge.Devam { color: #f59e0b; }

.table-img img {
    width: 45px;
    height: 65px;
    border-radius: 8px;
    object-fit: cover;
}

.table-title {
    font-weight: 700;
    font-size: 1rem;
}

/* BUTTONS */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: 0.3s;
}
.btn-primary { background: linear-gradient(135deg, var(--m-accent-cyan), var(--m-accent-violet)); color: #fff; }
.btn-secondary { background: rgba(255,255,255,0.1); color: #fff; }

.cyan-btn { color: var(--m-accent-cyan) !important; }
.violet-btn { color: var(--m-accent-violet) !important; }
.red-btn { color: #ef4444 !important; }

/* MODALS */
.m-hub-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: #111;
    border: 1px solid var(--m-glass-border);
    border-radius: 30px;
    width: 100%;
    padding: 40px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.modal-header h2 { margin: 0; }

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: var(--m-text-muted); font-size: 0.9rem; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--m-glass-border);
    padding: 12px;
    border-radius: 12px;
    color: #fff;
    outline: none;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

/* PROGRESS */
.progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.progress-bar {
    height: 8px;
    background: var(--m-accent-cyan);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

/* SOCIAL MODERATION */
.posts-moderation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 25px;
}

.mod-post-card {
    padding: 25px;
    border-radius: 20px;
}

.mod-post-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.mod-post-user img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.mod-post-img {
    width: 100%;
    border-radius: 12px;
    margin: 15px 0;
}

.mod-post-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.mod-post-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    cursor: pointer;
}

.green-btn { background: rgba(16, 185, 129, 0.1); color: #10b981; }

/* USER MANAGER */
.role-pill {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
}
.role-pill.admin { background: #ef4444; color: #fff; }
.role-pill.user { background: rgba(255,255,255,0.1); color: #fff; }

.u-badge {
    background: rgba(139, 92, 246, 0.1);
    color: var(--m-accent-violet);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    margin: 2px;
    display: inline-block;
}

.table-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.table-user-cell img {
    width: 35px;
    height: 35px;
    border-radius: 10px;
}

/* SECURITY WATERMARK */
#security-watermark {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    grid-template-rows: repeat(6, 1fr);
    opacity: 0.03; /* Extremely subtle */
    user-select: none;
    overflow: hidden;
}

#security-watermark span {
    transform: rotate(-30deg);
    font-size: 14px;
    font-weight: 900;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

/* PREMIUM IDENTITY BADGES */
.m-identity-badge {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin-right: 15px;
    overflow: hidden;
}

.m-identity-badge.admin { color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.m-identity-badge.translator { color: #8b5cf6; border-color: rgba(139, 92, 246, 0.3); }
.m-identity-badge.moderator { color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }

.badge-ring {
    position: absolute;
    inset: 0;
    border-radius: 50px;
    box-shadow: inset 0 0 15px currentColor;
    opacity: 0.1;
}

/* ANNOUNCEMENT CARDS */
.anns-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.ann-card {
    padding: 20px;
    border-radius: 20px;
    position: relative;
}

.ann-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ann-type-icon {
    width: 35px;
    height: 35px;
    background: var(--m-accent-cyan);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
}

.ann-card h4 { margin: 0; flex: 1; }

.ann-card.warning .ann-type-icon { background: #f59e0b; }
.ann-card.info .ann-type-icon { background: #3b82f6; }

.ann-footer {
    margin-top: 15px;
    font-size: 0.75rem;
    color: var(--m-text-muted);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 10px;
}

.report-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.report-tabs button {
    background: transparent;
    border: none;
    color: var(--m-text-muted);
    font-weight: 700;
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.report-tabs button.active {
    color: #fff;
    border-bottom-color: var(--m-accent-violet);
}


/* ==================== SOFTWARE CENTER ==================== */
.dev-file-item {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.dev-file-item:hover {
    background: rgba(6, 182, 212, 0.1);
}
.dev-file-item:hover i.fa-trash {
    opacity: 0.5 !important;
}
.dev-file-item:hover i.fa-trash:hover {
    opacity: 1 !important;
}
.dev-file-item.active {
    background: rgba(6, 182, 212, 0.15);
    border-left: 3px solid #06b6d4;
    padding-left: 7px !important;
}

#dev-code-editor::-webkit-scrollbar {
    width: 8px;
}
#dev-code-editor::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.super-admin-only {
    border-right: 3px solid transparent;
}
.super-admin-only.active {
    border-right-color: #06b6d4 !important;
}

.shake-anim {
    animation: m-shake 0.5s ease-in-out;
}
@keyframes m-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
}

@media (max-width: 1024px) {
    .m-hub-sidebar {
        transform: translateX(-100%);
    }
    .m-hub-main {
        margin-left: 0;
        padding: 20px;
    }
    .mobile-sidebar-toggle {
        display: flex;
    }
    .m-hub-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .header-right {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .m-hub-search {
        width: 100%;
    }
}
