/* SICAKAP - Sistem Pencatatan dan Rekapitulasi Pelaporan */
/* Modular CSS Structure for Better Maintenance */

/* Base styles and global settings */
@import url('base.css');

/* Layout components */
@import url('layout.css');
@import url('sidebar.css');

/* UI Components */
@import url('components.css');
@import url('forms.css');
@import url('tables.css');

/* Page-specific styles */
@import url('pages/dashboard.css');
@import url('pages/input.css');
@import url('pages/redaksi.css');
@import url('pages/arsip.css');
@import url('pages/formulir.css');
@import url('pages/backup.css');
@import url('pages/session.css');
@import url('pages/skp.css');

/* Utility classes and helpers */
@import url('utils.css');

/* Registration Number Picker Modal Styles */
.reg-picker-tab {
    transition: all 0.2s ease;
}

.reg-picker-tab:hover {
    background-color: #f8f9fa !important;
}

.reg-picker-tab.active {
    border-bottom: 2px solid #007bff !important;
    color: #007bff !important;
    font-weight: 600 !important;
}

/* Registration Number Picker Styles */
.reg-num-btn {
    min-width: 50px;
    min-height: 40px;
    padding: 8px 6px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reg-num-btn:hover:not(:disabled) {
    border-color: #007bff;
    transform: scale(1.02);
}

.reg-num-btn.selected {
    background: #007bff !important;
    color: white !important;
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.reg-num-btn:disabled {
    cursor: not-allowed;
    background: #f8f9fa;
    color: #6c757d;
    border-color: #dee2e6;
}

#customRegNumber:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

/* Modal Center Positioning */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.modal .modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    margin: auto; /* center within the .modal flexbox (horizontal + vertical) */
    box-sizing: border-box;
    max-width: 95%; /* responsive cap so it can be centered inside padding */
}

/* F-1.03 Modal specific positioning */
#f103Modal {
    align-items: flex-start;
    padding-top: 20px;
}

#f103Modal .modal-content {
    width: 95vw;
    height: 95vh;
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
}

/* View Data Modal centering */
#viewDataModal .modal-content {
    max-width: 900px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Pastikan modal benar-benar tersembunyi saat tidak digunakan */
#viewDataModal {
    display: none !important;
    pointer-events: none !important;
    visibility: hidden;
    opacity: 0;
}

#viewDataModal.show {
    display: flex !important;
    pointer-events: auto !important;
    visibility: visible;
    opacity: 1;
}

/* Redaksi Modal centering */
#redaksiModal .modal-content {
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

/* Archive Missing Modal */
#archiveMissingModal .modal-content {
    max-width: 1200px;
    width: 95%;
    max-height: 80vh;
    overflow-y: auto;
}

/* Registration Number Picker Modal */
#regNumberPickerModal .modal-content {
    max-width: 760px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

/* SKP Day Status Styling */
.day-status-select {
    font-size: 0.75rem !important;
    padding: 1px 2px !important;
    height: 24px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.day-notes-input {
    font-size: 0.75rem !important;
    padding: 2px 4px !important;
    height: 22px;
    border-radius: 3px;
    border: 1px solid #ccc;
}

/* No. SK Display Styling - Full Display Version */
.no-sk-display-full {
    font-family: 'Courier New', monospace;
    font-size: 0.85em;
    font-weight: 500;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 4px 8px;
    border-radius: 4px;
    border-left: 3px solid #667eea;
    display: inline-block;
    word-break: break-all;
    white-space: normal;
    line-height: 1.3;
    min-width: 100px;
    max-width: 150px;
}

.no-sk-display-full:empty::before {
    content: "-";
    color: #95a5a6;
    font-style: italic;
}

/* Adjust table cell width for No. SK column */
.table-container table th:nth-child(6),
.table-container table td:nth-child(6) {
    min-width: 120px;
    max-width: 160px;
    width: 140px;
}

/* Remove the old no-sk-display class restrictions */
.no-sk-display {
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
    font-weight: 500;
    color: #2c3e50;
    background: #ecf0f1;
    padding: 2px 6px;
    border-radius: 3px;
    border-left: 3px solid #667eea;
    display: inline-block;
    /* Remove text truncation */
    word-break: break-all;
    white-space: normal;
    line-height: 1.2;
}

.no-sk-display:empty::before {
    content: "-";
    color: #95a5a6;
    font-style: italic;
}

/* TAMBAHAN: Pastikan tombol SKP modal terlihat */
#modalSaveSKPBtn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-width: 180px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

#modalSaveSKPBtn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#modalSaveSKPBtn:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed;
    transform: none;
}

/* SKP Modal action buttons container */
.skp-modal-actions {
    display: flex !important;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 2px solid #eee;
    flex-shrink: 0;
    background: white;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* SKP Table Modal specific styles */
#skpTableModal .modal-content {
    display: flex;
    flex-direction: column;
    min-height: 80vh;
}

#skpTableModal .modal-content > div:last-child {
    margin-top: auto;
}
