:root{
    --bg:#eef3f8;
    --panel:#ffffff;

    --dark:#26CCC2;
    --dark-2:#1fb8af;

    --accent:#6AECE1;
    --accent-2:#26CCC2;

    --text:#1e293b;
    --muted:#64748b;

    --line:#d9e2ef;

    --danger:#dc2626;
    --success:#16a34a;

    --shadow:0 10px 28px rgba(15,23,42,.08);
    --shadow-strong:0 14px 36px rgba(15,23,42,.14);
    --radius:18px;
}

*{
    box-sizing:border-box;
}

html,
body{
    margin:0;
    padding:0;
    font-family:Arial, Helvetica, sans-serif;
    background:var(--bg);
    color:var(--text);
}

body{
    overflow-x:hidden;
}

a{
    text-decoration:none;
    color:inherit;
}

button,
input,
select,
textarea{
    font:inherit;
}

/* =========================================================
   ADMIN PANEL
========================================================= */

.admin-body{
    background:#eef3f8;
}

.admin-shell{
    display:flex;
    min-height:100vh;
}

.sidebar{
    width:270px;
    background:linear-gradient(180deg,var(--dark),var(--dark-2));
    color:#fff;
    padding:22px 16px;
    position:sticky;
    top:0;
    height:100vh;
    overflow:auto;
    box-shadow:4px 0 20px rgba(0,0,0,.08);
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
    margin-bottom:28px;
}

.brand-badge{
    width:56px;
    height:56px;
    border-radius:18px;
    background:rgba(255,255,255,.12);
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}

.brand-badge img{
    width:100%;
    height:100%;
    object-fit:contain;
}

.brand-title{
    font-size:20px;
    font-weight:800;
    letter-spacing:.5px;
    text-transform:uppercase;
}

.brand-subtitle{
    font-size:12px;
    color:#eafcfb;
    margin-top:2px;
}

.menu{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.menu-item{
    display:flex;
    align-items:center;
    gap:10px;
    padding:13px 14px;
    border-radius:14px;
    color:#e2e8f0;
    font-weight:700;
    transition:.2s ease;
}

.menu-item:hover{
    background:rgba(255,255,255,.08);
}

.menu-item.active{
    background:linear-gradient(90deg,var(--accent-2),var(--accent));
    color:#fff;
}

.menu-item.danger{
    color:#ffd0d0;
}

.main-content{
    flex:1;
    min-width:0;
}

.topbar{
    position:sticky;
    top:0;
    z-index:20;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:#fff;
    padding:18px 24px;
    border-bottom:1px solid var(--line);
    box-shadow:0 2px 12px rgba(0,0,0,.03);
}

.topbar-left{
    display:flex;
    align-items:center;
    gap:14px;
}

.topbar-title{
    font-size:15px;
    font-weight:700;
    color:#475569;
}

.topbar-user{
    font-weight:800;
    color:#0f172a;
}

.burger{
    width:44px;
    height:44px;
    border:0;
    border-radius:14px;
    background:#eef4fb;
    cursor:pointer;
}

.content-wrap{
    padding:24px;
}

.card{
    background:var(--panel);
    border:1px solid var(--line);
    border-radius:22px;
    box-shadow:var(--shadow);
    padding:22px;
    margin-bottom:22px;
}

.card h1,
.card h2,
.card h3{
    margin-top:0;
    margin-bottom:14px;
}

.grid{
    display:grid;
    gap:16px;
}

.grid-4{
    grid-template-columns:repeat(4,minmax(0,1fr));
}

.grid-2{
    grid-template-columns:repeat(2,minmax(0,1fr));
}

.stat{
    padding:20px;
    border-radius:20px;
    background:linear-gradient(180deg,#fff,#f7fbff);
    border:1px solid var(--line);
}

.stat .label{
    color:var(--muted);
    font-size:13px;
    font-weight:600;
}

.stat .value{
    margin-top:8px;
    font-size:32px;
    font-weight:800;
    color:#0f172a;
}

.table{
    width:100%;
    border-collapse:collapse;
}

.table th,
.table td{
    padding:12px 10px;
    border-bottom:1px solid var(--line);
    text-align:left;
    vertical-align:top;
    font-size:14px;
}

.table th{
    background:#111827;
    color:#fff;
    position:sticky;
    top:0;
    z-index:2;
}

.table tbody tr:hover td{
    background:#f8fbff;
}

.badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:6px 12px;
    border-radius:999px;
    font-size:12px;
    font-weight:800;
}

.badge-active{
    background:#dcfce7;
    color:#166534;
}

.badge-inactive{
    background:#fee2e2;
    color:#991b1b;
}

.actions{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    border:0;
    border-radius:14px;
    padding:12px 16px;
    cursor:pointer;
    font-weight:700;
    transition:.2s ease;
}

.btn:hover{
    transform:translateY(-1px);
}

.btn-primary{
    background:linear-gradient(90deg,var(--accent-2),var(--accent));
    color:#fff;
}

.btn-secondary{
    background:#e8eef7;
    color:#0f172a;
}

.btn-danger{
    background:var(--danger);
    color:#fff;
}

.btn-success{
    background:var(--success);
    color:#fff;
}

.btn-sm{
    padding:8px 12px;
    border-radius:12px;
    font-size:13px;
}

.label{
    display:block;
    margin-bottom:8px;
    font-weight:700;
}

.input,
.select,
.textarea{
    width:100%;
    padding:12px 14px;
    border:1px solid var(--line);
    border-radius:14px;
    background:#fff;
    outline:none;
}

.input:focus,
.select:focus,
.textarea:focus{
    border-color:var(--accent-2);
    box-shadow:0 0 0 3px rgba(106,236,225,.16);
}

.textarea{
    min-height:110px;
    resize:vertical;
}

.form-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.form-row{
    margin-bottom:16px;
}

.notice{
    padding:14px 16px;
    border-radius:14px;
    margin-bottom:18px;
    border:1px solid;
}

.notice.success{
    background:#ecfdf5;
    border-color:#bbf7d0;
    color:#166534;
}

.notice.error{
    background:#fff1f2;
    border-color:#fecdd3;
    color:#be123c;
}

.page-title{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:18px;
}

.page-title h1{
    margin:0;
    font-size:28px;
}

.small-muted{
    font-size:13px;
    color:var(--muted);
}

.thumb{
    width:96px;
    height:64px;
    object-fit:cover;
    border-radius:12px;
    border:1px solid var(--line);
    background:#f8fafc;
}

.file-link{
    display:inline-block;
    color:var(--accent-2);
    font-weight:700;
}

.captcha-row{
    display:flex;
    gap:10px;
    align-items:center;
}

.captcha-input{
    flex:1;
    min-width:0;
}

.captcha-img{
    width:150px;
    height:60px;
    border-radius:12px;
    border:1px solid var(--line);
    background:#fff;
    object-fit:contain;
    cursor:pointer;
}

.inline-link{
    display:inline-block;
    color:var(--accent-2);
    font-size:13px;
    font-weight:700;
}

/* =========================================================
   PUBLIC DISPLAY TV
========================================================= */

.public-body{
    background:#081521;
    overflow:hidden;
}

.public-page{
    width:100vw;
    height:100vh;
    display:flex;
    flex-direction:column;
    background:
        radial-gradient(circle at top left, rgba(38,204,194,.12), transparent 28%),
        linear-gradient(180deg,#0b1624 0%,#09131d 100%);
}

.public-top{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:16px;
    padding:12px 18px;
    background:rgba(255,255,255,.98);
    color:#0f172a;
    border-bottom:4px solid var(--accent-2);
    box-shadow:0 2px 16px rgba(0,0,0,.08);
    position:relative;
    overflow:hidden;
}

.logo-wrap{
    display:flex;
    align-items:center;
    min-width:0;
    z-index:2;
}

.logo-wrap img{
    display:block;
    height:58px;
    width:auto;
    max-width:280px;
    object-fit:contain;
}

.title-wrap{
    display:flex;
    justify-content:center;
    align-items:center;
    min-width:0;
    z-index:2;
}

.title-main{
    font-size:clamp(20px, 2vw, 34px);
    font-weight:900;
    letter-spacing:.2px;
    text-align:center;
    line-height:1.2;
    text-shadow:0 1px 0 rgba(255,255,255,.65);
}

.title-animated{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    align-items:center;
    gap:0;
}

.title-char,
.title-space{
    display:inline-block;
    animation:
        titleColorCycle 7s ease-in-out infinite,
        titleFloat 4.2s ease-in-out infinite,
        titleBlink 5.6s ease-in-out infinite;
    animation-delay:calc(var(--i) * .07s);
    will-change:transform, opacity, color;
}

.title-char{
    padding:0 .02em;
    text-shadow:0 0 10px rgba(38,204,194,.12);
}

.title-space{
    width:.35em;
}

@keyframes titleColorCycle{
    0%   { color:#26CCC2; }
    20%  { color:#1d4ed8; }
    40%  { color:#8b5cf6; }
    60%  { color:#ef4444; }
    80%  { color:#16a34a; }
    100% { color:#26CCC2; }
}

@keyframes titleFloat{
    0%,100% { transform:translateY(0) scale(1); }
    50%     { transform:translateY(-2px) scale(1.02); }
}

@keyframes titleBlink{
    0%,100% { opacity:1; }
    45%     { opacity:.92; }
    50%     { opacity:.82; }
    55%     { opacity:.96; }
}

.fullscreen-btn{
    border:0;
    background:linear-gradient(90deg,#26CCC2 0%,#6AECE1 100%);
    color:#fff;
    border-radius:14px;
    padding:12px 16px;
    font-weight:800;
    cursor:pointer;
    box-shadow:0 6px 18px rgba(15,23,42,.16);
    transition:.2s ease;
    letter-spacing:.2px;
    z-index:2;
}

.fullscreen-btn:hover{
    transform:translateY(-1px);
    background:linear-gradient(90deg,#6AECE1 0%,#26CCC2 100%);
}

body.is-fullscreen .fullscreen-btn,
:fullscreen .fullscreen-btn,
:-webkit-full-screen .fullscreen-btn{
    display:none !important;
}

.public-main{
    flex:1;
    display:grid;
    grid-template-columns:1fr 1.6fr;
    gap:14px;
    padding:14px;
    min-height:0;
}

.public-col{
    display:flex;
    flex-direction:column;
    gap:14px;
    min-width:0;
}

.panel{
    background:#fff;
    border-radius:22px;
    overflow:hidden;
    border:1px solid #dbe6f3;
    box-shadow:var(--shadow-strong);
}

.panel-head{
    padding:14px 16px;
    background:linear-gradient(90deg,#26CCC2 0%,#6AECE1 100%);
    color:#fff;
    font-weight:800;
    font-size:17px;
}

.panel-body{
    padding:16px;
}

.panel-info .panel-body{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.panel-schedule{
    flex:1;
    min-height:0;
    display:flex;
    flex-direction:column;
}

.panel-table-wrap{
    padding:0;
    overflow:hidden;
    max-height:100%;
    height:100%;
    flex:1;
    min-height:0;
}

.info-card{
    display:grid;
    grid-template-columns:118px 1fr;
    gap:14px;
    padding:12px;
    border:1px solid #dbe6f3;
    border-radius:18px;
    background:linear-gradient(180deg,#fbfdff 0%, #f7fbff 100%);
    transition:.2s ease;
}

.info-card:hover{
    transform:translateY(-1px);
    box-shadow:0 8px 20px rgba(15,23,42,.06);
}

.info-thumb{
    width:118px;
    min-width:118px;
}

.info-thumb img{
    width:118px;
    height:92px;
    object-fit:cover;
    border-radius:14px;
    background:#e5eef9;
    border:1px solid #e3ebf5;
}

.info-content h3{
    margin:0 0 8px;
    font-size:16px;
    line-height:1.35;
}

.info-content p{
    margin:0;
    color:#475569;
    font-size:13px;
    line-height:1.55;
}

.info-actions{
    margin-top:10px;
}

.media-stage{
    height:100%;
    min-height:0;
    display:flex;
    flex-direction:column;
    background:#000;
    overflow:hidden;
}

.media-view{
    flex:1;
    position:relative;
    overflow:hidden;
    background:#000;
}

.media-view::after{
    content:"";
    position:absolute;
    inset:0;
    background:linear-gradient(to top, rgba(0,0,0,.20), transparent 35%);
    pointer-events:none;
}

.media-item{
    position:absolute;
    inset:0;
    opacity:0;
    transform:scale(1.04);
    transition:opacity 1.2s ease, transform 8s ease;
    will-change:opacity, transform;
}

.media-item.is-active{
    opacity:1;
    transform:scale(1);
}

.media-item.is-leaving{
    opacity:0;
    transform:scale(1.01);
}

.media-item img,
.media-item video{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    background:#000;
}

.media-dots{
    flex:0 0 auto;
    position:relative;
    left:auto;
    bottom:auto;
    transform:none;
    display:flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    padding:10px 0 12px;
    background:#081521;
    z-index:2;
}

.media-dot{
    width:11px;
    height:11px;
    border-radius:50%;
    background:rgba(255,255,255,.35);
    transition:.2s ease;
}

.media-dot.active{
    background:#fff;
    transform:scale(1.15);
}

.panel-schedule{
    border:1px solid #0c223d;
    background:linear-gradient(180deg,#f7fbff 0%,#ffffff 100%);
}

.panel-schedule .panel-head{
    background:linear-gradient(90deg,#26CCC2 0%,#6AECE1 100%);
    color:#fff;
    font-size:18px;
    letter-spacing:.2px;
    position:relative;
    overflow:hidden;
}

.panel-schedule .panel-head::after{
    content:'';
    position:absolute;
    inset:0;
    background:linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    transform:translateX(-100%);
    animation:scheduleHeadShine 4.8s linear infinite;
}

@keyframes scheduleHeadShine{
    0%   { transform:translateX(-100%); }
    100% { transform:translateX(100%); }
}

.schedule-scrollbox{
    height:100%;
    overflow:hidden;
    position:relative;
    background:#f7fbff;
}

.schedule-scroll-inner{
    position:relative;
    will-change:transform;
    transition:transform 1s ease-in-out;
}

.schedule-scrollbox::-webkit-scrollbar{
    width:0;
    height:0;
}

.schedule-table{
    width:100%;
    border-collapse:collapse;
    font-size:13px;
    table-layout:fixed;
    background:#fff;
}
.schedule-table thead th{
    position:sticky;
    top:0;
    z-index:3;
    background:#0b1624;
    color:#ffffff;
    font-size:12px;
    text-transform:uppercase;
    letter-spacing:.4px;
    padding:12px 10px;
    border-bottom:2px solid #26CCC2;
    white-space:nowrap;
}

.schedule-table tbody tr:nth-child(odd) td{
    background:#ffffff;
}

.schedule-table tbody tr:nth-child(even) td{
    background:#eaf4ff;
}

.schedule-table tbody tr:hover td{
    background:#d9f7f4;
}

.schedule-table th,
.schedule-table td{
    padding:11px 10px;
    border-bottom:1px solid #dbe6f3;
    text-align:left;
    vertical-align:top;
    line-height:1.35;
    word-wrap:break-word;
    overflow-wrap:anywhere;
}

.schedule-table td{
    color:#0f172a;
}

.schedule-table td:nth-child(1){
    width:48%;
}

.schedule-table td:nth-child(2){
    width:22%;
}

.schedule-table td:nth-child(3){
    width:15%;
}

.schedule-table td:nth-child(4){
    width:15%;
}

.schedule-row-active td{
    background:#d7fff8 !important;
    transition:background .6s ease;
}
.bottom-bar{
    flex:0 0 auto;
    display:grid;
    grid-template-columns:220px 1fr 370px;
    align-items:center;
    gap:14px;
    padding:10px 16px;
    background:linear-gradient(90deg,#134E8E 0%,#26CCC2 100%);
    color:#fff;
    border-top:3px solid #ffffff;
    box-shadow:0 -2px 14px rgba(0,0,0,.08);
    position:relative;
    z-index:1;
}

.clock{
    font-size:34px;
    font-weight:900;
    letter-spacing:1px;
    text-align:center;
    background:rgba(255,255,255,.12);
    padding:8px 14px;
    border-radius:16px;
    backdrop-filter:blur(4px);
}

.bottom-marquee{
    overflow:hidden;
    white-space:nowrap;
    font-size:18px;
    font-weight:800;
    min-width:0;
}

.bottom-marquee span{
    display:inline-block;
    padding-left:100%;
    animation:marquee 16s linear infinite;
    will-change:transform;
}

@keyframes marquee{
    0%{ transform:translateX(0); }
    100%{ transform:translateX(-100%); }
}

.bottom-right{
    display:flex;
    flex-direction:column;
    gap:4px;
    justify-content:center;
    align-items:flex-end;
}

.date-text{
    font-size:15px;
    font-weight:800;
    text-align:right;
}

.apel-text{
    opacity:.95;
}

@media (max-width:1100px){
    .grid-4,
    .grid-2,
    .form-grid{
        grid-template-columns:1fr 1fr;
    }

    .sidebar{
        width:240px;
    }

    .public-main{
        grid-template-columns:1fr;
    }

    .bottom-bar{
        grid-template-columns:180px 1fr 250px;
    }
}

@media (max-width:840px){
    .admin-shell{
        flex-direction:column;
    }

    .sidebar{
        width:100%;
        height:auto;
        position:relative;
    }

    .grid-4,
    .grid-2,
    .form-grid{
        grid-template-columns:1fr;
    }

    .public-page{
        height:auto;
        min-height:100vh;
        overflow:auto;
    }

    .public-top{
        grid-template-columns:1fr;
        justify-items:center;
        text-align:center;
    }

    .logo-wrap{
        justify-content:center;
    }

    .public-top .title-main{
        font-size:clamp(18px, 4vw, 26px);
    }

    .bottom-bar{
        grid-template-columns:1fr;
        gap:8px;
        text-align:center;
    }

    .clock{
        font-size:28px;
    }

    .bottom-right{
        align-items:center;
    }

    .date-text{
        text-align:center;
    }

    .info-card{
        grid-template-columns:96px 1fr;
    }

    .info-thumb,
    .info-thumb img{
        width:96px;
        min-width:96px;
        height:76px;
    }

    .media-view{
        min-height:420px;
    }
}

@media (max-width:520px){
    .public-top{
        padding:10px 12px;
    }

    .title-main{
        font-size:18px;
    }

    .fullscreen-btn{
        padding:10px 14px;
        font-size:14px;
    }

    .clock{
        font-size:24px;
        padding:8px 12px;
    }

    .bottom-marquee{
        font-size:15px;
    }

    .info-card{
        grid-template-columns:84px 1fr;
        gap:12px;
    }

    .info-thumb,
    .info-thumb img{
        width:84px;
        min-width:84px;
        height:66px;
    }
}

@media (prefers-reduced-motion: reduce){
    .title-char,
    .title-space,
    .media-item,
    .media-dot,
    .bottom-marquee span,
    .panel-schedule .panel-head::after{
        animation:none !important;
        transition:none !important;
    }
}