@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&family=Crimson+Text:wght@400;700&family=Montserrat:wght@400;700;800&display=swap');
body {
    font-family: 'Crimson Text';
    background-color: #FBF4E2 rgba(0, 0, 0, 0.5);
    background-image: url('tugu mlg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.welcome-page {
    font-family: 'Crimson text';
    position: relative;
    background-image: url('tugu mlg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    opacity: 1;
    transition: opacity 1s ease-in-out;
}

.welcome-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(103, 65, 44, 0.2); /* #FBF4E2 with opacity */
    backdrop-filter: blur(5px);
    z-index: 1;
}

/* Area Konten Utama */
.main-area {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 20px;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

/* Teks "Selamat datang, Warga!" */
.welcome-text {
    color: #EDE7D7; /* Changed to darker color for better visibility */
    font-size: 27px;
    font-family: crimson text;
    font-weight: 200;
    margin-bottom: 5px;
    margin-top: 10px;
    text-align: center;
    width: 100%;
    position: relative;
    z-index: 2;
    text-shadow: none; /* Removed shadow as it's not needed on light background */
}

h1.welcome-text {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
    .welcome-text {
        font-size: 2.25rem;
    }
}

/* Centered Card/Main Container (Border Tengah) */
.main-content {
    background-color: rgba(237, 231, 215, 0.95); 
    backdrop-filter: blur(5px);
    border-radius: 0.75rem;
    max-width: 90%;
    width: 768px;
    box-sizing: border-box;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Konten Form Login/Card Styling */
.login-card {
    background-color: #EDE7D7; /* Warna krem muda */
    padding: 2.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.login-card-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.title-inventaris {
    color: #404040;
    font-size: 24px;
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
}

@media (min-width: 1024px) { /* breakpoint lg */
    .login-card {
        padding: 2rem;
    }
    .login-card-inner {
        flex-direction: row;
    }
    .form-section {
        width: 50%;
    }
    .image-section {
        width : 30%;
    }
}

/* Kiri: Form Login Section */
.form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Teks "Inventaris Barang RW" */
.title-inventaris {
    font-family: Montserrat;
    color: #9E6767; /* Warna #9E6767 */
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .title-inventaris {
        font-size: 1.875rem;
    }
}

/* Input Field Styling (NIK dan Password) */
.input-group {
    background-color: #FFFFFF; /* Kolom NIK dan Password warna #FFFFFF */
    border: 1px solid #D9D9D9;
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.input-group {
    width: 80%;
    margin: 0 auto;
    background-color: #FFFFFF;
    border: 1px solid #D9D9D9;
    display: flex;
    align-items: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.input-group:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
}

.input-group input {
    width: 70%;
    padding: 0.5rem;
    border-radius: 50px;
    background-color: transparent;
    outline: none;
    border: none;
    font-size: 0.9rem;
}

/* Placeholder dan Teks Input Styling */
.input-group input::placeholder {
    color: #999999; /* Teks "Masukkan NIK anda" warna #999999 */
}

/* Background Profile Icon (D9D9D9) */
.icon-bg {
    background-color: #D9D9D9; /* Background profile di kolom NIK/Password warna #D9D9D9 */
    padding: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-bg img {
    width: 24px;
    height: 24px;
}

.hide-icon {
    cursor: pointer;
}

/* Login Button */
.btn-login {
    background-color: #9E6767;
    color: white;
    font-weight: 0.875rem;
    padding: 0.875rem 2rem;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
    margin-bottom: 50px;
    width: 40%;
    margin-left: auto;
    margin-right: auto;
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: background-color 0.15s ease-in-out;
    cursor: pointer;
    border: none;
}

.btn-login:hover {
    background-color: #875555;
}

/* Kanan: Ilustrasi Animasi Section */
.image-section {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-section img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 0.5rem;
}
.login-card-inner {
    display: flex;
    flex-direction: column; /* default untuk mobile */
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Saat layar besar, ubah jadi kiri-kanan */
@media (min-width: 768px) {
    .login-card-inner {
        flex-direction: row;
        align-items: stretch;
    }
    .form-section {
        width: 55%;
    }
    .image-section {
        width: 45%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .image-section img {
        max-width: 90%;
        height: auto;
        border-radius: 0.75rem;
    }
    /* ===== DASHBOARD ADMIN STYLES ===== */

/* Admin Container */
.admin-container {
    display: none;
    min-height: 100vh;
    background-color: #FBF4E2;
    font-family: 'Inter', sans-serif;
}

/* Header Admin */
.admin-header {
    background: linear-gradient(135deg, #9E6767, #875555);
    color: white;
    padding: 1.5rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Main Content Layout */
.admin-main {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 80px);
}

/* Sidebar Navigation */
.admin-sidebar {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(158, 103, 103, 0.1);
}

.sidebar-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #9E6767;
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    padding: 1rem 1.5rem;
    text-decoration: none;
    color: #555;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border-left: 4px solid transparent;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
}

.nav-item:hover {
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    color: #9E6767;
    border-left-color: #9E6767;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(158, 103, 103, 0.15);
}

.nav-item.active {
    background: linear-gradient(135deg, #9E6767, #875555);
    color: white;
    border-left-color: #6d4a4a;
    box-shadow: 0 6px 20px rgba(158, 103, 103, 0.3);
}

.nav-item.logout {
    color: #dc2626;
    border-left-color: #dc2626;
    margin-top: 1rem;
    background: rgba(220, 38, 38, 0.05);
}

.nav-item.logout:hover {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    border-left-color: #b91c1c;
    transform: translateX(5px);
}

/* Icon dalam navigation */
.nav-icon {
    width: 20px;
    height: 20px;
    opacity: 0.8;
}

.nav-item.active .nav-icon {
    opacity: 1;
    filter: brightness(0) invert(1);
}

/* Content Area */
.admin-content {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(158, 103, 103, 0.1);
}

.content-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 2rem;
    color: #9E6767;
    border-bottom: 3px solid #f0f0f0;
    padding-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
}

/* Admin Data Card */
.admin-card {
    background: linear-gradient(135deg, #fafafa, #f5f5f5);
    border-radius: 16px;
    padding: 2.5rem;
    border-left: 6px solid #9E6767;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.admin-info {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.info-row:hover {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin: 0 -1rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 700;
    color: #666;
    width: 140px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-value {
    color: #333;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    background: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    flex: 1;
}

/* Stats Grid untuk future enhancement */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid #9E6767;
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #9E6767;
    font-family: 'Montserrat', sans-serif;
}

.stat-label {
    color: #666;
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-main {
        grid-template-columns: 250px 1fr;
        gap: 1.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .admin-main {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .admin-sidebar {
        order: 2;
        position: static;
    }
    
    .admin-content {
        order: 1;
    }
    
    .admin-title {
        font-size: 1.5rem;
    }
    
    .sidebar-title,
    .content-title {
        font-size: 1.25rem;
    }
    
    .admin-card {
        padding: 2rem;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .info-label {
        width: auto;
    }
    
    .info-value {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .admin-sidebar,
    .admin-content {
        padding: 1.5rem;
    }
    
    .admin-card {
        padding: 1.5rem;
    }
    
    .nav-item {
        padding: 0.875rem 1rem;
        font-size: 0.9rem;
    }
    
    .content-title {
        font-size: 1.1rem;
    }
    
    .admin-header {
        padding: 1rem 0;
    }
    
    .admin-title {
        font-size: 1.25rem;
    }
}

/* Animation for page transition */
.fade-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

/* Scrollbar Styling */
.admin-sidebar::-webkit-scrollbar,
.admin-content::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track,
.admin-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.admin-sidebar::-webkit-scrollbar-thumb,
.admin-content::-webkit-scrollbar-thumb {
    background: #9E6767;
    border-radius: 10px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover,
.admin-content::-webkit-scrollbar-thumb:hover {
    background: #875555;
}
}
