/* ===== RESET & BASE ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Teduh / Calm Serene Palette (Sage & Soft Teal) */
    --color-primary: #6B9080;
    --color-primary-light: #A4C3B2;
    --color-primary-dark: #4A6B5D;
    --color-accent: #CCE3DE;
    --color-accent-light: #EDF5F3;
    --color-bg: #F7F9F9;
    --color-bg-card: #FFFFFF;
    --color-text: #2F3E38;
    --color-text-muted: #6C8279;
    --color-border: #D6E4DF;
    --color-gold: #D4A373;
    
    --shadow-sm: 0 1px 3px rgba(107, 144, 128, 0.08);
    --shadow-md: 0 4px 12px rgba(107, 144, 128, 0.1);
    --shadow-lg: 0 10px 25px rgba(107, 144, 128, 0.12);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --font-main: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --max-width: 960px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100vh;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--color-primary-dark);
}

/* ===== HEADER / HERO ===== */
.hero {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
    text-align: center;
    padding: 80px 20px 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.bismillah {
    font-size: 1.5rem;
    margin-bottom: 16px;
    opacity: 0.9;
    font-family: 'Traditional Arabic', 'Amiri', serif;
    letter-spacing: 1px;
}

.profile-photo {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.hero .subtitle {
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 300;
}

/* ===== MAIN CONTENT ===== */
.container {
    max-width: var(--max-width);
    margin: -40px auto 40px;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* ===== TAB NAVIGATION ===== */
.tab-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 6px;
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
    position: sticky;
    top: 16px;
    z-index: 50;
    scrollbar-width: none; /* Firefox */
}

.tab-nav::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:hover {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
}

.tab-btn.active {
    background: var(--color-primary);
    color: #FFFFFF;
    box-shadow: 0 4px 12px rgba(107, 144, 128, 0.25);
}

/* ===== TAB CONTENT ===== */
.tab-content {
    display: none;
    animation: fadeIn 0.35s ease forwards;
}

.tab-content.active {
    display: block;
}

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

/* ===== SECTION CARDS ===== */
.section {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px;
    margin-bottom: 24px;
    border: 1px solid var(--color-border);
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-accent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title .icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--color-accent-light);
    border-radius: 10px;
}

/* ===== DATA GRID ===== */
.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.data-item {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--color-bg);
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.data-item:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

.data-item:last-child {
    border-bottom: none;
}

.data-item.full {
    grid-column: 1 / -1;
}

.data-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.data-value {
    font-size: 1rem;
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.5;
}

/* ===== TEXT BLOCKS ===== */
.text-block {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* ===== TAGS / HOBBIES ===== */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    padding: 0;
}

.tag {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
    padding: 8px 16px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid var(--color-accent);
    transition: all 0.2s ease;
}

.tag:hover {
    background: var(--color-accent);
    transform: translateY(-1px);
}

/* ===== KRITERIA CARD ===== */
.kriteria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
}

.kriteria-item {
    background: var(--color-bg);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    transition: all 0.2s ease;
}

.kriteria-item:hover {
    border-color: var(--color-primary-light);
    background: var(--color-accent-light);
}

.kriteria-item .data-label {
    margin-bottom: 8px;
    color: var(--color-primary);
}

/* ===== QURAN VERSE ===== */
.verse-box {
    text-align: center;
    padding: 32px 24px;
    background: linear-gradient(135deg, var(--color-accent-light) 0%, var(--color-bg) 100%);
    border-radius: var(--radius-lg);
    margin-bottom: 32px;
    border: 1px solid var(--color-accent);
}

.verse-arabic {
    font-size: 1.75rem;
    line-height: 2.2;
    color: var(--color-primary-dark);
    margin-bottom: 16px;
    font-family: 'Traditional Arabic', 'Amiri', serif;
}

.verse-translation {
    font-size: 1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto 12px;
    font-style: italic;
    line-height: 1.6;
}

.verse-source {
    font-size: 0.875rem;
    color: var(--color-primary);
    font-weight: 600;
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding: 30px 20px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.footer a {
    color: var(--color-primary);
}

/* ===== ADMIN ===== */
.admin-wrapper {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    font-size: 1.6rem;
    color: var(--color-primary);
}

.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ===== LOGIN FORM ===== */
.login-card {
    background: var(--color-bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 40px;
    max-width: 420px;
    margin: 80px auto;
    text-align: center;
}

.login-card h2 {
    color: var(--color-primary);
    margin-bottom: 8px;
}

.login-card p {
    color: var(--color-text-muted);
    margin-bottom: 24px;
    font-size: 0.95rem;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-family: var(--font-main);
    color: var(--color-text);
    background: var(--color-bg-card);
    transition: all 0.2s ease;
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    border-color: var(--color-primary-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.alert {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* ===== ADMIN FORM SECTIONS ===== */
.admin-section {
    background: var(--color-bg-card);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid var(--color-border);
}

.admin-section h3 {
    font-size: 1.1rem;
    color: var(--color-primary);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-accent-light);
}

.admin-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 600px) {
    .hero {
        padding: 48px 16px 72px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .profile-photo {
        width: 110px;
        height: 110px;
        font-size: 2.5rem;
    }

    .section {
        padding: 24px 18px;
    }

    .data-grid,
    .kriteria-grid {
        grid-template-columns: 1fr;
    }

    .admin-form-grid {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 32px 24px;
        margin: 40px auto;
    }

    .verse-arabic {
        font-size: 1.3rem;
    }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }

/* ===== ANIMATION ===== */
.section {
    animation: fadeUp 0.5s ease forwards;
    opacity: 0;
}

.section:nth-child(1) { animation-delay: 0.1s; }
.section:nth-child(2) { animation-delay: 0.2s; }
.section:nth-child(3) { animation-delay: 0.3s; }
.section:nth-child(4) { animation-delay: 0.4s; }
.section:nth-child(5) { animation-delay: 0.5s; }
.section:nth-child(6) { animation-delay: 0.6s; }

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