/* ========================================
   GLOBAL ACTION ICONS STYLING
   ======================================== */

/* Base action icon styling */
.action-icon {
    font-size: 18px;
    text-decoration: none;
    display: inline-block;
    margin: 0 3px;
    transition: all 0.2s ease;
}

.action-icon:hover {
    transform: scale(1.2);
    text-decoration: none;
}

/* Specific action types */
.action-update {
    color: #665EB6;
    cursor: pointer;
}

.action-update:hover {
    color: #5549a3;
}

.action-delete {
    color: #dc3545;
}

.action-delete:hover {
    color: #c82333;
}

.action-view {
    color: #17a2b8;
}

.action-view:hover {
    color: #138496;
}

.action-print {
    color: #6c757d;
}

.action-print:hover {
    color: #5a6268;
}

.action-qrcode {
    color: #28a745;
}

.action-qrcode:hover {
    color: #218838;
}

.action-qrcode-red {
    color: #dc3545;
}

.action-qrcode-red:hover {
    color: #c82333;
}

.action-qrcode-blue {
    color: #007bff;
}

.action-qrcode-blue:hover {
    color: #0056b3;
}

/* GridView action column styling */
.grid-view .action-column {
    white-space: nowrap;
}

.grid-view .action-column a {
    margin: 0 5px;
}

/* ========================================
   GLOBAL BUTTON STYLING
   ======================================== */

/* Purple button global styling */
.btn-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white !important;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    color: white !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-purple:active {
    transform: translateY(0);
}

/* Kembali banner button */
.btn-kembali-banner {
    background: white !important;
    border: 1px solid white !important;
    color: #7a3a60 !important;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 15px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-kembali-banner:hover {
    background: #f8f9fa !important;
    transform: translateX(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* ========================================
   GLOBAL DELUXE MAROON THEME
   ======================================== */

:root {
    --primary-maroon: #7b365d;
    --secondary-maroon: #a7527f;
    --accent-gold: #c5a059;
    --text-dark: #2d3436;
    --bg-light: #f8f9fa;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
}

body,
body.index-page {
    background-color: #ffffff !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    margin: 0;
    padding: 0;
}

/* Main Module Container Card */
.dashboard-card {
    background: #fff;
    border-radius: 20px;
    border: none;
    box-shadow: 0 10px 30px rgba(122, 58, 96, 0.08);
    margin-bottom: 30px;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Deluxe style for main module pages (Quiz, Academic, etc.) */
.container .dashboard-card,
.container-fluid .dashboard-card {
    border-radius: 30px;
    padding: 20px 30px;
    overflow: visible;
    /* Allow banner shadow to show */
}



.announcement-banner {
    background: linear-gradient(135deg, var(--primary-maroon) 0%, var(--secondary-maroon) 100%);
    padding: 15px 30px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none;
    border-radius: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(122, 58, 96, 0.15);
}

.announcement-banner h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white !important;
}

/* GridView Modern Styling */
.table {
    border-collapse: separate;
    border-spacing: 0 10px;
    margin-top: -10px;
}

.table thead th {
    background: transparent;
    border: none !important;
    color: #8395a7 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 15px 20px;
}

.table thead th a {
    color: inherit !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

.table thead th a:hover {
    color: var(--primary-maroon) !important;
}

.table tbody tr {
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
}

.table tbody tr td {
    background: #fff !important;
    border: none !important;
    padding: 18px 20px;
    vertical-align: middle;
}

.table tbody tr td:first-child {
    border-radius: 12px 0 0 12px;
}

.table tbody tr td:last-child {
    border-radius: 0 12px 12px 0;
}

.table tbody tr:hover {
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(122, 58, 96, 0.08);
}

/* Advanced GridView Elements */
.grid-view .summary {
    color: #8395a7;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 15px;
    padding: 0 10px;
}

.empty {
    text-align: center;
    padding: 40px !important;
    background: #ffffff !important;
    border-radius: 15px !important;
    color: #8395a7 !important;
    font-weight: 500;
    font-style: italic;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Pagination Deluxe */
.pagination {
    margin-top: 30px;
    gap: 8px;
    justify-content: center;
}

.pagination li a,
.pagination li span {
    border: none !important;
    padding: 10px 18px !important;
    border-radius: 12px !important;
    color: var(--text-dark) !important;
    font-weight: 600;
    transition: all 0.3s ease;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.pagination li.active span {
    background: var(--primary-gradient) !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(122, 58, 96, 0.3) !important;
}

.pagination li a:hover {
    background: var(--bg-light) !important;
    color: var(--primary-maroon) !important;
    transform: translateY(-2px);
}

.pagination li.disabled span,
.pagination li.disabled a {
    opacity: 0.5;
    background: #f8f9fa !important;
    cursor: not-allowed;
}

/* Status Labels / Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.status-maroon {
    background: #fdf2f7;
    color: var(--primary-maroon);
}

.status-gold {
    background: #fff9f0;
    color: #c5a059;
}

.status-green {
    background: #f0fff4;
    color: #2ecc71;
}

.status-blue {
    background: #f0f7ff;
    color: #3498db;
}

.status-gray {
    background: #f8f9fa;
    color: #8395a7;
}

/* ========================================
   GLOBAL FORM STYLING
   ======================================== */

.family-form,
.general-form-container {
    padding: 20px;
}

.section-header {
    background: linear-gradient(135deg, #7a3a60 0%, #a54a7b 100%);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 15px;
    box-shadow: 0 4px 12px rgba(122, 58, 96, 0.15);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.section-header i {
    margin-right: 10px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-control,
.select2-container--krajee .select2-selection {
    border: 2px solid #e8ecf1 !important;
    border-radius: 8px !important;
    padding: 10px 15px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    height: auto !important;
}

.form-control:focus,
.select2-container--krajee .select2-selection:focus {
    border-color: #7a3a60 !important;
    box-shadow: 0 0 0 0.2rem rgba(122, 58, 96, 0.1) !important;
    outline: none !important;
}

.form-actions {
    border-top: 2px solid #e8ecf1;
    padding-top: 20px;
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.help-block {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

.field-icon {
    color: #7a3a60;
    margin-right: 5px;
}

/* Consolidated Button Styles */
.btn-maroon {
    background: linear-gradient(135deg, #7a3a60 0%, #a54a7b 100%) !important;
    border: none !important;
    color: white !important;
    padding: 10px 30px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(122, 58, 96, 0.3) !important;
    text-decoration: none !important;
}

.btn-maroon:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(122, 58, 96, 0.4) !important;
    color: white !important;
    filter: brightness(1.1) !important;
}

/* Success Button - Matching Maroon Style */
.btn-success {
    border: none !important;
    color: white !important;
    padding: 10px 30px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    box-shadow: 0 4px 12px rgba(122, 58, 96, 0.3) !important;
    text-decoration: none !important;
}

.btn-success:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 16px rgba(122, 58, 96, 0.4) !important;
    color: white !important;
    filter: brightness(1.1) !important;
}

/* Global Modal Styling */
.modal-content {
    border-radius: 24px !important;
    border: none !important;
    overflow: hidden !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2) !important;
}

.modal-header {
    background: #7a3a60 !important;
    color: white !important;
    border: none !important;
    padding: 20px 30px !important;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
}

.modal-title {
    font-weight: 700 !important;
    letter-spacing: -0.5px;
    color: white !important;
}

.btn-batal-deluxe,
.btn-secondary {
    background: #f1f3f5 !important;
    border: 1px solid #dee2e6 !important;
    color: #495057 !important;
    padding: 10px 30px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
}

.btn-batal-deluxe:hover,
.btn-secondary:hover {
    background: #e9ecef !important;
    transform: translateY(-2px) !important;
    color: #212529 !important;
}


.action-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.action-update {
    background: #f1f5f9;
    color: #7a3a60;
}

.action-delete {
    background: #fff5f5;
    color: #ff7675;
}

.action-icon:hover {
    transform: translateY(-2px);
    filter: brightness(0.95);
}

.table thead th {
    background: transparent;
    border: none;
    color: #7a3a60;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 15px 12px;
}

.table tbody tr {
    background: #fff;
    transition: all 0.3s ease;
}

.table tbody td {
    border-top: 1px solid #f8f9fa;
    padding: 15px 12px;
}

/* Specialty Form Elements (e.g., Hostel/Outing) */
.facility-section {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    margin-top: 20px;
    border: 1px dashed #e9ecef;
}

.facility-item {
    background: #f8fafc;
    padding: 18px;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.facility-label {
    font-weight: 700;
    color: #7a3a60;
    margin-bottom: 0;
    font-size: 0.95rem;
}

.radio-group {
    display: flex;
    gap: 25px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #7a3a60;
    cursor: pointer;
}

.input-group-text {
    border-radius: 0 12px 12px 0 !important;
    background: #f8fafc !important;
    color: #7a3a60 !important;
    border: 2px solid #e8ecf1 !important;
    border-left: none !important;
}

/* Conditional Form Sections & Animations */
.conditional-section {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.conditional-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Timetable & Exam Table Global Styles */
.timetable-table,
.exam-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    min-width: max-content;
}

.timetable-table thead,
.exam-table thead {
    background: #f8f9fa;
}

.timetable-table thead th,
.exam-table thead th {
    padding: 15px 10px;
    text-align: center;
    font-weight: 700;
    color: #7a3a60 !important;
    border-bottom: 2px solid #f8f9fa;
    font-size: 13px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timetable-table thead th:first-child,
.exam-table thead th:first-child {
    text-align: left;
    padding-left: 20px;
    min-width: 100px;
}

.timetable-table tbody td,
.exam-table tbody td {
    padding: 15px 8px;
    border-bottom: 1px solid #f8f9fa;
    border-right: 1px solid #f8f9fa;
    color: #495057;
    font-size: 12px;
    text-align: center;
    vertical-align: middle;
}

.timetable-table tbody td:first-child,
.exam-table tbody td:first-child {
    text-align: left;
    font-weight: 700;
    color: #7a3a60;
    padding-left: 20px;
    background: #f8fafc;
    border-right: 2px solid #f8f9fa;
}

.timetable-table tbody td:last-child {
    border-right: none;
}

.subject-cell {
    background: #f8fafc;
    color: #7a3a60;
    font-weight: 600;
    padding: 10px;
    border-radius: 12px;
    font-size: 11px;
    line-height: 1.4;
    border: 1px solid #e2e8f0;
}

.empty-cell {
    color: #adb5bd;
    font-size: 11px;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    border-radius: 15px;
    border: 1px solid #f1f3f5;
    width: 100%;
}

.timetable-view {
    overflow: visible;
}

.no-data {
    padding: 60px 20px;
    text-align: center;
    color: #8395a7;
    font-size: 14px;
    font-weight: 500;
}

.exam-date {
    font-weight: 600;
    color: #2d3436;
}

.exam-time {
    color: #8395a7;
    font-size: 13px;
    font-weight: 500;
}

.exam-code {
    font-family: 'Inter', monospace;
    font-weight: 700;
    color: #7a3a60;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 6px;
}