:root {
    --bg: #fef7ff;
    --bg-soft: #f3fbff;
    --surface: #ffffff;
    --surface-soft: #fff9ff;
    --text: #1f2544;
    --muted: #6b728e;

    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;

    --border: #e7dcff;
    --shadow-sm: 0 8px 22px rgba(91, 85, 168, 0.10);
    --shadow-md: 0 18px 36px rgba(91, 85, 168, 0.16);
    --radius: 16px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text);
    background:
        radial-gradient(circle at 8% -10%, #ffe8f6 0%, transparent 40%),
        radial-gradient(circle at 95% -15%, #dff7ff 0%, transparent 42%),
        radial-gradient(circle at 50% 120%, #ede9ff 0%, transparent 45%),
        var(--bg);
}

.container {
    width: min(1180px, 94%);
    margin: 24px auto 34px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
    margin-bottom: 18px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f7fbff 42%, #f7f3ff 100%);
    border-color: #dbd7ff;
}

.brand h1 {
    margin: 0;
    font-size: clamp(1.35rem, 2.2vw, 1.85rem);
    letter-spacing: 0.2px;
    background: linear-gradient(90deg, #4f46e5, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

h2, h3 {
    margin: 0 0 14px;
    letter-spacing: 0.1px;
}

.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid transparent;
    border-radius: 11px;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 0.88rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover {
    transform: translateY(-1px);
    filter: saturate(1.05);
    box-shadow: 0 8px 18px rgba(79, 70, 229, 0.20);
}

.btn-primary {
    background: linear-gradient(180deg, #7c7fff, var(--primary));
    color: #fff;
}

.btn-primary:hover {
    background: linear-gradient(180deg, #6f72ff, var(--primary-dark));
}

.btn-success {
    background: linear-gradient(180deg, #34d399, var(--success));
    color: #fff;
}

.btn-light {
    background: #eef8ff;
    color: #1d4ed8;
    border-color: #c9ecff;
}

.btn-danger {
    background: linear-gradient(180deg, #fb7185, var(--danger));
    color: #fff;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 16px;
}

.col-6 { grid-column: span 6; }
.col-12 { grid-column: span 12; }

label {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
    font-weight: 700;
    color: #39417a;
}

input,
select {
    width: 100%;
    border: 1px solid #dcdaf9;
    border-radius: 11px;
    padding: 10px 12px;
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    outline: none;
}

input:focus,
select:focus {
    border-color: #9aa2ff;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.14);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.9rem;
    overflow: hidden;
    border: 1px solid #dfd8ff;
    border-radius: 13px;
    background: #fff;
}

thead th {
    background: linear-gradient(180deg, #f5f3ff, #eef8ff);
    color: #3d4674;
    font-weight: 700;
    border-bottom: 1px solid #e4e7fb;
}

th,
td {
    padding: 11px 12px;
    text-align: left;
    border-bottom: 1px solid #ececfa;
    vertical-align: top;
}

tbody tr:hover { background: #faf8ff; }

tbody tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 11px;
    font-size: 0.76rem;
    font-weight: 800;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fff4cf;
    color: #92400e;
}

.row-complete {
    background: #f0fff6;
}

.notice {
    border-radius: 11px;
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 0.88rem;
    border: 1px solid transparent;
}

.notice-success {
    background: #ebfef2;
    border-color: #baf5cd;
    color: #166534;
}

.notice-error {
    background: #fff1f4;
    border-color: #ffcfd8;
    color: #9f1239;
}

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.doc-item {
    border: 1px solid #e6ddff;
    border-radius: 13px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff, #fdf9ff);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.doc-item h4 {
    margin: 0 0 6px;
    font-size: 0.98rem;
    color: #3b427a;
}

.doc-meta {
    color: var(--muted);
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.footer-note {
    color: var(--muted);
    font-size: 0.82rem;
}

/* Warna khusus ikut fungsi box */
.box-login-admin {
    background: linear-gradient(145deg, #fff5fd, #f6f3ff);
    border-color: #e9d9ff;
}

.box-login-student {
    background: linear-gradient(145deg, #f0fbff, #f5f7ff);
    border-color: #cfe9ff;
}

.box-admin-overview {
    background: linear-gradient(155deg, #fff9f2, #fff4fb);
    border-color: #ffd9e8;
}

.box-session {
    background: linear-gradient(155deg, #eef8ff, #f0f6ff);
    border-color: #cfe5ff;
}

.box-student-add {
    background: linear-gradient(155deg, #f0fff7, #f4fff3);
    border-color: #c8f1d8;
}

.box-doc-manage {
    background: linear-gradient(155deg, #fffdf0, #fff8e7);
    border-color: #ffe3b1;
}

.box-lecture-add {
    background: linear-gradient(155deg, #f3f6ff, #f7f2ff);
    border-color: #d8d8ff;
}

.box-lecture-list {
    background: linear-gradient(155deg, #eefcff, #f3fbff);
    border-color: #cceeff;
}

.box-student-status {
    background: linear-gradient(155deg, #f8f5ff, #f0fbff);
    border-color: #d7d9ff;
}

.box-student-overview {
    background: linear-gradient(155deg, #f6fffb, #f0fffd);
    border-color: #c5f2e8;
}

.box-student-upload {
    background: linear-gradient(155deg, #fff7f0, #fff9f7);
    border-color: #ffd8c2;
}

.box-public-list {
    background: linear-gradient(155deg, #f7f9ff, #f2f8ff);
    border-color: #d7e6ff;
}

.box-news-manage {
    background: linear-gradient(155deg, #fff3f8, #fffaf1);
    border-color: #ffd3e7;
}

.box-news-public {
    background: linear-gradient(155deg, #fdf3ff, #f2fbff);
    border-color: #e1d1ff;
}

.news-item {
    border: 1px solid #eadbff;
    border-radius: 12px;
    background: #fff;
    padding: 14px;
    margin-bottom: 12px;
}

.news-item h3 {
    margin: 0 0 6px;
    color: #4338ca;
}

.news-meta {
    font-size: 0.8rem;
    color: #6b728e;
    margin-bottom: 8px;
}

.news-body {
    color: #1f2544;
    margin-bottom: 10px;
}

.news-body p {
    margin: 0 0 8px;
}

#news_editor .ql-editor {
    min-height: 160px;
}

@media (max-width: 980px) {
    .col-6 { grid-column: span 12; }
}

@media (max-width: 860px) {
    .container { width: min(1180px, 96%); }
    .header { padding: 16px; }
    table { display: block; overflow-x: auto; white-space: nowrap; }
}
