@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Minimalist Premium Light Theme (Default) */
    --bg-dark: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.95);
    --border-card: rgba(0, 0, 0, 0.08);
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --primary: #4f46e5;
    --primary-glow: rgba(79, 70, 229, 0.2);
    --accent: #9333ea;
    
    /* Input & UI Elements */
    --bg-input: rgba(255, 255, 255, 0.8);
    --border-hover: rgba(0, 0, 0, 0.15);
    --bg-mobile-menu: rgba(248, 250, 252, 0.95);
    --bg-table-header: rgba(0, 0, 0, 0.03);
    --bg-table-hover: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] {
    /* Dark Theme */
    --bg-dark: #0f1115;
    --bg-card: rgba(255, 255, 255, 0.03);
    --border-card: rgba(255, 255, 255, 0.08);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.4);
    --accent: #a855f7;
    
    /* Input & UI Elements */
    --bg-input: rgba(0, 0, 0, 0.2);
    --border-hover: rgba(255, 255, 255, 0.2);
    --bg-mobile-menu: rgba(15, 17, 21, 0.95);
    --bg-table-header: rgba(255, 255, 255, 0.02);
    --bg-table-hover: rgba(255, 255, 255, 0.03);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Background Effects */
.bg-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite alternate ease-in-out;
}
.bg-glow.right {
    top: auto;
    bottom: -200px;
    left: auto;
    right: -200px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.3) 0%, transparent 70%);
    animation-delay: -5s;
}

@keyframes float {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 5%;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-card);
    position: sticky;
    top: 0;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Hero Section */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    text-align: center;
    padding: 4rem 1rem;
}

.hero-badge {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
    border: 1px solid rgba(99, 102, 241, 0.2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.hero h1 {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    max-width: 600px;
    margin-bottom: 3rem;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-outline {
    background: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: var(--bg-card);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Feature Cards */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 0 5% 5rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    padding: 2.5rem;
    border-radius: 16px;
    backdrop-filter: blur(20px);
    transition: transform 0.4s ease, border-color 0.4s ease;
}

.card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 255, 255, 0.15);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Hamburger Menu Button */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 20;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-mobile-menu);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
        z-index: 15;
        border-left: 1px solid var(--border-card);
        gap: 3rem;
    }

    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        font-size: 1.25rem;
    }

    header {
        padding: 1rem 5%;
    }

    .bg-glow {
        width: 100vw;
        max-width: 400px;
        height: 400px;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 { 
        font-size: clamp(2.5rem, 8vw, 3.5rem); 
        letter-spacing: -1px;
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 2rem;
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .features {
        padding: 0 1.5rem 3rem 1.5rem;
        gap: 1.5rem;
    }

    .dashboard-header {
        padding: 1rem 1.5rem;
    }

    .dashboard-container {
        padding: 1rem 1.5rem;
    }

    .dashboard-header-actions {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions .btn {
        width: 100%;
    }
}

/* Dashboard Layout */
.dashboard-body {
    background-color: var(--bg-dark);
}

.dashboard-header {
    padding: 1rem 5%;
}

.dashboard-container {
    padding: 2rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Dashboard Actions & Forms */
.dashboard-header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.search-box {
    width: 100%;
    max-width: 400px;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border-card);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.form-card {
    margin-bottom: 2rem;
    animation: slideDown 0.3s ease-out;
}

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

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-card);
    padding-bottom: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
    margin-top: 1.5rem;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
}

.error {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-card);
}

/* Data Table */
.table-card {
    padding: 0;
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-card);
}

.data-table th {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-table-header);
}

.data-table tbody tr {
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background: var(--bg-table-hover);
}

.sub-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.unit-badge {
    background: rgba(168, 85, 247, 0.15);
    color: var(--accent);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.condition-baik { background: rgba(16, 185, 129, 0.15); color: #10b981; border: 1px solid rgba(16, 185, 129, 0.3); }
.condition-perbaikan { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border: 1px solid rgba(245, 158, 11, 0.3); }
.condition-rusak { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }

.btn-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.2s ease;
}

.btn-icon:hover {
    color: var(--text-main);
}

.empty-state {
    padding: 4rem 2rem !important;
    color: var(--text-muted);
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    backdrop-filter: blur(20px);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success { border-left: 4px solid #10b981; }
