@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&family=Poppins:wght@400;500;600;700&display=swap");

:root {
    --primary: #6c63ff;
    --secondary: #ff6584;
    --accent: #43e97b;
    --warning: #f7971e;
    --info: #4fc3f7;
    --bg: #f0f4ff;
    --card: #ffffff;
    --text: #2d3748;
    --muted: #718096;
    --border: #e2e8f0;
    --sidebar-w: 240px;
    --radius: 16px;
    --shadow: 0 4px 24px rgba(108, 99, 255, 0.1);
    --shadow-hover: 0 8px 32px rgba(108, 99, 255, 0.18);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Poppins", sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

/* ========== LOGIN PAGE ========== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #6c63ff 0%, #a78bfa 50%, #ff6584 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: "";
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    top: -100px;
    left: -100px;
}

.login-wrapper::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    bottom: -80px;
    right: -80px;
}

.login-card {
    background: white;
    border-radius: 24px;
    padding: 48px 40px;
    width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 2;
    animation: fadeUp 0.5s ease;
}

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

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo .icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #6c63ff, #ff6584);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.35);
}

.login-logo h1 {
    font-family: "Nunito", sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
}

.login-logo p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    color: var(--text);
    background: #fafbff;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(108, 99, 255, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border: none;
    border-radius: 12px;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    color: white;
    width: 100%;
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(108, 99, 255, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
    box-shadow: 0 4px 16px rgba(67, 233, 123, 0.35);
}

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

.btn-danger {
    background: linear-gradient(135deg, #ff6584, #ff8e53);
    color: white;
    box-shadow: 0 4px 16px rgba(255, 101, 132, 0.3);
}

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

.btn-warning {
    background: linear-gradient(135deg, #f7971e, #ffd200);
    color: white;
}

.btn-sm {
    padding: 7px 16px;
    font-size: 13px;
    border-radius: 8px;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fff0f3;
    color: #e53e6b;
    border: 1.5px solid #ffb3c1;
}
.alert-success {
    background: #f0fff4;
    color: #276749;
    border: 1.5px solid #9ae6b4;
}

/* ========== LAYOUT ========== */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ========== SIDEBAR ========== */
.sidebar {
    width: var(--sidebar-w);
    background: linear-gradient(180deg, #6c63ff 0%, #a78bfa 100%);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(108, 99, 255, 0.2);
    z-index: 100;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 28px 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-text {
    flex-direction: column;
}

.sidebar-brand .brand-icon {
    width: 44px;
    height: 44px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sidebar-brand h2 {
    font-family: "Nunito", sans-serif;
    font-size: 15px;
    font-weight: 800;
    color: white;
    line-height: 1.3;
}

.sidebar-brand p {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 2px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-label {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 12px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    margin-bottom: 2px;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateX(4px);
}

.nav-item .nav-icon {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 12px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.12);
    margin-bottom: 10px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ff6584, #ffb347);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
}

.user-info-text p {
    font-size: 13px;
    font-weight: 600;
    color: white;
}
.user-info-text span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
}

/* ========== MAIN CONTENT ========== */
.main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-x: hidden;
}

.topbar {
    background: white;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar h1 {
    font-family: "Nunito", sans-serif;
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge-role {
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #6c63ff, #a78bfa);
    color: white;
}

.content {
    padding: 28px 32px;
    flex: 1;
}

/* ========== STATS CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 0 0 0 80px;
    opacity: 0.08;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, #6c63ff22, #6c63ff44);
}
.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, #43e97b22, #43e97b44);
}
.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, #ff658422, #ff658444);
}
.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, #f7971e22, #f7971e44);
}

.stat-info h3 {
    font-size: 28px;
    font-weight: 800;
    font-family: "Nunito", sans-serif;
    color: var(--text);
}

.stat-info p {
    font-size: 13px;
    color: var(--muted);
    margin-top: 2px;
}

/* ========== CARD ========== */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 2px solid var(--bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-family: "Nunito", sans-serif;
    font-size: 17px;
    font-weight: 800;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    padding: 24px;
}

/* ========== TABLE ========== */
.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

thead th {
    background: var(--bg);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--muted);
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
}

tbody tr:hover {
    background: #fafbff;
}
tbody tr:last-child td {
    border-bottom: none;
}

/* ========== BADGE ========== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-strategis {
    background: #f0fff4;
    color: #276749;
    border: 1.5px solid #9ae6b4;
}

.badge-tidak {
    background: #fff0f3;
    color: #e53e6b;
    border: 1.5px solid #ffb3c1;
}

.badge-sedang {
    background: #fffbeb;
    color: #b7791f;
    border: 1.5px solid #f6e05e;
}

/* ========== FORM STYLES ========== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-full {
    grid-column: 1 / -1;
}

.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23718096' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* ========== HASIL NB ========== */
.hasil-box {
    border-radius: 20px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
    animation: fadeUp 0.5s ease;
}

.hasil-strategis {
    background: linear-gradient(135deg, #43e97b22, #38f9d722);
    border: 3px solid #43e97b;
}

.hasil-tidak {
    background: linear-gradient(135deg, #ff658422, #ff8e5322);
    border: 3px solid #ff6584;
}

.hasil-box .emoji {
    font-size: 64px;
    margin-bottom: 12px;
}

.hasil-box h2 {
    font-family: "Nunito", sans-serif;
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 8px;
}

.hasil-strategis h2 {
    color: #276749;
}
.hasil-tidak h2 {
    color: #e53e6b;
}

.hasil-box p {
    color: var(--muted);
    font-size: 14px;
}

.prob-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.prob-card {
    border-radius: 16px;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.prob-card.strategis {
    background: linear-gradient(135deg, #43e97b, #38f9d7);
    color: white;
}

.prob-card.tidak {
    background: linear-gradient(135deg, #ff6584, #ff8e53);
    color: white;
}

.prob-card .prob-icon {
    font-size: 32px;
}
.prob-card .prob-info p {
    font-size: 12px;
    opacity: 0.85;
    font-weight: 500;
}
.prob-card .prob-info h3 {
    font-size: 20px;
    font-weight: 800;
    font-family: "Nunito", sans-serif;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--muted);
}

.empty-state .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}
.empty-state p {
    font-size: 14px;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}
.breadcrumb span {
    color: var(--border);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg);
}
::-webkit-scrollbar-thumb {
    background: #c4c9e2;
    border-radius: 10px;
}
