/* ========= GLOBAL ========= */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #F0FBF7;
    color: #1a3a3a;
    font-size: 14px;
}
a { color: #2C7A7B; text-decoration: none; }

/* ========= LOGIN ========= */
.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #98D8C8 0%, #2C7A7B 100%);
    display: flex; align-items: center; justify-content: center;
}
.login-box {
    background: white;
    padding: 40px 35px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(44,122,123,.3);
    width: 380px;
    text-align: center;
}
.login-logo { font-size: 60px; margin-bottom: 10px; }
.login-box h2 { color: #2C7A7B; margin-bottom: 5px; }
.login-box .sub { color: #7FC8B8; margin-bottom: 25px; font-size: 13px; }
.login-box label { display: block; text-align: left; margin: 12px 0 5px; font-weight: 600; color: #2C7A7B; }
.login-box input {
    width: 100%; padding: 11px 14px; border: 2px solid #D0F0E8;
    border-radius: 8px; font-family: inherit; font-size: 14px;
    transition: .2s;
}
.login-box input:focus { outline: none; border-color: #2C7A7B; }
.btn-primary {
    width: 100%; margin-top: 20px; padding: 12px;
    background: linear-gradient(135deg, #7FC8B8, #2C7A7B);
    color: white; border: none; border-radius: 8px;
    font-weight: 700; font-size: 14px; cursor: pointer;
    letter-spacing: 1px; transition: .2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(44,122,123,.4); }
.alert-error { background: #FFE5E5; color: #C53030; padding: 10px; border-radius: 6px; margin: 15px 0; font-size: 13px; }
.login-footer { margin-top: 25px; color: #999; font-size: 12px; }

/* ========= RUNNING TEXT ========= */
.running-bar {
    background: linear-gradient(90deg, #2C7A7B, #7FC8B8);
    color: white; padding: 10px 0;
    display: flex; align-items: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(44,122,123,.2);
}
.running-label {
    background: #1a5050; padding: 10px 20px;
    font-weight: 700; white-space: nowrap;
}
.running-wrap { flex: 1; overflow: hidden; }
.running-text {
    display: inline-block; white-space: nowrap;
    animation: scroll 40s linear infinite;
    padding-left: 100%;
}
.running-text span { margin: 0 30px; }
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* ========= LAYOUT ========= */
.layout { display: flex; min-height: calc(100vh - 42px); }
.sidebar {
    width: 250px; background: white;
    border-right: 1px solid #D0F0E8;
    box-shadow: 2px 0 10px rgba(44,122,123,.05);
    position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-header {
    padding: 25px 20px; text-align: center;
    background: linear-gradient(135deg, #98D8C8, #7FC8B8);
    color: white;
}
.logo-icon { font-size: 50px; }
.sidebar-header h3 { margin-top: 5px; letter-spacing: 1px; }
.sidebar-header small { opacity: .85; font-size: 11px; }
.sidebar nav { padding: 15px 0; }
.sidebar nav a {
    display: flex; align-items: center;
    padding: 12px 22px; color: #2C7A7B;
    border-left: 4px solid transparent;
    transition: .2s; font-weight: 500;
}
.sidebar nav a:hover { background: #F0FBF7; border-left-color: #7FC8B8; }
.sidebar nav a.active {
    background: #E6F7F2; border-left-color: #2C7A7B;
    color: #1a5050; font-weight: 700;
}
.sidebar nav a .ic { margin-right: 12px; font-size: 18px; }
.sidebar nav a.logout { color: #C53030; margin-top: 20px; border-top: 1px solid #eee; }

.main { flex: 1; display: flex; flex-direction: column; }
.topbar {
    background: white; padding: 18px 30px;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #D0F0E8;
}
.topbar h1 { color: #2C7A7B; font-size: 22px; }
.user-info { font-size: 14px; }
.badge {
    background: #7FC8B8; color: white;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; margin-left: 5px;
}
.content { padding: 30px; flex: 1; }

/* ========= CARD & TABLE ========= */
.card {
    background: white; border-radius: 12px;
    padding: 25px; box-shadow: 0 2px 10px rgba(44,122,123,.08);
    margin-bottom: 20px;
}
.card h3 { color: #2C7A7B; margin-bottom: 18px; padding-bottom: 12px; border-bottom: 2px solid #E6F7F2; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; margin-bottom: 25px; }
.stat-card {
    background: white; border-radius: 12px; padding: 22px;
    border-left: 5px solid #7FC8B8;
    box-shadow: 0 2px 10px rgba(44,122,123,.08);
    transition: .2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(44,122,123,.15); }
.stat-card .num { font-size: 32px; font-weight: 700; color: #2C7A7B; }
.stat-card .lbl { color: #666; font-size: 13px; margin-top: 5px; }
.stat-card .ic { float: right; font-size: 36px; opacity: .4; }

table { width: 100%; border-collapse: collapse; margin-top: 10px; }
table th {
    background: linear-gradient(135deg, #7FC8B8, #2C7A7B);
    color: white; padding: 12px; text-align: left;
    font-size: 13px; letter-spacing: .5px;
}
table td { padding: 11px 12px; border-bottom: 1px solid #E6F7F2; font-size: 13px; }
table tr:hover { background: #F0FBF7; }

.btn {
    padding: 7px 14px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 12px; font-weight: 600;
    text-decoration: none; display: inline-block;
}
.btn-add { background: #2C7A7B; color: white; margin-bottom: 15px; }
.btn-add:hover { background: #1a5050; }
.btn-edit { background: #F6AD55; color: white; }
.btn-del { background: #FC8181; color: white; }
.btn-sm { padding: 5px 10px; font-size: 11px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid label { display: block; margin-bottom: 5px; color: #2C7A7B; font-weight: 600; font-size: 13px; }
.form-grid input, .form-grid select, .form-grid textarea {
    width: 100%; padding: 9px 12px; border: 2px solid #D0F0E8;
    border-radius: 6px; font-family: inherit; font-size: 13px;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
    outline: none; border-color: #2C7A7B;
}

.alert-success { background: #E6F7F2; color: #1a5050; padding: 10px 15px; border-radius: 6px; margin-bottom: 15px; border-left: 4px solid #2C7A7B; }

/* ========= CBT ========= */
.cbt-container {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: #F0FBF7; z-index: 9999;
    display: flex; flex-direction: column;
}
.cbt-header {
    background: linear-gradient(90deg, #2C7A7B, #7FC8B8);
    color: white; padding: 15px 25px;
    display: flex; justify-content: space-between; align-items: center;
}
.cbt-timer {
    background: white; color: #C53030; padding: 8px 20px;
    border-radius: 20px; font-weight: 700; font-size: 18px;
}
.cbt-body { flex: 1; padding: 30px; overflow-y: auto; }
.cbt-warning {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%);
    background: #C53030; color: white; padding: 20px 40px;
    border-radius: 10px; font-weight: 700; z-index: 10000;
    box-shadow: 0 10px 40px rgba(0,0,0,.3);
    display: none;
}

/* ========= FOOTER ========= */
.footer {
    background: linear-gradient(135deg, #2C7A7B, #1a5050);
    color: white; margin-top: 30px;
}
.footer-top {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 30px; padding: 35px 40px;
}
.footer-brand h4 { margin-bottom: 10px; font-size: 18px; }
.footer-brand p { opacity: .85; font-size: 13px; line-height: 1.6; }
.footer-sosmed h4 { margin-bottom: 12px; }
.sosmed a {
    display: inline-block; color: white;
    background: rgba(255,255,255,.1);
    padding: 8px 14px; margin: 4px 4px 0 0;
    border-radius: 20px; font-size: 12px;
    transition: .2s;
}
.sosmed a:hover { background: #98D8C8; color: #1a5050; }
.footer-bottom {
    text-align: center; padding: 15px;
    border-top: 1px solid rgba(255,255,255,.15);
    font-size: 12px; opacity: .9;
}

/* ========= RESPONSIVE ========= */
@media (max-width: 768px) {
    .layout { flex-direction: column; }
    .sidebar { width: 100%; height: auto; position: relative; }
    .sidebar nav { display: flex; flex-wrap: wrap; }
    .sidebar nav a { flex: 1 1 50%; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-top { grid-template-columns: 1fr; }
/* ===== FITUR BARU ===== */
.stat-card a { text-decoration: none; color: inherit; }
.stat-card a:hover { transform: translateY(-3px); }

#video, #canvas { border: 3px solid #2C7A7B; }

.badge {
    background: #7FC8B8; color: white;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; display: inline-block;
}

.form-grid textarea {
    width: 100%; padding: 9px 12px; border: 2px solid #D0F0E8;
    border-radius: 6px; font-family: inherit; font-size: 13px;
    resize: vertical;
}
.form-grid textarea:focus { outline: none; border-color: #2C7A7B; }

.btn { transition: all .2s; }
.btn:hover { opacity: .9; transform: translateY(-1px); }

/* Responsive */
@media (max-width: 768px) {
    .form-grid { grid-template-columns: 1fr; }
    #video { width: 100% !important; height: auto !important; }
}