/* =====================================================================
   MediaCloud — custom styles
   Original theme: deep slate + violet/amber accents.
   ===================================================================== */

:root {
    --mc-primary: #6d28d9;
    --mc-primary-dark: #5b21b6;
    --mc-primary-light: #ede9fe;
    --mc-accent: #f59e0b;
    --mc-dark: #111827;
    --mc-dark-2: #1f2937;
    --mc-bg: #f4f5f9;
    --mc-text-muted: #6b7280;
    --mc-border: #e5e7eb;
    --mc-radius: 0.75rem;
    --mc-sidebar-width: 260px;
    --mc-topbar-height: 64px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--mc-bg);
    font-family: "Segoe UI", Roboto, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #1f2937;
}

a {
    color: var(--mc-primary);
}

.mc-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--mc-primary), var(--mc-accent));
    color: #fff;
    font-size: 1.1rem;
}

/* ---------------------------------------------------------------- *
 * Top navbar
 * ---------------------------------------------------------------- */
.mc-topbar {
    height: var(--mc-topbar-height);
    background: #fff;
    border-bottom: 1px solid var(--mc-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mc-brand {
    text-decoration: none;
    color: #111827;
}

.mc-sidebar-toggle {
    border: none;
    background: transparent;
    color: #374151;
}

.mc-user-btn {
    border: 1px solid var(--mc-border);
    background: #fff;
    border-radius: 999px;
    padding: 0.3rem 0.75rem;
}

.mc-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mc-primary-light);
    color: var(--mc-primary-dark);
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- *
 * App shell (sidebar + main)
 * ---------------------------------------------------------------- */
.mc-shell {
    display: flex;
    min-height: calc(100vh - var(--mc-topbar-height));
    position: relative;
}

.mc-sidebar {
    width: var(--mc-sidebar-width);
    flex-shrink: 0;
    background: var(--mc-dark);
    color: #d1d5db;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: var(--mc-topbar-height);
    height: calc(100vh - var(--mc-topbar-height));
    z-index: 1025;
}

.mc-sidebar-nav {
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.mc-nav .nav-link {
    color: #d1d5db;
    border-radius: 8px;
    padding: 0.55rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.925rem;
    margin-bottom: 2px;
}

.mc-nav .nav-link i {
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.mc-nav .nav-link:hover:not(.disabled) {
    background: var(--mc-dark-2);
    color: #fff;
}

.mc-nav .nav-link.active {
    background: var(--mc-primary);
    color: #fff;
}

.mc-nav .nav-link.disabled {
    color: #6b7280;
    cursor: not-allowed;
}

.mc-nav-section {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #6b7280;
    padding: 1rem 0.75rem 0.35rem;
}

.mc-badge-soon {
    background: var(--mc-dark-2);
    color: #9ca3af;
    font-weight: 500;
    font-size: 0.65rem;
}

.mc-sidebar-footer {
    padding: 1rem;
    border-top: 1px solid #374151;
}

.mc-storage-widget {
    color: #d1d5db;
    font-size: 0.8rem;
}

.mc-progress {
    height: 6px;
    background: #374151;
}

.mc-progress .progress-bar {
    background: linear-gradient(90deg, var(--mc-primary), var(--mc-accent));
}

.mc-main {
    flex: 1;
    min-width: 0;
}

.mc-footer {
    border-top: 1px solid var(--mc-border);
}

.mc-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.5);
    z-index: 1020;
}

/* ---------------------------------------------------------------- *
 * Dashboard cards
 * ---------------------------------------------------------------- */
.mc-stat-card {
    background: #fff;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
    padding: 1.25rem;
    height: 100%;
}

.mc-stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: #fff;
}

.mc-stat-value {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.mc-card {
    background: #fff;
    border: 1px solid var(--mc-border);
    border-radius: var(--mc-radius);
}

.mc-welcome-banner {
    background: linear-gradient(135deg, var(--mc-dark) 0%, #312e81 60%, var(--mc-primary) 100%);
    color: #fff;
    border-radius: var(--mc-radius);
    padding: 2rem;
}

/* ---------------------------------------------------------------- *
 * Auth pages (login / register / forgot / reset password)
 * ---------------------------------------------------------------- */
.mc-auth-body {
    background: var(--mc-dark);
    min-height: 100vh;
}

.mc-auth-wrap {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    overflow: hidden;
}

.mc-auth-decor {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(109, 40, 217, 0.55), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(245, 158, 11, 0.35), transparent 45%);
    pointer-events: none;
}

.mc-auth-card-outer {
    position: relative;
    width: 100%;
    max-width: 440px;
    z-index: 1;
}

.mc-auth-brand {
    color: #fff;
}

.mc-auth-card {
    border-radius: 1rem;
}

.mc-reset-link-box {
    word-break: break-all;
    background: #f9fafb;
    border: 1px dashed var(--mc-border);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------- *
 * Responsive behaviour
 * ---------------------------------------------------------------- */
@media (max-width: 991.98px) {
    .mc-sidebar {
        position: fixed;
        left: 0;
        top: var(--mc-topbar-height);
        height: calc(100vh - var(--mc-topbar-height));
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .mc-sidebar.mc-sidebar-open {
        transform: translateX(0);
    }

    .mc-overlay.mc-overlay-open {
        display: block;
    }
}

.btn-primary {
    background-color: var(--mc-primary);
    border-color: var(--mc-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--mc-primary-dark);
    border-color: var(--mc-primary-dark);
}

.form-control:focus {
    border-color: var(--mc-primary);
    box-shadow: 0 0 0 0.2rem rgba(109, 40, 217, 0.15);
}
