/* admin-dashboard.css - Modern Clean Look */
:root {
    --primary-color: #004a99;
    --secondary-color: #d4af37; /* Gold */
    --bg-color: #f4f7f6;
    --sidebar-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border-color: #e0e0e0;
    --success: #27ae60;
    --shadow: 0 4px 6px rgba(0,0,0,0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Poppins', sans-serif; background-color: var(--bg-color); color: var(--text-dark); display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: fixed; height: 100vh;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header { padding: 2rem 1.5rem; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #f0f0f0; }
.sidebar-logo { width: 40px; height: auto; }
.sidebar-title h3 { font-size: 1.1rem; color: var(--primary-color); margin: 0; }
.sidebar-title span { font-size: 0.85rem; color: var(--text-light); }

.nav-links { list-style: none; padding: 1.5rem 1rem; flex: 1; }
.nav-tab-btn {
    width: 100%; display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; border: none; background: none;
    text-align: left; font-size: 0.95rem; color: var(--text-light);
    border-radius: 8px; cursor: pointer; transition: 0.3s;
    font-family: inherit; font-weight: 500; margin-bottom: 5px;
}
.nav-tab-btn:hover { background-color: #f0f7ff; color: var(--primary-color); }
.nav-tab-btn.active { background-color: var(--primary-color); color: white; box-shadow: 0 4px 10px rgba(0, 74, 153, 0.2); }

.sidebar-footer { padding: 1.5rem; border-top: 1px solid #f0f0f0; }
.logout-btn {
    width: 100%; padding: 10px; border: 1px solid #fee; background: #fff5f5;
    color: #e74c3c; border-radius: 8px; cursor: pointer; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s;
}
.logout-btn:hover { background: #e74c3c; color: white; }

/* === MAIN CONTENT === */
.main-content { margin-left: 260px; flex: 1; display: flex; flex-direction: column; transition: margin-left 0.3s; }
.topbar {
    background: white; padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid var(--border-color);
}
.topbar h2 { font-size: 1.25rem; font-weight: 600; }
.user-info { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; font-weight: 600; color: var(--primary-color); }

.content-wrapper { padding: 2rem; }
.management-section { display: none; animation: fadeIn 0.3s ease; }
.management-section.active { display: block; }

/* === DASHBOARD SUMMARY === */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-color), #003366);
    color: white; padding: 2rem; border-radius: 16px;
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2rem; position: relative; overflow: hidden;
}
.banner-img { opacity: 0.1; position: absolute; right: -20px; bottom: -20px; width: 150px; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card {
    background: white; padding: 1.5rem; border-radius: 12px;
    display: flex; align-items: center; gap: 1rem;
    box-shadow: var(--shadow); border: 1px solid white;
}
.icon-box {
    width: 50px; height: 50px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
}
.blue { background: #e6f0ff; color: var(--primary-color); }
.gold { background: #fff8e1; color: var(--secondary-color); }
.green { background: #e8f5e9; color: var(--success); }
.text-box h3 { font-size: 1.5rem; margin: 0; line-height: 1; }
.text-box p { font-size: 0.85rem; color: var(--text-light); margin: 5px 0 0; }

/* === QUICK ACTIONS === */
.section-subtitle { font-size: 1rem; color: var(--text-light); margin-bottom: 1rem; }
.quick-actions-grid { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.quick-btn {
    flex: 1; min-width: 200px; padding: 1.5rem; border: none;
    background: white; border-radius: 12px; cursor: pointer;
    box-shadow: var(--shadow); text-align: left; transition: transform 0.2s;
    border-left: 4px solid var(--primary-color); display: flex; flex-direction: column; gap: 5px;
}
.quick-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.quick-btn i { font-size: 1.8rem; color: var(--primary-color); margin-bottom: 5px; }
.quick-btn span { font-weight: 600; font-size: 1rem; }
.quick-btn small { color: var(--text-light); }
.quick-btn.secondary { border-left-color: var(--secondary-color); }
.quick-btn.secondary i { color: var(--secondary-color); }

/* === TABLES & SECTIONS === */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.primary-btn {
    background: var(--primary-color); color: white; border: none;
    padding: 10px 20px; border-radius: 8px; cursor: pointer;
    font-weight: 500; display: flex; align-items: center; gap: 8px; transition: 0.2s;
}
.primary-btn:hover { background: #003366; }
.table-card { background: white; border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th { text-align: left; padding: 15px; color: var(--text-light); font-weight: 600; border-bottom: 1px solid #eee; font-size: 0.9rem; }
td { padding: 15px; border-bottom: 1px solid #f9f9f9; vertical-align: middle; }
.text-end { text-align: right; }
.btn-action { width: 32px; height: 32px; border-radius: 6px; border: none; cursor: pointer; margin-left: 5px; }
.edit { background: #fff8e1; color: #f39c12; }
.delete { background: #ffebee; color: #e74c3c; }

/* === MODALS & FORMS === */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(4px);
    z-index: 1000; display: flex; justify-content: center; align-items: center;
}
.modal-overlay.hidden { display: none; }
.modal-content {
    background: white; border-radius: 16px; padding: 0;
    max-height: 90vh; display: flex; flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.small-modal { width: 400px; }
.wide-modal { width: 90%; max-width: 1100px; }

.modal-header { padding: 1.5rem; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; }
.modal-body { padding: 2rem; overflow-y: auto; }
.close-modal-btn { background: none; border: none; font-size: 1.5rem; cursor: pointer; }

/* FORM STYLES */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; font-size: 0.9rem; color: #555; }
.form-control {
    width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 6px;
    font-family: inherit; transition: 0.2s;
}
.form-control:focus { border-color: var(--primary-color); outline: none; box-shadow: 0 0 0 3px rgba(0, 74, 153, 0.1); }
.submit-btn {
    background: var(--primary-color); color: white; border: none;
    padding: 12px; border-radius: 8px; cursor: pointer; font-weight: 600; margin-top: 1rem;
}
.full-width { width: 100%; }
.large { padding: 15px 40px; font-size: 1rem; }

/* TPE SPECIFIC GRID FORM */
.form-grid { display: grid; grid-template-columns: 350px 1fr; gap: 2rem; }
.grid-col { display: flex; flex-direction: column; gap: 10px; }
.form-section-title { color: var(--primary-color); border-bottom: 2px solid #eee; padding-bottom: 5px; margin-bottom: 15px; }
.row-2 { display: flex; gap: 10px; }
.row-2 .form-group, .row-2 .liturgy-group { flex: 1; }
.liturgy-group { margin-bottom: 15px; }
.alert-info { background: #e3f2fd; color: #0d47a1; padding: 10px; border-radius: 6px; font-size: 0.85rem; margin-bottom: 1rem; }

/* JADWAL MISA ITEM */
.jadwal-item { display: flex; gap: 5px; margin-bottom: 5px; align-items: center; }
.jadwal-item input { font-size: 0.85rem; padding: 5px; }
.btn-remove { background: #ffeba7; border:none; width: 30px; height: 30px; cursor: pointer; border-radius: 4px; color: #8a6d3b; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* RESPONSIVE */
@media (max-width: 992px) {
    .form-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.active { transform: translateX(0); }
    .main-content { margin-left: 0; }
    #sidebar-toggle { background: none; border: none; font-size: 1.5rem; display: block; }
    .d-md-none { display: block; }
}
.d-md-none { display: none; }
.tox { z-index: 9999 !important; }