:root {
    --emc-black: #111111;
    --emc-dark: #1a1d21;
    --emc-red: #e50914;
    --emc-red-soft: #fff0f1;
    --emc-orange: #ff8a00;
    --emc-yellow: #ffc400;
    --emc-white: #ffffff;
    --emc-muted: #6b7280;
    --emc-border: #e6e8ef;
    --emc-bg: #f6f7fb;
    --emc-shadow: 0 18px 50px rgba(17, 17, 17, 0.08);
    --emc-radius: 22px;
}

* {
    scroll-behavior: smooth;
}

body {
    background:
        radial-gradient(circle at top left, rgba(229, 9, 20, 0.08), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(255, 138, 0, 0.10), transparent 30rem),
        var(--emc-bg);
    color: #171717;
    min-height: 100vh;
    font-feature-settings: "kern";
}

body,
.btn,
.form-control,
.form-select,
.dropdown-menu {
    font-size: 0.95rem;
}

::selection {
    background: rgba(229, 9, 20, .18);
    color: #111;
}

a {
    transition: color .18s ease, border-color .18s ease, background .18s ease, transform .18s ease;
}

.page-shell {
    min-height: calc(100vh - 170px);
    animation: pageIn .45s ease both;
}

@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.tap-feedback {
    transform: translateY(1px) scale(.99) !important;
}

/* Navbar */
.main-navbar {
    background: rgba(17, 17, 17, .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 10px 35px rgba(0,0,0,.12);
}

.nav-container {
    min-height: 70px;
}

.brand-lockup {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.brand-logo-frame {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    background: #070707;
    border: 1px solid rgba(255,255,255,.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(229, 9, 20, .22);
    flex-shrink: 0;
}

.brand-logo-img {
    width: 120%;
    height: 120%;
    object-fit: contain;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.brand-title {
    color: #fff;
    font-weight: 900;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.brand-subtitle {
    color: rgba(255,255,255,.54);
    font-size: .72rem;
    letter-spacing: .02em;
    margin-top: .18rem;
}

.nav-menu-group {
    gap: .15rem;
    margin-left: 1rem;
}

.nav-menu-group .nav-link {
    border-radius: 999px;
    padding: .48rem .78rem;
    color: rgba(255,255,255,.72);
    font-weight: 650;
}

.nav-menu-group .nav-link:hover,
.nav-menu-group .nav-link.active {
    color: #fff;
    background: rgba(255,255,255,.09);
}

.dropdown-menu-soft {
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: var(--emc-shadow);
    padding: .5rem;
}

.dropdown-menu-soft .dropdown-item {
    border-radius: 12px;
    font-weight: 600;
}

.navbar-user-area {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.navbar-identity {
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.1;
}

.navbar-username {
    color: #fff;
    font-weight: 750;
    font-size: .88rem;
}

.navbar-role {
    color: rgba(255,255,255,.55);
    font-size: .72rem;
    text-transform: capitalize;
}

.navbar-profile-link {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emc-red), var(--emc-orange));
    color: #fff;
    font-weight: 900;
    text-decoration: none;
    border: 2px solid rgba(255,255,255,.2);
    box-shadow: 0 10px 26px rgba(229, 9, 20, .24);
}

.navbar-profile-link:hover {
    color: #fff;
    transform: translateY(-2px);
    border-color: rgba(255,255,255,.45);
}

.navbar-avatar-img,
.table-avatar,
.avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.navbar-avatar-text {
    line-height: 1;
}

.btn {
    border-radius: 12px;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-brand,
.btn-primary {
    background: linear-gradient(135deg, var(--emc-red), #ff2a1f 55%, var(--emc-orange));
    border: 0;
    color: #fff;
    box-shadow: 0 12px 28px rgba(229, 9, 20, .22);
}

.btn-brand:hover,
.btn-primary:hover {
    color: #fff;
    box-shadow: 0 18px 38px rgba(229, 9, 20, .30);
}

.btn-light-ghost {
    border: 1px solid rgba(255,255,255,.24);
    color: #fff;
    background: rgba(255,255,255,.06);
}

.btn-light-ghost:hover {
    color: #111;
    background: #fff;
}

.btn-link-soft {
    color: var(--emc-red);
    text-decoration: none;
    font-weight: 750;
}

.btn-link-soft:hover,
.link-brand:hover {
    color: #b40008;
}

.link-brand {
    color: var(--emc-red);
    font-weight: 750;
}

/* Cards and surfaces */
.card,
.search-card,
.search-card-modern,
.hero-clean,
.drive-card,
.data-card,
.auth-card,
.stat-card,
.popular-card {
    border-radius: var(--emc-radius);
    border: 1px solid var(--emc-border);
    box-shadow: 0 10px 30px rgba(17, 17, 17, .05);
}

.card {
    overflow: hidden;
}

.card-header.bg-white {
    border-bottom: 1px solid var(--emc-border);
}

.form-control,
.form-select {
    min-height: 44px;
    border-radius: 12px;
    border-color: #dde1ea;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(229, 9, 20, .45);
    box-shadow: 0 0 0 .22rem rgba(229, 9, 20, .10);
}

.form-label {
    font-weight: 750;
    color: #282828;
}

.required-star {
    color: var(--emc-red);
    font-weight: 900;
}

/* Hero */
.hero-modern {
    position: relative;
    border-radius: 30px;
    padding: clamp(1.25rem, 3vw, 3rem);
    background:
        linear-gradient(135deg, rgba(17,17,17,.96), rgba(37,38,43,.92)),
        radial-gradient(circle at 20% 20%, rgba(229,9,20,.45), transparent 18rem);
    color: #fff;
    min-height: 300px;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(260px, .75fr);
    align-items: center;
    gap: 2rem;
    box-shadow: 0 24px 70px rgba(17,17,17,.18);
}

.hero-modern::before,
.hero-modern::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
}

.hero-modern::before {
    width: 420px;
    height: 420px;
    right: -170px;
    top: -180px;
    background: rgba(229,9,20,.28);
}

.hero-modern::after {
    width: 360px;
    height: 360px;
    right: 7%;
    bottom: -240px;
    background: rgba(255,138,0,.20);
}

.hero-content,
.hero-visual {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-block;
    font-size: .76rem;
    font-weight: 900;
    color: var(--emc-red);
    text-transform: uppercase;
    letter-spacing: .13em;
    margin-bottom: .65rem;
}

.hero-modern h1 {
    font-size: clamp(2rem, 5vw, 4.7rem);
    font-weight: 950;
    letter-spacing: -.06em;
    line-height: .96;
    max-width: 780px;
    margin-bottom: 1rem;
}

.hero-modern p {
    color: rgba(255,255,255,.72);
    max-width: 620px;
    font-size: clamp(.98rem, 1.4vw, 1.1rem);
}

.hero-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
    margin-top: 1.4rem;
}

.hero-visual {
    min-height: 250px;
    display: grid;
    place-items: center;
}

.hero-logo-orbit {
    width: min(330px, 76vw);
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,.08), rgba(255,255,255,.02));
    border: 1px solid rgba(255,255,255,.10);
    display: grid;
    place-items: center;
    animation: floatLogo 5s ease-in-out infinite;
}

.hero-logo-img {
    width: 95%;
    height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 24px 38px rgba(0,0,0,.32));
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-mini-card {
    position: absolute;
    background: rgba(255,255,255,.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,.16);
    backdrop-filter: blur(10px);
    border-radius: 999px;
    padding: .5rem .85rem;
    font-size: .82rem;
    font-weight: 800;
}

.hero-mini-card-top { top: 12%; left: 4%; }
.hero-mini-card-bottom { right: 4%; bottom: 14%; }

.hero-clean {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(10px);
    border: 1px solid var(--emc-border);
    padding: 2.4rem;
    box-shadow: var(--emc-shadow);
}

.hero-clean h1 {
    letter-spacing: -0.04em;
}

.search-card-modern {
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(12px);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem;
    flex-wrap: wrap;
}

.section-kicker {
    color: var(--emc-red);
    font-weight: 900;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: .74rem;
}

.section-head h2 {
    font-weight: 900;
    letter-spacing: -.04em;
    margin: .15rem 0 0;
}

.section-head p {
    color: var(--emc-muted);
    margin: .25rem 0 0;
}

.section-total,
.count-pill {
    background: #111;
    color: #fff;
    border-radius: 999px;
    padding: .34rem .72rem;
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
}

.folder-breadcrumb {
    background: transparent;
    font-size: .95rem;
}

.folder-breadcrumb a {
    color: var(--emc-red);
    text-decoration: none;
    font-weight: 750;
}

/* Drive cards */
.drive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.drive-card {
    min-height: 118px;
    background: rgba(255,255,255,.94);
    color: #212529;
    padding: 1.05rem;
    display: flex;
    align-items: center;
    gap: .95rem;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
    animation: cardIn .4s ease both;
    animation-delay: var(--delay, 0ms);
}

.drive-card::before {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 4px;
    background: linear-gradient(90deg, var(--emc-red), var(--emc-orange));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .22s ease;
}

.drive-card:hover {
    transform: translateY(-5px);
    border-color: rgba(229,9,20,.35);
    box-shadow: 0 20px 55px rgba(17,17,17,.12);
    color: #111;
}

.drive-card:hover::before {
    transform: scaleX(1);
}

@keyframes cardIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.drive-icon {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--emc-red-soft), #fff6e8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    flex-shrink: 0;
    box-shadow: inset 0 0 0 1px rgba(229,9,20,.08);
}

.drive-card-body {
    min-width: 0;
    flex: 1;
}

.drive-title {
    font-weight: 900;
    color: #171717;
    line-height: 1.2;
    word-break: break-word;
}

.drive-subtitle {
    color: var(--emc-muted);
    font-size: .86rem;
    margin-top: .25rem;
}

.drive-card .count-pill {
    position: absolute;
    top: .72rem;
    right: .72rem;
    background: rgba(17,17,17,.88);
}

.empty-icon {
    font-size: 2.1rem;
    margin-bottom: .5rem;
}

.data-card,
.empty-state {
    background: rgba(255,255,255,.92);
}

.table td,
.table th {
    vertical-align: middle;
}

.table thead th {
    font-size: .78rem;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: #444;
}

.chip-info,
.badge.text-bg-info {
    background: #111 !important;
    color: #fff !important;
    border-radius: 999px;
}

.hot-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emc-red), var(--emc-orange));
    box-shadow: 0 0 0 5px rgba(229,9,20,.12);
}

.popular-card {
    background: #fff;
    padding: 1rem;
    transition: transform .2s ease, box-shadow .2s ease;
}

.popular-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--emc-shadow);
}

/* Auth */
.auth-layout {
    max-width: 1040px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(320px, .95fr) minmax(360px, .85fr);
    align-items: stretch;
    gap: 1.25rem;
}

.auth-layout-wide {
    max-width: 1180px;
    grid-template-columns: minmax(320px, .85fr) minmax(520px, 1fr);
}

.auth-hero {
    min-height: 560px;
    border-radius: 30px;
    color: #fff;
    padding: 2.5rem;
    align-items: end;
    background:
        linear-gradient(135deg, rgba(17,17,17,.94), rgba(229,9,20,.72)),
        radial-gradient(circle at top left, rgba(255,138,0,.42), transparent 20rem);
    box-shadow: 0 24px 70px rgba(17,17,17,.14);
    overflow: hidden;
    position: relative;
}

.auth-hero::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -150px;
    top: -150px;
    border-radius: 50%;
    background: rgba(255,255,255,.09);
}

.auth-hero > div {
    position: relative;
    z-index: 1;
}

.auth-hero h1 {
    font-weight: 950;
    letter-spacing: -.06em;
    line-height: 1;
    font-size: clamp(2rem, 4vw, 3.8rem);
}

.auth-hero p {
    color: rgba(255,255,255,.75);
    max-width: 480px;
}

.auth-logo {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 20px 35px rgba(0,0,0,.35));
}

.auth-logo-mobile {
    width: 110px;
    height: 110px;
    object-fit: contain;
}

.auth-card {
    background: rgba(255,255,255,.94);
    align-self: center;
}

.auth-form .form-control {
    min-height: 46px;
}

/* Profile and dashboard existing components */
.avatar-circle {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--emc-red), var(--emc-orange));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 1.7rem;
    flex-shrink: 0;
}

.stat-card {
    background: rgba(255,255,255,.92);
    padding: 1rem;
    height: 100%;
}

.stat-label {
    color: var(--emc-muted);
    font-size: .82rem;
    font-weight: 800;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 950;
    color: #111;
}

.table-avatar {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    flex-shrink: 0;
}

.table-avatar-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--emc-red), var(--emc-orange));
    color: #fff;
    font-weight: 900;
}

/* Compact Creator Menu */
.creator-menu-card {
    max-width: 720px;
}

.creator-menu-form,
.creator-menu-row {
    display: grid;
    grid-template-columns: 130px minmax(180px, 1fr) 120px;
    gap: .75rem;
    align-items: center;
}

.creator-menu-row {
    grid-template-columns: 1fr 100px;
}

.creator-input,
.creator-button {
    min-height: 34px;
}

.reject-note-form {
    min-width: 190px;
}

.site-footer {
    background: rgba(255,255,255,.60);
    backdrop-filter: blur(8px);
}

.footer-accent {
    color: var(--emc-red);
    font-weight: 850;
}

/* Responsive */
@media (min-width: 1600px) {
    .container-xxl {
        max-width: 1480px;
    }

    .drive-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 1199px) {
    .hero-modern {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        min-height: 180px;
    }

    .hero-logo-orbit {
        width: min(240px, 62vw);
    }
}

@media (max-width: 991px) {
    .nav-menu-group {
        margin-left: 0;
        margin-top: .75rem;
        align-items: stretch !important;
    }

    .nav-menu-group .nav-link {
        border-radius: 12px;
        padding: .72rem .85rem;
    }

    .navbar-user-area {
        padding-top: .75rem;
        border-top: 1px solid rgba(255,255,255,.10);
        align-items: center;
    }

    .auth-layout,
    .auth-layout-wide {
        display: block;
        max-width: 680px;
    }
}

@media (max-width: 768px) {
    .brand-subtitle {
        display: none;
    }

    .hero-modern {
        min-height: auto;
        padding: 1.45rem;
        border-radius: 24px;
    }

    .hero-modern h1 {
        font-size: 2.35rem;
    }

    .hero-mini-card {
        display: none;
    }

    .drive-grid {
        grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    }

    .creator-menu-form,
    .creator-menu-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    body,
    .btn,
    .form-control,
    .form-select {
        font-size: .92rem;
    }

    .brand-logo-frame {
        width: 40px;
        height: 40px;
        border-radius: 13px;
    }

    .brand-title {
        font-size: 1rem;
    }

    .drive-grid {
        grid-template-columns: 1fr;
    }

    .drive-card {
        min-height: 102px;
    }

    .section-head {
        align-items: start;
    }

    .auth-card .card-body {
        padding: 1.35rem !important;
    }

    .table-responsive {
        border-radius: 14px;
    }
}

/* Modern compact filter dropdowns */
.filter-panel {
    overflow: visible;
}

.filter-form-modern {
    position: relative;
    z-index: 10;
}

.custom-filter-dropdown {
    width: 100%;
    position: relative;
}

.filter-select-btn {
    min-height: 48px;
    border-radius: 16px;
    border: 1px solid rgba(17, 17, 17, .10);
    background: #fff;
    color: #151515;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .6rem;
    padding: .58rem .82rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .035);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background .18s ease;
    text-align: left;
}

.filter-select-btn:hover,
.filter-select-btn:focus {
    border-color: rgba(230, 32, 32, .40);
    box-shadow: 0 0 0 .22rem rgba(230, 32, 32, .08), 0 12px 28px rgba(15, 23, 42, .055);
    background: #fffafa;
}

.filter-select-btn:active {
    transform: translateY(1px);
}

.filter-select-label {
    display: none;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #a43a1c;
    font-weight: 800;
}

.filter-select-current {
    display: block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
    font-size: .92rem;
}

.filter-dropdown-menu {
    width: 100%;
    min-width: 100%;
    max-width: min(100%, 360px);
    max-height: 260px;
    overflow-y: auto;
    border: 1px solid rgba(17, 17, 17, .10);
    border-radius: 18px;
    padding: .45rem;
    box-shadow: 0 24px 55px rgba(0, 0, 0, .18);
    animation: dropdownFade .16s ease both;
}

.filter-dropdown-menu .dropdown-item {
    border-radius: 12px;
    padding: .68rem .82rem;
    font-weight: 650;
    color: #1f2937;
    white-space: normal;
    line-height: 1.25;
}

.filter-dropdown-menu .dropdown-item:hover {
    background: rgba(255, 95, 31, .10);
    color: #111;
}

.filter-dropdown-menu .dropdown-item.active,
.filter-dropdown-menu .dropdown-item:active {
    background: linear-gradient(135deg, #e62020, #ff6a00);
    color: #fff;
}

.filter-search-input,
.filter-submit-btn {
    min-height: 48px;
    border-radius: 16px;
}

@keyframes dropdownFade {
    from {
        opacity: 0;
        transform: translateY(-6px) scale(.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 576px) {
    .search-card-modern .card-body {
        padding: .95rem;
    }

    .filter-select-btn {
        min-height: 46px;
        border-radius: 15px;
        padding: .52rem .78rem;
    }

    .filter-select-current {
        font-size: .9rem;
    }

    .filter-dropdown-menu {
        max-height: 220px;
        border-radius: 16px;
    }

    .filter-dropdown-menu .dropdown-item {
        padding: .64rem .72rem;
        font-size: .92rem;
    }
}
