/* Page Header */
/*
.page-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-success);
}

.header-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--gradient-success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--white);
    box-shadow: var(--shadow-medium);
    animation: pulse 2s ease-in-out infinite;
}

.page-header h1 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.5rem;
    color: var(--dark-gray);
    margin-bottom: 1rem;
}

.header-subtitle {
    font-size: 1.2rem;
    color: var(--gray);
}
*/

/* Flash Messages */
.flash-messages {
    margin-bottom: 2rem;
}

/* Statistics Overview - Solid White Card */
.stats-overview {
    background: var(--white);
    /* Changed from rgba(255, 255, 255, 0.9) */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    margin: 2rem auto 3rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Simple top border accent */
.stats-overview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gold);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.stats-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

.stats-header h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2.2rem;
    color: var(--dark-primary);
    margin-bottom: 1rem;
}

.stats-header p {
    color: var(--gray);
    font-size: 1.1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Stat Cards - Solid Light Gray */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #F8F9FA;
    /* Changed from rgba(52, 73, 94, 0.05) */
    border: 1px solid rgba(52, 73, 94, 0.1);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: #E9ECEF;
    /* Changed from rgba(52, 73, 94, 0.1) */
    transform: translateY(-2px);
}

.stat-card.total {
    border-left: 4px solid var(--dark-primary);
}

.stat-card.stunting {
    border-left: 4px solid var(--kid-pink);
}

.stat-card.normal {
    border-left: 4px solid var(--kid-purple);
}

.stat-card.percentage {
    border-left: 4px solid var(--accent-gold);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--dark-secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--white);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 0.25rem;
}

/* Action Controls - Solid White Card */
.action-controls {
    background: var(--white);
    /* Changed from rgba(255, 255, 255, 0.9) */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 0 auto 3rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Simple top border accent */
.action-controls::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--dark-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.search-filter {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.search-box input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    border: 2px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(241, 196, 15, 0.25);
    transform: translateY(-2px);
}

.filter-box select {
    padding: 1rem 1.5rem;
    border: 2px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-box select:focus {
    outline: none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(241, 196, 15, 0.25);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
}

.btn-action.primary {
    background: var(--accent-gold);
    color: var(--dark-primary);
}

.btn-action.secondary {
    background: var(--kid-blue);
    color: var(--white);
}

.btn-action.danger {
    background: var(--kid-pink);
    color: var(--white);
}

.btn-action:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
}

.inline-form {
    display: inline;
}

/* Result Cards (Mobile) - Simple Design */
/* Result Cards - Solid White */
.result-card {
    background: var(--white);
    /* Changed from rgba(255, 255, 255, 0.9) */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.result-card[data-result="Stunting"]::before {
    background: var(--kid-pink);
}

.result-card[data-result="Normal"]::before {
    background: var(--kid-purple);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(44, 62, 80, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.child-info h4 {
    font-family: 'Fredoka', sans-serif;
    color: var(--dark-primary);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.gender-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
    font-size: 0.9rem;
    font-weight: 500;
}

.gender-badge.male {
    background: var(--dark-primary);
    color: var(--white);
}

.gender-badge.female {
    background: var(--kid-pink);
    color: var(--white);
}

.result-badge {
    padding: 0.8rem 1.2rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-badge.success {
    background: var(--kid-purple);
    color: var(--white);
}

.result-badge.danger {
    background: var(--kid-pink);
    color: var(--white);
}

.card-details {
    margin-bottom: 1.5rem;
}

.detail-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.detail-row:last-child {
    margin-bottom: 0;
}

/* Detail Items - Solid Light Gray */
.detail-item {
    flex: 1;
    padding: 1rem;
    background: #F8F9FA;
    /* Changed from rgba(52, 73, 94, 0.05) */
    border: 1px solid rgba(52, 73, 94, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 500;
}

.detail-item .value {
    font-size: 1rem;
    color: var(--dark-primary);
    font-weight: 600;
    margin-top: 0.25rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(44, 62, 80, 0.1);
}

.date-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray);
    font-size: 0.9rem;
}

.btn-delete {
    background: var(--kid-pink);
    color: var(--white);
    border: none;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #FF1744;
    transform: scale(1.1);
}

.delete-form {
    margin: 0;
}

/* Results Table (Desktop) - Simple Design */
/* Results Table - Solid White */
.results-table {
    background: var(--white);
    /* Changed from rgba(255, 255, 255, 0.9) */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    margin: 0 auto 2rem;
    overflow: hidden;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Simple top border accent */
.results-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--dark-secondary);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

.table-header h3 {
    font-family: 'Fredoka', sans-serif;
    color: var(--dark-primary);
    font-size: 1.8rem;
}

/* Record Count - Solid Background */
.record-count {
    color: var(--gray);
    font-size: 0.9rem;
    background: #F8F9FA;
    /* Changed from rgba(52, 73, 94, 0.1) */
    padding: 0.5rem 1rem;
    border-radius: var(--radius-lg);
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: var(--dark-secondary);
    color: var(--white);
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    border: none;
    font-family: 'Fredoka', sans-serif;
}

tbody td {
    padding: 1rem;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
    vertical-align: middle;
}

/* Table Row Hover - Solid Background */
tbody tr:hover {
    background: #F8F9FA;
    /* Changed from rgba(52, 73, 94, 0.05) */
}

.name-cell {
    display: flex;
    flex-direction: column;
}

.name-cell strong {
    color: var(--dark-primary);
    margin-bottom: 0.25rem;
    font-family: 'Fredoka', sans-serif;
}

.name-cell small {
    color: var(--gray);
}

.data-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.data-cell span {
    font-size: 0.9rem;
    color: var(--dark-primary);
}

.date-cell {
    display: flex;
    flex-direction: column;
}

.date-cell span {
    color: var(--dark-primary);
    font-weight: 500;
}

.date-cell small {
    color: var(--gray);
}

/* Empty State - Solid White */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--white);
    /* Changed from rgba(255, 255, 255, 0.9) */
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(44, 62, 80, 0.1);
    margin-bottom: 2rem;
    position: relative;
}

/* Simple top border accent */
.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gold);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 2rem;
    background: var(--dark-secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--white);
}

.empty-state h3 {
    font-family: 'Fredoka', sans-serif;
    font-size: 2rem;
    color: var(--dark-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    font-size: 1.1rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1.2rem 2.5rem;
    background: var(--accent-gold);
    color: var(--dark-primary);
    border: none;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 700;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

.btn-primary:hover {
    background: #F4D03F;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(241, 196, 15, 0.4);
    color: var(--dark-primary);
}

/* Navigation Actions */
.nav-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    text-decoration: none;
    font-weight: 600;
    font-family: 'Fredoka', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.1);
}

.nav-btn.primary {
    background: var(--kid-blue);
    color: var(--white);
}

.nav-btn.secondary {
    background: var(--white);
    color: var(--dark-primary);
    border: 2px solid var(--dark-primary);
}

.nav-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(44, 62, 80, 0.15);
}

/* Responsive Design */
.mobile-only {
    display: block;
}

.desktop-only {
    display: none;
}

@media (min-width: 992px) {
    .mobile-only {
        display: none;
    }

    .desktop-only {
        display: block;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-overview,
    .action-controls,
    .results-table,
    .empty-state {
        padding: 2.5rem 1.5rem;
    }

    .stats-header h3 {
        font-size: 2rem;
    }

    .table-header h3 {
        font-size: 1.6rem;
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .search-filter {
        flex-direction: column;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .nav-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-btn {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .stats-overview,
    .action-controls,
    .results-table,
    .empty-state {
        padding: 2rem 1.5rem;
        margin: 1.5rem 0;
    }

    .stats-header {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }

    .stats-header h3 {
        font-size: 1.8rem;
    }

    .stats-header p {
        font-size: 1rem;
    }

    .stat-card {
        padding: 1.2rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .stat-number {
        font-size: 1.6rem;
    }

    .stat-label {
        font-size: 0.85rem;
    }

    .action-controls {
        padding: 1.5rem;
    }

    .search-box input {
        padding: 0.9rem 0.9rem 0.9rem 2.8rem;
    }

    .filter-box select {
        padding: 0.9rem 1.2rem;
    }

    .result-card {
        padding: 1.5rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.8rem;
    }

    .child-info h4 {
        font-size: 1.2rem;
    }

    .detail-row {
        flex-direction: column;
        gap: 0.8rem;
    }

    .detail-item {
        padding: 0.9rem;
    }

    .table-header {
        padding: 1.5rem 1.5rem 0.8rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .table-header h3 {
        font-size: 1.4rem;
    }

    .empty-state {
        padding: 2.5rem 1.5rem;
    }

    .empty-icon {
        width: 100px;
        height: 100px;
        font-size: 3.5rem;
    }

    .empty-state h3 {
        font-size: 1.6rem;
    }

    .empty-state p {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {

    /* stats grid - 1 kolom biar lebih rapi di layar kecil */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .stats-overview,
    .action-controls,
    .results-table,
    .empty-state {
        padding: 1.2rem 0.9rem;
        margin: 0.5rem 0;
    }

    .stats-header {
        margin-bottom: 1.2rem;
        padding-bottom: 1rem;
    }

    .stats-header h3 {
        font-size: 1.4rem;
    }

    .stats-header p {
        font-size: 0.9rem;
    }

    .stat-card {
        padding: 0.9rem 0.7rem;
        gap: 0.6rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .stat-number {
        font-size: 1.4rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    /* search & filter */
    .search-box input {
        padding: 0.8rem 0.8rem 0.8rem 2.5rem;
        font-size: 0.9rem;
    }

    .filter-box select {
        padding: 0.8rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }

    /* action buttons */
    .btn-action {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    /* result cards */
    .result-card {
        padding: 1.1rem 1rem;
    }

    .card-header {
        gap: 0.5rem;
    }

    .child-info h4 {
        font-size: 1.05rem;
    }

    .gender-badge {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }

    .result-badge {
        padding: 0.55rem 0.8rem;
        font-size: 0.85rem;
    }

    .detail-row {
        flex-direction: row;
        gap: 0.6rem;
    }

    .detail-item {
        padding: 0.7rem 0.6rem;
    }

    .detail-item .label {
        font-size: 0.75rem;
    }

    .detail-item .value {
        font-size: 0.88rem;
    }

    .date-info {
        font-size: 0.82rem;
    }

    /* empty state */
    .empty-icon {
        width: 75px;
        height: 75px;
        font-size: 2.5rem;
    }

    .empty-state h3 {
        font-size: 1.3rem;
    }

    .empty-state p {
        font-size: 0.9rem;
    }

    .btn-primary {
        width: 100%;
        justify-content: center;
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    /* table header */
    .table-header {
        padding: 1rem 1rem 0.6rem;
    }

    .table-header h3 {
        font-size: 1.2rem;
    }

    /* nav actions */
    .nav-actions {
        gap: 0.6rem;
    }

    .nav-btn {
        padding: 0.85rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* Clean focus states for accessibility */
.btn-action:focus,
.nav-btn:focus,
.btn-primary:focus,
.btn-delete:focus {
    outline: 3px solid rgba(241, 196, 15, 0.5);
    outline-offset: 2px;
}

/* Print styles - Force solid white */
@media print {

    .action-controls,
    .nav-actions {
        display: none;
    }

    .stats-overview,
    .results-table,
    .empty-state,
    .result-card {
        box-shadow: none;
        background: var(--white) !important;
        /* Force solid white for print */
        border: 1px solid #ccc;
    }
}

/* Simple animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease-out both;
}

/* Loading states */
.btn-action:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}
