/* ================================================
   MODERN DASHBOARD CSS - SESUAI SCREENSHOT
   MTsN 7 Aceh Tengah - Sarana Prasarana
   ================================================ */

/* === RESET & BASE STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors dari Screenshot */
    --primary-color: #4ECDC4;
    --primary-dark: #3DBDB5;
    --success-color: #66D19E;
    --danger-color: #FF6B6B;
    --warning-color: #FFB74D;
    --info-color: #64B5F6;
    
    /* Neutral Colors */
    --bg-light: #F8FAFB;
    --bg-white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-gray: #7F8C8D;
    --border-color: #E8ECEF;
    
    /* Sidebar */
    --sidebar-width: 240px;
    --sidebar-collapsed: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    overflow-x: hidden;
}

/* === APP CONTAINER === */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR MODERN === */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #4ECDC4 0%, #44B3AB 100%);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    border-radius: 0 30px 30px 0;
    box-shadow: 4px 0 20px rgba(78, 205, 196, 0.15);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.sidebar-header {
    padding: 12px 0 32px 0;
    text-align: center;
}

.sidebar-header h2 {
    color: white;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

/* === NAVIGATION === */
.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-radius: 16px;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    transform: translateX(5px);
}

.nav-item.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 22px;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    background: linear-gradient(135deg, #4ECDC4 0%, #44B3AB 100%);
    border-radius: 12px;
    color: white;
}

/* === SIDEBAR FOOTER === */
.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

.user-profile img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid white;
}

.user-info {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-name {
    color: white;
    font-size: 13px;
    font-weight: 600;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 24px;
    transition: margin-left 0.3s ease;
}

/* === TOP HEADER === */
.top-header {
    display: flex;
    align-items: center;
    gap: 12px;                    /* Dari 16px → 12px */
    margin-bottom: 15px;
    background: white;
    padding: 12px 18px;           /* Dari 16px 24px → 12px 18px */
    border-radius: 14px;          /* Dari 20px → 14px */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-dark);
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
    transition: background 0.3s;
}

.hamburger-btn:hover {
    background: var(--bg-light);
}

.search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;                     /* Dari 12px → 8px */
    background: var(--bg-light);
    padding: 8px 14px;            /* Dari 12px 20px → 8px 14px */
    border-radius: 10px;          /* Dari 14px → 10px */
    max-width: 320px;             /* Dari 400px → 320px */
}

.search-bar i {
    font-size: 16px;              /* Dari 20px → 16px */
    color: var(--text-gray);
}

.search-bar input {
    border: none;
    background: none;
    outline: none;
    font-size: 13px;              /* Dari 14px → 13px */
    width: 100%;
    color: var(--text-dark);
}

.search-bar input::placeholder {
    color: var(--text-gray);
}

/* === HEADER RIGHT SECTION === */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;                    /* Dari 16px → 10px */
    margin-left: auto;
}

.icon-btn {
    width: 38px;                  /* Dari 44px → 38px */
    height: 38px;
    border-radius: 10px;          /* Dari 12px → 10px */
    border: none;
    background: var(--bg-light);
    color: var(--text-dark);
    font-size: 18px;              /* Dari 22px → 18px */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    position: relative;
}

.icon-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

/* === NOTIFICATION BADGE === */
.notification-badge {
    position: absolute;
    top: -2px;                    /* Dari -4px → -2px */
    right: -2px;
    background: linear-gradient(135deg, #FF6B6B 0%, #EE5A6F 100%);
    color: white;
    font-size: 9px;               /* Dari 10px → 9px */
    font-weight: 700;
    min-width: 16px;              /* Dari 18px → 16px */
    height: 16px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    box-shadow: 0 2px 6px rgba(255, 107, 107, 0.4);
}

/* === USER DROPDOWN === */
.user-dropdown {
    position: relative;
}

.user-avatar-btn {
    width: 38px;                  /* Dari 44px → 38px */
    height: 38px;
    border-radius: 10px;          /* Dari 12px → 10px */
    border: 2px solid var(--primary-color);
    background: white;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
    padding: 0;
}

.user-avatar-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-avatar-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.4);
}

/* === DROPDOWN MENU === */
.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 280px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Triangle pointer */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    right: 16px;
    width: 16px;
    height: 16px;
    background: white;
    transform: rotate(45deg);
    border-radius: 3px;
}

.dropdown-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-header img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
}

.user-details {
    flex: 1;
}

.user-details .user-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.user-role-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 8px;
    text-transform: uppercase;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    cursor: pointer;
    position: relative;
}

.dropdown-item:hover {
    background: var(--bg-light);
}

.dropdown-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s;
}

.dropdown-icon i {
    font-size: 20px;
    color: var(--primary-color);
    transition: all 0.3s;
}

.dropdown-item:hover .dropdown-icon {
    background: var(--primary-color);
    transform: scale(1.05);
}

.dropdown-item:hover .dropdown-icon i {
    color: white;
}

.arrow-right {
    margin-left: auto;
    font-size: 18px;
    color: var(--text-gray);
    transition: all 0.3s;
}

.dropdown-item:hover .arrow-right {
    color: var(--primary-color);
    transform: translateX(3px);
}

/* === RESPONSIVE UPDATES === */
@media (max-width: 640px) {
    .search-bar {
        display: none;
    }
    
    .header-right {
        margin-left: auto;
    }
    
    .dropdown-menu {
        width: 260px;
        right: -20px;
    }
}

@media (max-width: 480px) {
    .icon-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .user-avatar-btn {
        width: 40px;
        height: 40px;
    }
}


/* === DASHBOARD GRID === */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

/* ================================================
   HERO CARD - MODERN REDESIGN
   ================================================ */

.hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafb 100%);
    border-radius: 24px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    margin-bottom: 32px;
    overflow: hidden;
    position: relative;
}

/* Decorative Background Pattern */
.hero-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(78, 205, 196, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    position: relative;
    z-index: 1;
}

/* === HERO TEXT SECTION === */
.hero-text {
    flex: 1;
    max-width: 550px;
}

.hero-title-wrapper {
    position: relative;
    margin-bottom: 24px;
}

.hero-title {
    font-family: 'Playfair Display', 'Cormorant Garamond', serif;
    font-size: 72px;
    font-weight: 900;
    line-height: 0.9;
    margin: 0;
    position: relative;
}

.text-sarana {
    display: block;
    color: var(--primary-color);
    font-size: 78px;
    letter-spacing: 2px;
    text-transform: lowercase;
    background: linear-gradient(135deg, #4ECDC4 0%, #3DBDB5 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 24px rgba(78, 205, 196, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.text-prasarana {
    display: block;
    color: var(--success-color);
    font-size: 78px;
    letter-spacing: 2px;
    text-transform: capitalize;
    background: linear-gradient(135deg, #66D19E 0%, #4CAF50 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-top: -8px;
    animation: fadeInUp 1s ease-out;
}

/* Title Decorations */
.title-decorations {
    position: absolute;
    bottom: -16px;
    left: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.deco-line {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
    border-radius: 2px;
    animation: slideRight 1s ease-out;
}

.deco-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Subtitle */
.hero-subtitle {
    font-size: 16px;
    color: var(--text-gray);
    font-weight: 500;
    line-height: 1.6;
    margin: 32px 0 24px 0;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: fadeIn 1.2s ease-out;
}

.subtitle-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
    flex-shrink: 0;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.1) 0%, rgba(102, 209, 158, 0.1) 100%);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 12px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
    animation: fadeIn 1.4s ease-out;
}

.hero-badge i {
    font-size: 22px;
}

/* === HERO IMAGE SECTION === */
.hero-image-wrapper {
    flex: 1;
    max-width: 700px;
    position: relative;
    animation: float 3s ease-in-out infinite;
}

.hero-3d-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.15));
    position: relative;
    z-index: 2;
    transform: scale(1.5);
}

/* Image Decorations */
.image-decoration {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.deco-circle {
    position: absolute;
    border-radius: 50%;
    opacity: 0.6;
    animation: rotate 20s linear infinite;
}

.circle-1 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.2) 0%, transparent 70%);
    top: 10%;
    right: -10%;
}

.circle-2 {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(102, 209, 158, 0.2) 0%, transparent 70%);
    bottom: 20%;
    left: -5%;
    animation-delay: -5s;
}

.circle-3 {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(78, 205, 196, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 10%;
    animation-delay: -10s;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideRight {
    from {
        width: 0;
        opacity: 0;
    }
    to {
        width: 80px;
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-content-wrapper {
        flex-direction: column;
        gap: 40px;
        text-align: center;
    }
    
    .hero-text {
        max-width: 100%;
    }
    
    .hero-title {
        font-size: 56px;
    }
    
    .text-sarana,
    .text-prasarana {
        font-size: 60px;
    }
    
    .title-decorations {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hero-subtitle {
        justify-content: center;
    }
    
    .hero-image-wrapper {
        max-width: 450px;
    }

    .hero-3d-image {
        transform: scale(1);  /* ← Reset scale di mobile */
        width: 100%;
    }
}

@media (max-width: 768px) {
    .hero-card {
        padding: 32px 24px;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .text-sarana,
    .text-prasarana {
        font-size: 46px;
    }
    .hero-image-wrapper {
        max-width: 350px;  /* ← Lebih kecil lagi di HP */
    }
}

/* ================================================
   QUICK ACTION CARDS - COMPACT WITH OVERFLOW 3D
   ================================================ */

.action-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 32px;
    padding-top: 60px !important; /* ← Tambah space untuk overflow */
}

.action-card {
    position: relative;
    background: white;
    border-radius: 20px;
    padding: 110px 24px 32px 24px !important; /* ← Top padding lebih besar */
    text-decoration: none;
    overflow: visible !important; /* ← PENTING */
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    min-height: 200px; /* ← Tinggi minimum */
}

/* Card Background Effects */
.card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden; /* ← Glow stay inside, tapi wrapper stay visible */
    border-radius: 20px;
}

.card-glow {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0;
    transition: all 0.6s ease;
}

/* Card Content */
.card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ================================================
   ICON 3D OVERFLOW - CENTERED & FIXED
   ================================================ */

.action-icon-wrapper {
    position: absolute !important;
    top: -70px !important; /* ← Keluar 70px ke atas */
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 150px !important; /* ← Lebih besar */
    height: 150px !important;
    z-index: 100 !important; /* ← Z-index tinggi */
}

.action-icon-3d {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-3d-img {
    width: 140px !important; /* ← Gambar besar */
    height: 140px !important;
    object-fit: contain !important;
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.25));
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: block !important;
}


/* ================================================
   CARD TEXT - PROPERLY SPACED
   ================================================ */

.card-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
    margin-top: 0;
}

.card-text h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    transition: all 0.3s;
}

.card-text p {
    font-size: 13px;
    color: var(--text-gray);
    margin: 0;
    line-height: 1.5;
    transition: all 0.3s;
}

/* Arrow Icon - Bottom Right */
.action-arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.action-arrow i {
    font-size: 22px;
    color: white;
}

/* ================================================
   HOVER EFFECTS - IMPROVED
   ================================================ */

/* Inventaris - Purple */
.action-card.inventaris:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.25);
    transform: translateY(-5px);
}

.action-card.inventaris:hover .card-glow {
    opacity: 1;
}

.action-card.inventaris:hover .icon-3d-img {
    transform: scale(1.15) translateY(-10px) rotateY(15deg);
    filter: drop-shadow(0 20px 60px rgba(102, 126, 234, 0.6));
}

.action-card.inventaris:hover .action-arrow {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.action-card.inventaris .card-glow {
    background: radial-gradient(circle, rgba(102, 126, 234, 0.5) 0%, transparent 70%);
    top: -30%;
    left: -30%;
}

/* Proses - Pink */
.action-card.proses:hover {
    border-color: rgba(240, 147, 251, 0.3);
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.25);
    transform: translateY(-5px);
}

.action-card.proses:hover .card-glow {
    opacity: 1;
}

.action-card.proses:hover .icon-3d-img {
    transform: scale(1.15) translateY(-10px) rotate(20deg);
    filter: drop-shadow(0 20px 60px rgba(240, 147, 251, 0.6));
}

.action-card.proses:hover .action-arrow {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.action-card.proses .card-glow {
    background: radial-gradient(circle, rgba(240, 147, 251, 0.5) 0%, transparent 70%);
    top: -30%;
    right: -30%;
}

/* Laporan - Cyan */
.action-card.laporan:hover {
    border-color: rgba(79, 172, 254, 0.3);
    box-shadow: 0 20px 60px rgba(79, 172, 254, 0.25);
    transform: translateY(-5px);
}

.action-card.laporan:hover .card-glow {
    opacity: 1;
}

.action-card.laporan:hover .icon-3d-img {
    transform: scale(1.15) translateY(-10px) rotateY(-15deg);
    filter: drop-shadow(0 20px 60px rgba(79, 172, 254, 0.6));
}

.action-card.laporan:hover .action-arrow {
    opacity: 1;
    transform: translateX(0);
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.action-card.laporan .card-glow {
    background: radial-gradient(circle, rgba(79, 172, 254, 0.5) 0%, transparent 70%);
    bottom: -30%;
    left: 50%;
    transform: translateX(-50%);
}

/* Text Hover Effects */
.action-card:hover .card-text h3 {
    color: var(--primary-color);
    transform: scale(1.05);
}

.action-card:hover .card-text p {
    color: var(--text-dark);
}

/* Float Animation */
@keyframes float-overflow {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

.action-card:hover .icon-3d-img {
    animation: float-overflow 2.5s ease-in-out infinite;
}

/* ================================================
   RESPONSIVE
   ================================================ */

@media (max-width: 1200px) {
    .action-cards {
        padding-top: 45px;
    }
    
    .action-card {
        padding: 90px 20px 28px 20px;
        min-height: 180px;
    }
    
    .action-icon-wrapper {
        width: 120px;
        height: 120px;
        top: -55px;
    }
    
    .icon-3d-img {
        width: 110px;
        height: 110px;
    }
}

@media (max-width: 768px) {
    .action-cards {
        grid-template-columns: 1fr;
        gap: 80px;
        padding-top: 30px;
    }
    
    .action-card {
        padding: 80px 20px 28px 20px;
    }
    
    .action-icon-wrapper {
        top: -50px;
    }
}

@media (max-width: 480px) {
    .action-icon-wrapper {
        width: 110px;
        height: 110px;
        top: -45px;
    }
    
    .icon-3d-img {
        width: 100px;
        height: 100px;
    }
}

/* ==========================================
   CALENDAR WIDGET - ENHANCED
   ========================================== */

.calendar-widget {
    background: white;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.calendar-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-gray);
    font-size: 20px;
}

.calendar-nav-btn:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.weekday-name {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    background: var(--bg-light);
    color: var(--text-dark);
    position: relative;
}

.day.empty {
    background: transparent;
    cursor: default;
}

.day:not(.empty):hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.day.today {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(78, 205, 196, 0.4);
}

.day.holiday {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-weight: 700;
}

.day.cutibersama {
    background: linear-gradient(135deg, #ffd93d 0%, #ffba08 100%);
    color: #333;
    font-weight: 700;
}

.day.weekend {
    color: var(--danger-color);
}

/* Calendar Legend */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-dot.today {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
}

.legend-dot.holiday {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.legend-dot.cutibersama {
    background: linear-gradient(135deg, #ffd93d 0%, #ffba08 100%);
}

.legend-text {
    font-size: 12px;
    color: var(--text-gray);
    font-weight: 500;
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-days {
        gap: 4px;
    }
    
    .day {
        font-size: 12px;
    }
}

/* === SCHEDULE WIDGET === */
.schedule-widget {
    background: white;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

.schedule-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.schedule-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
}

.view-all {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.3s;
}

.view-all:hover {
    color: var(--primary-dark);
}

.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.schedule-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: 16px;
    transition: all 0.3s;
}

.schedule-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.schedule-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: white;
    flex-shrink: 0;
}

.schedule-icon.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.schedule-icon.danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.schedule-content h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.schedule-content p {
    font-size: 12px;
    color: var(--text-gray);
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .action-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .hamburger-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .hero-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
    
    .hero-title {
        font-size: 40px;
    }
    
    .hero-image img {
        max-width: 300px;
        margin-top: 20px;
    }
    
    .search-bar {
        max-width: 100%;
    }
    
    .top-header {
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 16px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .calendar-widget,
    .schedule-widget {
        padding: 20px;
    }
}

/* === ANIMATIONS === */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-card,
.action-card,
.calendar-widget,
.schedule-widget {
    animation: fadeIn 0.6s ease-out;
}

.nav-item {
    animation: slideInRight 0.4s ease-out backwards;
}

.nav-item:nth-child(1) { animation-delay: 0.1s; }
.nav-item:nth-child(2) { animation-delay: 0.15s; }
.nav-item:nth-child(3) { animation-delay: 0.2s; }
.nav-item:nth-child(4) { animation-delay: 0.25s; }
.nav-item:nth-child(5) { animation-delay: 0.3s; }
.nav-item:nth-child(6) { animation-delay: 0.35s; }
.nav-item:nth-child(7) { animation-delay: 0.4s; }

/* ================================================
   MODAL PROFILE POP-UP
   ================================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

/* === MODAL HEADER === */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-light);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.modal-close i {
    font-size: 24px;
    color: var(--text-dark);
}

.modal-close:hover {
    background: var(--danger-color);
}

.modal-close:hover i {
    color: white;
}

/* === MODAL CONTENT === */
.modal-content {
    padding: 32px;
    max-height: calc(90vh - 100px);
    overflow-y: auto;
}

/* Custom Scrollbar */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

/* === PROFILE HEADER SECTION === */
.profile-header-section {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: linear-gradient(135deg, #f8fafb 0%, #ffffff 100%);
    border-radius: 16px;
    margin-bottom: 32px;
}

.profile-avatar-upload {
    position: relative;
}

.profile-avatar-upload img,
.avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    object-fit: cover;
}

.avatar-placeholder {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 32px;
    font-weight: 700;
}

.edit-photo-btn {
    position: absolute;
    bottom: -8px;
    right: -8px;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s;
}

.edit-photo-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.profile-header-info h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.role-text {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    color: white;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    margin-bottom: 8px;
}

.location-text {
    color: var(--text-gray);
    font-size: 14px;
    margin: 0;
}

/* === INFO SECTION === */
.info-section {
    margin-bottom: 32px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.edit-section-btn {
    background: var(--bg-light);
    border: none;
    padding: 8px 16px;
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.edit-section-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* === FORM FIELDS === */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-field,
.form-field-full {
    display: flex;
    flex-direction: column;
}

.form-field-full {
    margin-bottom: 20px;
}

.form-field label,
.form-field-full label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-gray);
    margin-bottom: 8px;
}

.form-field input,
.form-field-full input {
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--bg-light);
    transition: all 0.3s;
}

.form-field input[readonly],
.form-field-full input[readonly] {
    cursor: default;
}

.form-field input.editable,
.form-field-full input.editable {
    background: white;
    border-color: var(--primary-color);
    cursor: text;
}

.form-field input:focus,
.form-field-full input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.1);
}

/* === SAVE BUTTON === */
.save-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--success-color) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    margin-top: 20px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.4);
}

.save-btn i {
    font-size: 20px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .modal-container {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-content {
        padding: 24px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .profile-header-section {
        flex-direction: column;
        text-align: center;
    }
}

.dropdown-item.logout-modern {
    border-top: 1px solid var(--border-color);
    margin-top: 8px;
    background: rgba(255, 107, 107, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 0 0 16px 16px;
    position: relative;
    overflow: hidden;
}

.dropdown-item.logout-modern::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    transform: translate(-50%, -50%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.dropdown-item.logout-modern:hover::before {
    width: 400px;
    height: 400px;
}

.dropdown-item.logout-modern:hover {
    color: white;
}

.logout-icon {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    box-shadow: 0 3px 10px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.logout-icon i {
    color: white !important;
}

.dropdown-item.logout-modern:hover .logout-icon {
    background: white;
    transform: scale(1.05) rotate(5deg);
}

.dropdown-item.logout-modern:hover .logout-icon i {
    color: var(--danger-color) !important;
}

.dropdown-item.logout-modern span {
    position: relative;
    z-index: 1;
}

.dropdown-item.logout-modern .arrow-right {
    position: relative;
    z-index: 1;
}

.dropdown-item.logout-modern:hover .arrow-right {
    color: white;
    transform: translateX(3px);
}

/* ================================================
   HALAMAN PROFIL MADRASAH
   ================================================ */

/* Profil Container - 2 Column Layout */
.profil-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 24px;
    margin-bottom: 32px;
}

/* ===== LEFT SIDEBAR - LOGO & INFO ===== */
.profil-sidebar {
    position: sticky;
    top: 24px;
    height: fit-content;
}

.profil-logo-card {
    background: white;
    border-radius: 20px;
    padding: 32px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-wrapper {
    width: 140px;
    height: 140px;
    border-radius: 20px;
    background: linear-gradient(135deg, #4ECDC4 0%, #44B3AB 100%);
    padding: 16px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(78, 205, 196, 0.3);
}

.logo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.madrasah-info h2 {
    font-size: 18px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.madrasah-info .subtitle {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 12px 0;
}

.madrasah-info .description {
    font-size: 12px;
    color: var(--text-gray);
    line-height: 1.6;
    margin: 0 0 24px 0;
}

.btn-detail {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
}

.btn-detail:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.3);
}

.btn-detail i {
    font-size: 20px;
}

/* ===== RIGHT CONTENT - INFO CARDS ===== */
.profil-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.info-card {
    background: white;
    border-radius: 20px;
    padding: 28px 32px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.card-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
}

.btn-edit {
    padding: 8px 16px;
    background: var(--bg-light);
    color: var(--text-dark);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
}

.btn-edit:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(78, 205, 196, 0.3);
}

.btn-edit i {
    font-size: 16px;
}

/* Info Grid - 2 Columns */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 32px;
    margin-bottom: 24px;
}

.info-item label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #A0AEC0;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.info-item p {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
    margin: 0;
    line-height: 1.5;
}

.info-item p a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s;
}

.info-item p a:hover {
    text-decoration: underline;
    color: var(--primary-dark);
}

/* Social Media Section */
.social-media {
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.social-media label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #A0AEC0;
    margin-bottom: 12px;
}

.social-icons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.social-btn i {
    font-size: 24px;
}

/* Facebook */
.social-btn.facebook {
    background: rgba(24, 119, 242, 0.1);
    color: #1877F2;
    border-color: rgba(24, 119, 242, 0.2);
}

.social-btn.facebook:hover {
    background: #1877F2;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(24, 119, 242, 0.3);
}

/* Instagram */
.social-btn.instagram {
    background: rgba(225, 48, 108, 0.1);
    color: #E1306C;
    border-color: rgba(225, 48, 108, 0.2);
}

.social-btn.instagram:hover {
    background: linear-gradient(135deg, #E1306C 0%, #C13584 50%, #833AB4 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(225, 48, 108, 0.3);
}

/* TikTok */
.social-btn.tiktok {
    background: rgba(0, 0, 0, 0.05);
    color: #000000;
    border-color: rgba(0, 0, 0, 0.1);
}

.social-btn.tiktok:hover {
    background: #000000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* YouTube */
.social-btn.youtube {
    background: rgba(255, 0, 0, 0.1);
    color: #FF0000;
    border-color: rgba(255, 0, 0, 0.2);
}

.social-btn.youtube:hover {
    background: #FF0000;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .profil-container {
        grid-template-columns: 1fr;
    }
    
    .profil-sidebar {
        position: relative;
        top: 0;
    }
    
    .profil-logo-card {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 20px;
    }
    
    .logo-wrapper {
        width: 100px;
        height: 100px;
        margin-bottom: 0;
        flex-shrink: 0;
    }
    
    .madrasah-info {
        flex: 1;
    }
    
    .btn-detail {
        width: auto;
        align-self: flex-start;
    }
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .social-icons {
        grid-template-columns: 1fr;
    }
    
    .info-card {
        padding: 20px 16px;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .btn-edit {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .profil-logo-card {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-wrapper {
        width: 120px;
        height: 120px;
        margin-bottom: 16px;
    }
    
    .btn-detail {
        width: 100%;
    }
}
