/* ==========================================
   SI-POSYANDU Cempaka - Main Stylesheet
   Design: Modern, Warm, and Child-Friendly
   Primary: #FF4C70 | Secondary: #0C2B4E
   Accent: #FFF5D6 | Background: #FFFFFF
   Font: Poppins
   ========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    color: #4A4A4A;
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: #0C2B4E;
    transition: all 0.3s ease;
}

a:hover {
    color: #FF4C70;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    color: #0C2B4E;
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 32px; }
h2 { font-size: 28px; }
h3 { font-size: 24px; }
h4 { font-size: 20px; }
h5 { font-size: 18px; }
h6 { font-size: 16px; }

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: #0C2B4E;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    border-radius: 2px;
}

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* ===== NAVBAR ===== */
.navbar {
    background: #FFFFFF;
    box-shadow: 0 2px 20px rgba(12, 43, 78, 0.08);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 24px;
    font-weight: 800;
    color: #0C2B4E;
    display: flex;
    align-items: center;
}

.navbar-brand span {
    color: #FF4C70;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.navbar-menu a {
    color: #0C2B4E;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #FF4C70;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.navbar-menu a:hover::after,
.navbar-menu a.active::after {
    width: 100%;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: #FF4C70;
}

.btn-login-nav {
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    color: white !important;
    padding: 10px 25px !important;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-login-nav:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 76, 112, 0.3);
}

.btn-login-nav::after {
    display: none !important;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.navbar-toggle span {
    width: 25px;
    height: 3px;
    background: #0C2B4E;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Dropdown Profile */
.profile-dropdown {
    position: relative;
    cursor: pointer;
}

.profile-dropdown .profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    border-radius: 50px;
    border: 2px solid #eef1f6;
    transition: all 0.3s ease;
}

.profile-dropdown .profile-trigger:hover {
    border-color: #FF4C70;
}

.profile-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.dropdown-menu {
    position: absolute;
    top: 110%;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(12, 43, 78, 0.15);
    min-width: 220px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.profile-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 10px;
    color: #4A4A4A;
    font-size: 14px;
    font-weight: 500;
}

.dropdown-menu a:hover {
    background: #FFF5D6;
    color: #0C2B4E;
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
    color: #FF4C70;
}

.dropdown-divider {
    height: 1px;
    background: #eef1f6;
    margin: 5px 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 30px;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    color: white;
    box-shadow: 0 5px 20px rgba(255, 76, 112, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 8px 30px rgba(255, 76, 112, 0.35);
    color: white;
}

.btn-secondary {
    background: #0C2B4E;
    color: white;
}

.btn-secondary:hover {
    background: #153e6b;
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #FF4C70;
    color: #FF4C70;
}

.btn-outline:hover {
    background: #FF4C70;
    color: white;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 12px;
}

.btn-lg {
    padding: 15px 40px;
    font-size: 16px;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    color: white;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    color: white;
}

.btn-warning {
    background: #ffc107;
    color: #0C2B4E;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, #FFF5D6 0%, #ffffff 50%, #f8f9fa 100%);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 76, 112, 0.05) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    color: #0C2B4E;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-content h1 span {
    color: #FF4C70;
    position: relative;
}

.hero-content p {
    font-size: 16px;
    color: #6c757d;
    margin-bottom: 30px;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
}

.hero-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 120px;
    opacity: 0.9;
    animation: morphing 10s ease-in-out infinite;
}

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    25% { border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%; }
    50% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
    75% { border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%; }
    100% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
}

/* ===== STATS COUNTER ===== */
.stats-counter {
    max-width: 1200px;
    margin: -50px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 10;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(12, 43, 78, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(12, 43, 78, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 24px;
}

.stat-icon.pink {
    background: rgba(255, 76, 112, 0.1);
    color: #FF4C70;
}

.stat-icon.blue {
    background: rgba(12, 43, 78, 0.1);
    color: #0C2B4E;
}

.stat-icon.green {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: #0C2B4E;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* ===== CARDS ===== */
.card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(12, 43, 78, 0.06);
    border: 1px solid #eef1f6;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 10px 40px rgba(12, 43, 78, 0.1);
}

.card-header {
    padding-bottom: 15px;
    border-bottom: 1px solid #eef1f6;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h5 {
    font-size: 18px;
    font-weight: 700;
    margin: 0;
}

/* ===== ARTICLES SECTION ===== */
.articles-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(12, 43, 78, 0.06);
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(12, 43, 78, 0.1);
}

.article-image {
    height: 200px;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: white;
}

.article-image.gizi {
    background: linear-gradient(135deg, #28a745, #20c997);
}

.article-image.imun {
    background: linear-gradient(135deg, #0C2B4E, #2c5f8a);
}

.article-image.tumbuh {
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
}

.article-body {
    padding: 25px;
}

.article-body h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.article-body p {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    padding: 80px 0;
    background: white;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-item {
    border: 1px solid #eef1f6;
    border-radius: 15px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #FF4C70;
}

.faq-question {
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    color: #0C2B4E;
    font-size: 15px;
}

.faq-question .faq-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #FFF5D6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FF4C70;
    font-size: 18px;
    font-weight: 700;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question .faq-icon {
    background: #FF4C70;
    color: white;
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 25px 20px;
    max-height: 300px;
}

.faq-answer p {
    color: #6c757d;
    line-height: 1.8;
}

/* ===== FOOTER ===== */
.footer {
    background: #0C2B4E;
    color: white;
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: white;
    font-size: 22px;
    margin-bottom: 15px;
}

.footer-brand h3 span {
    color: #FF4C70;
}

.footer-brand p {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    line-height: 1.8;
}

.footer h4 {
    color: white;
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #FF4C70;
    padding-left: 5px;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    margin-bottom: 12px;
}

.footer-contact i {
    color: #FF4C70;
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 25px;
    text-align: center;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #0C2B4E;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 2px solid #eef1f6;
    border-radius: 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #4A4A4A;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: #FF4C70;
    box-shadow: 0 0 0 4px rgba(255, 76, 112, 0.1);
}

.form-control.error {
    border-color: #dc3545;
}

select.form-control {
    cursor: pointer;
    appearance: auto;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-error {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alert-info {
    background: rgba(12, 43, 78, 0.1);
    color: #0C2B4E;
    border: 1px solid rgba(12, 43, 78, 0.2);
}

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #FFF5D6;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    color: #0C2B4E;
    font-size: 13px;
    white-space: nowrap;
}

.table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eef1f6;
    font-size: 14px;
    color: #4A4A4A;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* ===== BADGE ===== */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.badge-info {
    background: rgba(12, 43, 78, 0.1);
    color: #0C2B4E;
}

.badge-primary {
    background: rgba(255, 76, 112, 0.1);
    color: #FF4C70;
}

/* ===== AUTH PAGE ===== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #FFF5D6 0%, #ffffff 50%, #f8f9fa 100%);
    padding: 20px;
}

.auth-container {
    background: white;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(12, 43, 78, 0.1);
    width: 100%;
    max-width: 450px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(135deg, #FF4C70, #ff7a94, #0C2B4E);
}

.auth-header {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 30px;
    color: white;
    font-weight: 800;
}

.auth-header h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.auth-header p {
    color: #6c757d;
    font-size: 14px;
}

/* ===== DASHBOARD COMMON ===== */
.dashboard-page {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Toggle Button (mobile only) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 99;
    width: 45px;
    height: 45px;
    background: #FF4C70;
    border-radius: 12px;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(255, 76, 112, 0.3);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 76, 112, 0.4);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 43, 78, 0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
}

/* Sidebar Close Button (mobile only) */
.sidebar-close {
    display: none;
    width: 35px;
    height: 35px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sidebar-close:hover {
    background: rgba(255,255,255,0.25);
}

.sidebar {
    width: 260px;
    background: #0C2B4E;
    padding: 25px;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 20px;
    font-weight: 800;
}

.sidebar-logo span {
    color: #FF4C70;
}

.sidebar-menu {
    flex: 1;
}

.sidebar-menu .menu-label {
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 15px;
    display: block;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.7);
    padding: 12px 15px;
    border-radius: 12px;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-menu a.active {
    background: #FF4C70;
    color: white;
}

.sidebar-menu a i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 25px 30px;
    background: #f8f9fa;
    min-height: 100vh;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(12, 43, 78, 0.05);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: #0C2B4E;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6c757d;
}

.breadcrumb a {
    color: #6c757d;
}

.breadcrumb a:hover {
    color: #FF4C70;
}

.breadcrumb .separator {
    color: #ccc;
}

/* Top-bar Actions */
.top-bar-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.top-bar-actions .search-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
    min-width: 200px;
}

.top-bar-actions .search-form .form-group {
    flex: 1;
    min-width: 0;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    flex: 1;
    min-width: 120px;
}

/* ===== DASHBOARD STATS ===== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: white;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 5px 25px rgba(12, 43, 78, 0.06);
}

.stat-icon-box {
    width: 55px;
    height: 55px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-info h4 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 5px;
}

.stat-info p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
}

/* ===== MODAL ===== */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(12, 43, 78, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 25px;
    padding: 35px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(12, 43, 78, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 700;
}

.modal-close {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: #f8f9fa;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #FF4C70;
    color: white;
}

/* ===== CHART CONTAINER ===== */
.chart-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 5px 25px rgba(12, 43, 78, 0.06);
}

/* ===== E-KMS SECTION ===== */
.ekms-section {
    padding: 80px 0;
}

.ekms-card {
    background: white;
    border-radius: 25px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(12, 43, 78, 0.08);
}

/* ===== PROFILE SECTION ===== */
.profile-section {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
}

.profile-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(12, 43, 78, 0.06);
}

.profile-avatar-large {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF4C70, #ff7a94);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 40px;
    color: white;
    font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .profile-section {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image-wrapper {
        width: 300px;
        height: 300px;
        margin: 0 auto;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .articles-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

}

@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
    }
    
    .hero-image {
        order: -1;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 10px 40px rgba(12, 43, 78, 0.1);
    }

    .navbar-menu.active {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .hero-container {
        padding: 0 15px;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-image-wrapper {
        width: 250px;
        height: 250px;
    }

    .section-title {
        font-size: 22px;
    }

    .auth-container {
        padding: 35px 25px;
    }

    .stat-item {
        padding: 20px;
    }

    .dashboard-stats {
        grid-template-columns: 1fr;
    }

    .ekms-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 15px;
    }

    .navbar-brand {
        font-size: 18px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }

    .auth-container {
        padding: 30px 20px;
    }
    .auth-header h2 {
        font-size: 20px;
    }
    .auth-logo {
        width: 60px;
        height: 60px;
        font-size: 24px;
    }
    .modal-content {
        padding: 25px;
    }
}

/* ===== RESPONSIVE DASHBOARD ===== */

/* Untuk layar 992px ke bawah - sidebar tetap tapi main-content full width */
@media (max-width: 992px) {
    .sidebar {
        width: 260px;
    }
    .main-content {
        margin-left: 0;
        padding: 25px 20px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 280px;
        left: -300px;
        z-index: 100;
    }
    .sidebar.active {
        left: 0;
    }
    .sidebar-close {
        display: flex;
    }
    .sidebar-overlay {
        display: block;
        pointer-events: none;
    }
    .sidebar-overlay.active {
        pointer-events: auto;
    }
    .sidebar-toggle {
        display: flex;
    }
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
        padding-top: 75px;
    }
    .top-bar {
        padding: 12px 18px;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    .top-bar > div:first-child {
        width: 100%;
    }
    .top-bar > div:last-child {
        width: 100%;
        justify-content: flex-start;
    }
    .page-title {
        font-size: 17px;
    }
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    .row[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .stat-item {
        padding: 18px;
    }
    .sidebar-menu a {
        padding: 10px 14px;
        font-size: 13px;
    }
    /* Top-bar responsive for search forms */
    .top-bar form {
        width: 100%;
    }
    .top-bar .form-group {
        flex: 1;
        min-width: 0;
    }
    .top-bar .form-control {
        width: 100% !important;
    }
    .top-bar .btn {
        flex-shrink: 0;
    }
    /* Top-bar actions responsive */
    .top-bar-actions {
        width: 100%;
        flex-wrap: wrap;
    }
    .top-bar-actions .search-form {
        width: 100%;
        min-width: 0;
    }
    .top-bar-actions .search-form .form-group {
        flex: 1;
    }
    /* Filter form responsive */
    .filter-form {
        width: 100%;
    }
    .filter-form .form-group {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 15px 12px;
        padding-top: 70px;
    }
    .sidebar {
        width: 100%;
        left: -105%;
    }
    .sidebar.active {
        left: 0;
    }
    .top-bar {
        padding: 10px 15px;
    }
    .page-title {
        font-size: 15px;
    }
    .card {
        padding: 18px;
    }
    .chart-container {
        padding: 18px;
    }
    /* Modal responsive */
    .modal-content {
        padding: 20px 15px;
        border-radius: 15px;
    }
    .modal-header h3 {
        font-size: 18px;
    }
    /* Table responsive - allow horizontal scroll */
    .table th,
    .table td {
        padding: 8px 10px;
        font-size: 12px;
    }
    .table th {
        font-size: 11px;
    }
}

/* ===== TABLE RESPONSIVE ===== */
@media (max-width: 768px) {
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .table th {
        font-size: 12px;
    }
}

/* ===== MODAL RESPONSIVE ===== */
@media (max-width: 576px) {
    .modal-content {
        padding: 20px 15px;
        max-width: 95%;
    }
    .modal-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* ===== ANIMATIONS ===== */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-up {
    animation: slideUp 0.5s ease-in-out;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.p-20 { padding: 20px; }
.gap-10 { gap: 10px; }
.gap-20 { gap: 20px; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.w-100 { width: 100%; }

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #eef1f6;
    border-top-color: #FF4C70;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Page loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.page-loader .loader-content {
    text-align: center;
}

.page-loader .loader-content h4 {
    margin-top: 20px;
    color: #0C2B4E;
    font-size: 16px;
}