/* ==========================================
   CSS Variables & Design Tokens
   ========================================== */
:root {
    --primary-grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-grad: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --bg-grad: radial-gradient(circle at top right, #1e1b4b 0%, #0f0a1c 60%, #020005 100%);
    
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-bg: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.18);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --accent-cyan: #06b6d4;
    --accent-purple: #a78bfa;
    --accent-pink: #f472b6;
    
    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --shadow-glow: 0 0 20px rgba(124, 58, 237, 0.3);
    
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ==========================================
   Reset & Base Styles
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background: #090514;
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

/* Dynamic Glowing Background Circles */
.glass-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-grad);
    z-index: -2;
}

.glass-bg::before, .glass-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
    z-index: -1;
}

.glass-bg::before {
    width: 400px;
    height: 400px;
    background: #4f46e5;
    top: -100px;
    left: -100px;
}

.glass-bg::after {
    width: 500px;
    height: 500px;
    background: #06b6d4;
    bottom: -150px;
    right: -100px;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Screen reader only utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ==========================================
   Typography & Headers
   ========================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* ==========================================
   Header Section
   ========================================== */
.header {
    padding: 30px 0;
    border-bottom: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(9, 5, 20, 0.5);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.logo-area h1 {
    font-size: 1.8rem;
    background: linear-gradient(to right, #ffffff, var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-tagline {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--accent-cyan);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(6, 182, 212, 0.1);
    padding: 6px 16px;
    border-radius: 50px;
    border: 1px solid rgba(6, 182, 212, 0.2);
}

/* ==========================================
   Common Glassmorphism Card
   ========================================== */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease, 
                background-color 0.4s ease;
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    padding: 50px;
    margin-top: 40px;
    margin-bottom: 50px;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-text h2 {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 30%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 35px;
    max-width: 600px;
}

.quick-stats {
    display: flex;
    gap: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-cyan);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 4px;
    letter-spacing: 0.05em;
}

.hero-img-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.hero-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-glow);
    border: 2px solid rgba(255, 255, 255, 0.1);
    transform: rotate(2deg);
    transition: transform 0.5s ease;
}

.hero-section:hover .hero-img {
    transform: rotate(0deg) scale(1.03);
}

/* ==========================================
   Section Titles & Typography
   ========================================== */
.section-title {
    margin-bottom: 30px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title p {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* ==========================================
   Piket Minggu Ini (Highlight)
   ========================================== */
.current-week-section {
    margin-bottom: 60px;
}

.current-week-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.task-card {
    padding: 30px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 240px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.task-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--accent-grad);
}

.task-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.task-card:hover .task-icon {
    transform: scale(1.2) translateY(-5px);
}

.task-card h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.task-person {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ffffff 0%, var(--accent-purple) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.task-card:hover {
    transform: translateY(-8px);
    background: var(--card-hover-bg);
    border-color: var(--card-hover-border);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

/* Loading display */
.loading {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* ==========================================
   Filter & Search Area
   ========================================== */
.filter-section {
    padding: 40px;
    margin-bottom: 60px;
}

.filter-header {
    margin-bottom: 25px;
}

.filter-header h2 {
    font-size: 1.8rem;
    margin-bottom: 6px;
}

.filter-header p {
    color: var(--text-secondary);
}

.filter-controls {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 30px;
}

.custom-select {
    flex-grow: 1;
    background: rgba(9, 5, 20, 0.6);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    padding: 14px 20px;
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 500;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg fill='white' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 20px;
    padding-right: 45px;
}

.custom-select:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.3);
}

.btn {
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--card-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

/* Filter Results Display */
.personal-schedule-area {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid var(--card-border);
    animation: fadeIn 0.5s ease;
}

.personal-schedule-area.hidden {
    display: none;
}

#personal-title {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--accent-cyan);
}

.personal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.personal-card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px solid var(--card-border);
    transition: all 0.3s ease;
}

.personal-card:hover {
    background: rgba(6, 182, 212, 0.05);
    border-color: rgba(6, 182, 212, 0.3);
    transform: translateY(-3px);
}

.personal-card .date {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.05rem;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.personal-card .task-detail {
    font-size: 0.95rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.personal-card .task-icon-small {
    font-size: 1.25rem;
}

/* ==========================================
   Complete Schedule Grid (by Months)
   ========================================== */
.schedule-section {
    margin-bottom: 80px;
}

.month-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 35px;
    padding: 6px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 50px;
    border: 1px solid var(--card-border);
    max-width: max-content;
}

.month-btn {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    padding: 10px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
}

.month-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
}

.month-btn.active {
    background: var(--primary-grad);
    color: #fff;
    box-shadow: var(--shadow-glow);
}

/* Cards grid per month */
.full-schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.month-group-card {
    padding: 30px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.month-group-card.active-month {
    border-color: var(--accent-purple);
    box-shadow: 0 0 25px rgba(124, 58, 237, 0.15);
    background: rgba(124, 58, 237, 0.03);
}

.month-group-title {
    font-size: 1.5rem;
    color: var(--accent-purple);
    margin-bottom: 20px;
    border-bottom: 2px solid rgba(167, 139, 250, 0.2);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.month-group-title .active-badge {
    font-size: 0.75rem;
    text-transform: uppercase;
    background: var(--accent-purple);
    color: #1e1b4b;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 50px;
    letter-spacing: 0.05em;
}

.weeks-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.week-row-card {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-sm);
    padding: 20px;
    transition: all 0.3s ease;
}

.week-row-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    transform: scale(1.01);
}

.week-row-card.highlight-week {
    border-color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.05);
    box-shadow: 0 0 15px rgba(6, 182, 212, 0.15);
    position: relative;
    overflow: hidden;
}

.week-row-card.highlight-week::after {
    content: 'MINGGU INI';
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--accent-cyan);
    color: #0f0a1c;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.week-row-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 14px;
}

.week-date {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
}

.week-jobs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.job-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    padding: 4px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.03);
}

.job-row:last-child {
    border-bottom: none;
}

.job-title {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.job-assignee {
    font-weight: 700;
    color: var(--text-primary);
}

.job-assignee.highlighted-name {
    color: var(--accent-cyan);
    background: rgba(6, 182, 212, 0.15);
    padding: 2px 8px;
    border-radius: 4px;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

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

/* ==========================================
   Footer
   ========================================== */
.footer-bottom {
    background: rgba(9, 5, 20, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--card-border);
    padding: 30px 0;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================
   Rules & Staff Section Styles
   ========================================== */
.rules-section {
    padding: 50px;
    margin-bottom: 60px;
}

.rules-header {
    margin-bottom: 35px;
}

.rules-header h2 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: #fff;
}

.rules-header p {
    color: var(--text-secondary);
}

.rules-content {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 50px;
}

.rules-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rules-list li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.rule-num {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.25);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--accent-cyan);
    flex-shrink: 0;
    margin-top: 1px;
    box-shadow: 0 0 10px rgba(6, 182, 212, 0.1);
}

.rule-text {
    font-size: 0.98rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.badge-denda {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.staff-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.staff-sidebar h3 {
    font-size: 1.3rem;
    color: var(--accent-purple);
    border-bottom: 2px solid rgba(167, 139, 250, 0.15);
    padding-bottom: 12px;
}

.staff-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.staff-list li {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.staff-list li:hover {
    background: rgba(124, 58, 237, 0.05);
    border-color: rgba(124, 58, 237, 0.25);
    transform: translateX(5px);
}

.staff-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary-grad);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 800;
    box-shadow: var(--shadow-glow);
}

.staff-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: 0.02em;
    color: #fff;
}

.rules-warning-box {
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 20px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.warning-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.rules-warning-box p {
    font-size: 0.88rem;
    color: #fcd34d;
    line-height: 1.5;
}

/* ==========================================
   Responsive Design (Media Queries)
   ========================================== */
@media (max-width: 992px) {
    .hero-section {
        grid-template-columns: 1fr;
        padding: 40px;
        gap: 30px;
    }
    
    .hero-img-container {
        order: -1;
    }
    
    .hero-img {
        max-height: 200px;
        width: 100%;
        object-fit: cover;
    }

    .rules-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .hero-text h2 {
        font-size: 2rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .btn {
        width: 100%;
    }
    
    .month-nav {
        border-radius: 16px;
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .rules-section {
        padding: 30px;
    }
}
