/* =========================================================
   GLOBAL
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: #f6f8fc;
    color: #10213b;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    min-height: 100vh;
    background: linear-gradient(
        135deg,
        #06182d,
        #0d2c50
    );

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 20px;
}

.login-shell {
    width: min(1080px, 94vw);
    min-height: 650px;

    display: grid;
    grid-template-columns: 1fr 1fr;

    background: #fff;

    border-radius: 24px;
    overflow: hidden;

    box-shadow: 0 25px 70px #0005;
}

.brand-panel {
    padding: 70px 55px;

    color: #fff;

    display: flex;
    flex-direction: column;
    justify-content: center;

    background:
        radial-gradient(
            circle at 80% 25%,
            #1c69c9 0,
            #0b2a4d 35%,
            #06182d 80%
        );
}

.logo,
.side-logo {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -2px;
}

.logo span,
.side-logo span {
    color: #1680ff;
}

.brand-panel h1 {
    font-size: 42px;
    margin: 22px 0 8px;
}

.brand-panel p {
    font-size: 20px;
    color: #5da8ff;
}

.brand-note {
    margin-top: auto;
    opacity: .8;
}

.login-card {
    align-self: center;

    margin: 45px;
    padding: 45px;

    border-radius: 20px;
}

.login-card h2 {
    font-size: 28px;
}

.accent {
    width: 48px;
    height: 4px;

    background: #1476ed;

    border-radius: 4px;

    margin: 15px 0 30px;
}

.login-card label {
    display: block;

    margin: 18px 0 7px;

    font-weight: 600;
}

.login-card input,
.inline-form input,
.inline-form select {
    width: 100%;

    padding: 14px;

    border: 1px solid #d8dfeb;

    border-radius: 10px;

    font-size: 15px;

    min-width: 0;
}

.login-card button,
.inline-form button {
    width: 100%;

    border: 0;
    border-radius: 10px;

    padding: 14px;

    background: #116fe8;
    color: #fff;

    font-weight: 700;
    font-size: 16px;

    margin-top: 24px;

    cursor: pointer;
}

.alert,
.success {
    padding: 13px 16px;

    border-radius: 10px;

    margin: 15px 0;

    background: #ffe7e7;
    color: #a02222;
}

.success {
    background: #e7f8ed;
    color: #16733a;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    display: flex;

    width: 100%;
    min-height: 100vh;
}


/* =========================================================
   SIDEBAR
   ========================================================= */

.sidebar {
    width: 250px;
    min-width: 250px;

    min-height: 100vh;

    background: #fff;

    border-right: 1px solid #e7ebf2;

    padding: 28px 18px;

    display: flex;
    flex-direction: column;
}

.sidebar.dark {
    background: #06182d;
    color: #fff;
}

.side-logo {
    font-size: 18px;

    display: flex;
    gap: 10px;
    align-items: center;

    margin: 0 10px 40px;
}

.side-logo b {
    font-size: 14px;
    letter-spacing: 0;
}

.sidebar nav {
    display: flex;
    flex-direction: column;

    gap: 8px;

    width: 100%;
}

.sidebar nav a {
    padding: 13px 15px;

    border-radius: 10px;

    display: block;

    width: 100%;
}

.sidebar nav a:hover {
    background: #f1f6ff;
}

.sidebar nav a.active {
    background: #eaf3ff;
    color: #0869e7;
}

.dark nav a.active {
    background: #116fe8;
    color: #fff;
}

.logout {
    margin-top: auto;

    padding: 13px 15px;

    display: block;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content {
    flex: 1;

    width: 100%;
    min-width: 0;

    padding: 0 38px 50px;

    max-width: 1250px;

    margin: 0 auto;
}


/* =========================================================
   TOPBAR
   ========================================================= */

.topbar {
    min-height: 75px;

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    border-bottom: 1px solid #e8edf5;

    min-width: 0;
}

.topbar > * {
    min-width: 0;
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    padding: 40px 0 25px;
}

.hero h1 {
    margin: 0 0 8px;

    font-size: 32px;

    overflow-wrap: anywhere;
}

.hero p {
    margin: 0;

    color: #68758a;

    overflow-wrap: anywhere;
}

.content h2 {
    font-size: 20px;

    overflow-wrap: anywhere;
}


/* =========================================================
   MODULE CARD
   ========================================================= */

.module-card {
    width: 100%;

    display: flex;

    align-items: center;

    gap: 20px;

    background: #fff;

    border: 1px solid #e8edf5;

    border-radius: 16px;

    padding: 18px;

    margin: 14px 0;

    box-shadow: 0 4px 18px #10213b08;

    min-width: 0;
}

.module-icon {
    width: 60px;
    min-width: 60px;

    height: 60px;

    border-radius: 12px;

    background: #0d6fea;

    color: #fff;

    display: grid;
    place-items: center;

    font-size: 27px;
}

.module-info {
    flex: 1;

    min-width: 0;
}

.module-info h3 {
    margin: 0 0 6px;

    overflow-wrap: anywhere;
}

.module-info p {
    margin: 0 0 6px;

    color: #68758a;

    overflow-wrap: anywhere;
}

.outline-btn {
    flex-shrink: 0;

    border: 1px solid #dbe4f1;

    padding: 11px 15px;

    border-radius: 9px;

    font-weight: 600;

    white-space: nowrap;
}


/* =========================================================
   VIDEO
   ========================================================= */

.video-card {
    width: 100%;

    background: #fff;

    border: 1px solid #e7ebf2;

    border-radius: 16px;

    padding: 22px;

    margin: 18px 0;

    min-width: 0;
}

.video-card h2 {
    overflow-wrap: anywhere;
}

.video-wrap {
    position: relative;

    width: 100%;

    padding-top: 56.25%;

    overflow: hidden;

    border-radius: 12px;

    background: #071a30;
}

.video-wrap iframe {
    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;

    border: 0;
}

.video-placeholder {
    padding: 80px;

    text-align: center;

    background: #eef3f9;

    border-radius: 12px;

    color: #718096;
}


/* =========================================================
   STATS
   ========================================================= */

.stats {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 15px;

    width: 100%;
}

.stats > div {
    background: #fff;

    padding: 22px;

    border: 1px solid #e7ebf2;

    border-radius: 14px;

    min-width: 0;
}

.stats b {
    font-size: 28px;

    display: block;
}

.stats span {
    color: #68758a;
}


/* =========================================================
   ADMIN
   ========================================================= */

.admin-section {
    background: #fff;

    border: 1px solid #e7ebf2;

    border-radius: 16px;

    padding: 22px;

    margin-top: 20px;

    min-width: 0;
}

.section-head {
    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: 15px;

    min-width: 0;
}

.section-head span {
    color: #6d7a8e;

    font-size: 13px;
}

.inline-form {
    display: grid;

    grid-template-columns:
        1fr
        1fr
        1fr
        auto;

    gap: 10px;

    margin: 18px 0;

    width: 100%;
}

.inline-form.wide {
    grid-template-columns:
        1fr
        1fr
        1fr
        1.5fr
        auto;
}

.inline-form button {
    width: auto;

    margin: 0;

    white-space: nowrap;
}


/* =========================================================
   TABLE
   ========================================================= */

.table-wrap {
    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    text-align: left;

    padding: 13px;

    border-top: 1px solid #edf0f5;
}

td form {
    margin: 0;
}

.danger {
    border: 0;

    background: #fff0f0;

    color: #b42323;

    padding: 8px 11px;

    border-radius: 8px;

    cursor: pointer;
}


/* =========================================================
   EMPTY
   ========================================================= */

.empty {
    text-align: center;

    padding: 45px;

    color: #778398;

    background: #fff;

    border-radius: 15px;

    overflow-wrap: anywhere;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .content {
        padding-left: 25px;
        padding-right: 25px;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .inline-form,
    .inline-form.wide {
        grid-template-columns: 1fr 1fr;
    }

    .inline-form button {
        width: 100%;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 800px) {

    html,
    body {
        width: 100%;
        max-width: 100%;

        overflow-x: hidden;
    }


    /* -------------------------
       APP
       ------------------------- */

    .app {
        display: block;

        width: 100%;
        min-height: 100vh;
    }


    /* -------------------------
       SIDEBAR
       ------------------------- */

    .sidebar {
        width: 100%;
        min-width: 0;

        min-height: auto;

        padding: 14px 14px 10px;

        border-right: 0;

        border-bottom: 1px solid #e7ebf2;

        display: block;
    }

    .side-logo {
        margin: 0 5px 12px;

        font-size: 18px;

        gap: 8px;
    }

    .side-logo b {
        font-size: 15px;
    }

    .sidebar nav {
        display: flex;

        flex-direction: row;

        align-items: stretch;

        gap: 8px;

        width: 100%;

        overflow-x: auto;

        padding-bottom: 2px;
    }

    .sidebar nav a {
        flex: 1 1 0;

        min-width: 0;

        padding: 10px 8px;

        text-align: center;

        font-size: 14px;

        white-space: nowrap;
    }

    .logout {
        margin-top: 8px;

        padding: 8px;

        text-align: center;

        font-size: 13px;
    }


    /* -------------------------
       CONTENT
       ------------------------- */

    .content {
        width: 100%;

        max-width: none;

        min-width: 0;

        margin: 0;

        padding: 0 14px 35px;
    }


    /* -------------------------
       TOPBAR
       ------------------------- */

    .topbar {
        min-height: 58px;

        padding: 5px 0;

        gap: 10px;

        font-size: 14px;
    }


    /* -------------------------
       HERO
       ------------------------- */

    .hero {
        padding: 25px 0 18px;
    }

    .hero h1 {
        font-size: 27px;

        line-height: 1.2;
    }

    .hero p {
        font-size: 15px;

        line-height: 1.5;
    }

    .content h2 {
        font-size: 19px;
    }


    /* -------------------------
       MODULE CARD
       ------------------------- */

    .module-card {
        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        gap: 14px;

        padding: 18px;

        margin: 14px 0;

        overflow: hidden;
    }

    .module-icon {
        width: 56px;
        min-width: 56px;

        height: 56px;

        font-size: 24px;

        align-self: flex-start;
    }

    .module-info {
        width: 100%;

        min-width: 0;
    }

    .module-info h3 {
        font-size: 20px;

        line-height: 1.25;
    }

    .module-info p {
        font-size: 15px;

        line-height: 1.5;
    }

    .outline-btn {
        width: 100%;

        text-align: center;

        margin: 0;

        padding: 12px;

        white-space: normal;
    }


    /* -------------------------
       VIDEO CARD
       ------------------------- */

    .video-card {
        width: 100%;

        padding: 14px;

        margin: 15px 0;

        overflow: hidden;
    }

    .video-card h2 {
        font-size: 18px;

        line-height: 1.35;

        margin-top: 0;
    }

    .video-wrap {
        width: 100%;

        border-radius: 10px;
    }


    /* -------------------------
       STATS
       ------------------------- */

    .stats {
        grid-template-columns: 1fr;

        gap: 12px;
    }

    .stats > div {
        padding: 18px;
    }


    /* -------------------------
       ADMIN
       ------------------------- */

    .admin-section {
        padding: 16px;

        margin-top: 15px;

        overflow: hidden;
    }

    .section-head {
        flex-direction: column;

        align-items: flex-start;
    }

    .inline-form,
    .inline-form.wide {
        display: grid;

        grid-template-columns: 1fr;

        gap: 10px;
    }

    .inline-form input,
    .inline-form select {
        width: 100%;

        min-width: 0;
    }

    .inline-form button {
        width: 100%;

        margin: 0;
    }


    /* -------------------------
       TABLE
       ------------------------- */

    .table-wrap {
        width: 100%;

        overflow-x: auto;

        border-radius: 8px;
    }

    table {
        min-width: 650px;

        font-size: 13px;
    }

    th,
    td {
        padding: 10px;
    }


    /* -------------------------
       EMPTY
       ------------------------- */

    .empty {
        padding: 30px 18px;

        font-size: 14px;

        line-height: 1.5;
    }
}


/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 480px) {

    .login-page {
        padding: 10px;
    }

    .login-shell {
        width: 100%;

        min-height: auto;

        display: block;

        border-radius: 18px;
    }

    .brand-panel {
        min-height: 250px;

        padding: 30px 22px;
    }

    .brand-panel h1 {
        font-size: 30px;
    }

    .brand-panel p {
        font-size: 17px;
    }

    .login-card {
        margin: 0;

        padding: 25px 20px;
    }

    .login-card h2 {
        font-size: 24px;
    }


    .side-logo {
        margin-bottom: 10px;
    }

    .sidebar nav {
        gap: 5px;
    }

    .sidebar nav a {
        font-size: 13px;

        padding: 9px 5px;
    }

    .content {
        padding-left: 12px;
        padding-right: 12px;
    }

    .hero h1 {
        font-size: 24px;
    }

    .module-card {
        padding: 16px;

        border-radius: 14px;
    }

    .module-info h3 {
        font-size: 19px;
    }

    .video-card {
        padding: 12px;
    }

    .video-card h2 {
        font-size: 17px;
    }
}