/* Reset & Fondasi */
:root {
    --bg-color: #f8fafc; /* Slate 50 */
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --accent-color: #4f46e5; /* Indigo 600 */
    --accent-hover: #4338ca; /* Indigo 700 */
    
    /* Glassmorphism Variables - Light Version */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.9);
    --glass-shadow: 0 8px 32px 0 rgba(148, 163, 184, 0.2);
    
    --sidebar-width: 250px;
    --header-height: 70px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(79, 70, 229, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.08), transparent 25%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Utilities: Glassmorphism */
.glassmorphism {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
}

.glassmorphism-dark {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: 1px solid var(--glass-border);
}

/* Layout Desktop */
.desktop-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    padding: 20px 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    padding: 0 20px 24px;
    gap: 12px;
}

.logo {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.sidebar-brand h2 {
    font-size: 1.05rem; /* DIKECILKAN */
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 12px;
}

.sidebar-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem; /* DIKECILKAN */
}

.nav-item a:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(4px);
}

.nav-item.active a {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2), transparent);
    border-left: 3px solid var(--accent-color);
}

.sidebar-footer {
    padding: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: var(--header-height);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    border-radius: 0 0 0 20px;
}

.search-bar {
    width: 260px;
}

.search-input {
    width: 100%;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.85rem; /* DIKECILKAN */
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.search-input option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.icon-button {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem; /* DIKECILKAN */
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.icon-button:hover {
    color: var(--text-primary);
}

.badge {
    position: absolute;
    top: -4px;
    right: -6px;
    background: #ef4444; 
    color: var(--text-primary);
    font-size: 0.6rem; /* DIKECILKAN */
    font-weight: bold;
    padding: 2px 5px;
    border-radius: 10px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.05);
}

.avatar {
    width: 32px;
    height: 32px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: white;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem; /* DIKECILKAN */
}

.user-role {
    font-size: 0.7rem; /* DIKECILKAN */
    color: var(--text-secondary);
}

/* Dashboard Content */
.content-wrapper {
    padding: 24px;
    animation: fadeIn 0.4s ease-out;
}

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

.dashboard-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: 1.5rem; /* DIKECILKAN DARI 2rem */
    font-weight: 600;
    background: linear-gradient(to right, #0f172a, #475569);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem; /* DIKECILKAN */
    margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.stat-card h3 {
    font-size: 0.8rem; /* DIKECILKAN */
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 1.8rem; /* DIKECILKAN DARI 2.5rem */
    font-weight: 700;
    margin-bottom: 8px;
}

.stat-indicator {
    font-size: 0.7rem; /* DIKECILKAN */
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.stat-indicator.positive {
    background: rgba(16, 185, 129, 0.1); 
    color: #34d399; 
}

.stat-indicator.neutral {
    background: rgba(148, 163, 184, 0.1);
    color: #cbd5e1;
}

.progress-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 6px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color), #60a5fa);
    border-radius: 3px;
    position: relative;
}

/* Recent Activity */
.recent-activity-section {
    padding: 20px;
}

.recent-activity-section h2 {
    font-size: 1.05rem; /* DIKECILKAN */
    margin-bottom: 16px;
    font-weight: 600;
}

.activity-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.activity-list li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.activity-time {
    font-size: 0.75rem; /* DIKECILKAN */
    color: var(--text-secondary);
    min-width: 45px;
}

.activity-details {
    font-size: 0.85rem; /* DIKECILKAN */
}

.activity-details strong {
    color: var(--accent-color);
}

/* Mobile Component Placeholder */
.mobile-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    text-align: center;
}

.mobile-glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px 20px;
    max-width: 350px;
    box-shadow: var(--glass-shadow);
}

.mobile-glass-card h1 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--accent-color);
}

.mobile-glass-card p {
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.85rem;
}

/* Global Component Classes */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    padding: 12px 16px;
    color: var(--text-secondary);
    font-weight: 600;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.modern-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.modern-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.btn-primary {
    padding: 8px 16px;
    background: linear-gradient(135deg, var(--accent-color), #8b5cf6);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}
.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
}
.btn-secondary.btn-sm {
    padding: 4px 10px;
    font-size: 0.8rem;
}

.toast-overlay {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    padding: 16px 24px;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.95);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, fadeOutUp 0.5s ease-out 3s forwards;
    pointer-events: none;
}

@keyframes slideInRight {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOutUp {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-20px); opacity: 0; visibility: hidden; }
}
