/* =========================================================================
   Global & Common Styles
   ========================================================================= */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 20px; 
    transition: background-color 0.3s ease, color 0.3s ease;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
}

.controls { 
    display: flex; 
    justify-content: space-between; 
    margin-bottom: 20px; 
    flex-wrap: wrap; 
    gap: 10px; 
}

table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
}

th, td { 
    padding: 12px 15px; 
    border-bottom: 1px solid; 
    font-size: 14px; 
}

th { 
    text-transform: uppercase; 
    font-size: 12px; 
    letter-spacing: 0.5px; 
}

.badge { 
    padding: 4px 8px; 
    border-radius: 4px; 
    font-size: 11px; 
    font-weight: bold; 
}

.checked { 
    font-weight: bold; 
    text-align: center; 
}

/* Modal Overlay Styles */
.modal-overlay { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.6); 
    z-index: 1000; 
    justify-content: center; 
    align-items: center; 
    padding: 20px; 
    box-sizing: border-box; 
}

.modal-content { 
    width: 100%; 
    max-width: 700px; 
    max-height: 85vh; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.modal-header { 
    padding: 15px 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.modal-header h2 { 
    margin: 0; 
    font-size: 18px; 
}

.modal-close { 
    background: none; 
    border: none; 
    font-size: 24px; 
    cursor: pointer; 
}

.modal-body { 
    padding: 20px; 
    overflow-y: auto; 
    font-family: monospace; 
    white-space: pre-wrap; 
    line-height: 1.5; 
    font-size: 14px; 
}

.modal-body table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 10px; 
    margin-bottom: 10px; 
}

.modal-body th, .modal-body td { 
    padding: 8px 12px; 
    text-align: left; 
    font-size: 13px; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

/* Drawer Common Styles */
.drawer {
    position: fixed;
    top: 0;
    width: 280px;
    height: 100%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.left-drawer { left: 0; transform: translateX(-100%); }
.right-drawer { right: 0; transform: translateX(100%); }
.drawer.open { transform: translateX(0); }

.drawer hr { border: 0; margin: 15px 0; }
.drawer label { display: block; margin-bottom: 10px; cursor: pointer; }

.drawer-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}
.drawer-overlay.active { display: block; }


/* =========================================================================
   LIGHT MODE STYLES (`body.light-mode`)
   ========================================================================= */
body.light-mode {
    background-color: #f8f9fa;
    color: #333333;
}

body.light-mode h1 { text-align: center; color: #2c3e50; margin-bottom: 5px; }
body.light-mode .subtitle { text-align: center; color: #7f8c8d; margin-bottom: 20px; font-size: 14px; }
body.light-mode header button { color: #2c3e50; background: none; border: none; font-size: 20px; cursor: pointer; }
body.light-mode header button:hover { color: #3498db; }

body.light-mode .search-bar { 
    flex: 1; padding: 12px; font-size: 15px; 
    border: 1px solid #bdc3c7; background-color: #ffffff; color: #333333; 
    border-radius: 6px; outline: none; transition: border-color 0.3s; 
}
body.light-mode .search-bar:focus { border-color: #3498db; }

body.light-mode .table-responsive { background: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.05); overflow-x: auto; }
body.light-mode th { background: #34495e; color: white; border-bottom-color: #ecf0f1; }
body.light-mode td { border-bottom-color: #ecf0f1; }
body.light-mode tr.past { background-color: #fdfdfd; color: #95a5a6; }
body.light-mode tr.future { background-color: #ffffff; color: #2c3e50; }
body.light-mode tr:hover { background-color: #f1f4f6; }

body.light-mode .badge-past { background: #ecf0f1; color: #7f8c8d; }
body.light-mode .badge-future { background: #e8f8f5; color: #1abc9c; }
body.light-mode .checked { color: #27ae60; }

body.light-mode .modal-content { background: #ffffff; }
body.light-mode .modal-header { background: #34495e; color: white; }
body.light-mode .modal-close { color: white; }
body.light-mode .modal-body { background: #fdfdfd; color: #2c3e50; }
body.light-mode .modal-body th, body.light-mode .modal-body td { border: 1px solid #dcdde1; }
body.light-mode .modal-body th { background-color: #f1f2f6; color: #2f3640; }

body.light-mode .drawer { background-color: #ffffff; color: #333333; }
body.light-mode .drawer hr { border-top: 1px solid #e0e0e0; }


/* =========================================================================
   DARK MODE STYLES (`body.dark-mode`)
   ========================================================================= */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode h1 { text-align: center; color: #f1c40f; margin-bottom: 5px; }
body.dark-mode .subtitle { text-align: center; color: #95a5a6; margin-bottom: 20px; font-size: 14px; }
body.dark-mode header button { color: #e0e0e0; background: none; border: none; font-size: 20px; cursor: pointer; }
body.dark-mode header button:hover { color: #3498db; }

body.dark-mode .search-bar { 
    flex: 1; padding: 12px; font-size: 15px; 
    border: 1px solid #444444; background-color: #2c2c2c; color: #ffffff; 
    border-radius: 6px; outline: none; transition: border-color 0.3s; 
}
body.dark-mode .search-bar:focus { border-color: #3498db; }

body.dark-mode .table-responsive { background: #1e1e1e; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.3); overflow-x: auto; }
body.dark-mode th { background: #2c3e50; color: #ffffff; border-bottom-color: #2c2c2c; }
body.dark-mode td { border-bottom-color: #2c2c2c; }
body.dark-mode tr.past { background-color: #181818; color: #7f8c8d; }
body.dark-mode tr.future { background-color: #1e1e1e; color: #e0e0e0; }
body.dark-mode tr:hover { background-color: #2a2a2a; }

body.dark-mode .badge-past { background: #2c2c2c; color: #95a5a6; }
body.dark-mode .badge-future { background: #113f36; color: #1abc9c; }
body.dark-mode .checked { color: #2ecc71; }

body.dark-mode .modal-content { background: #1e1e1e; }
body.dark-mode .modal-header { background: #2c3e50; color: #ffffff; }
body.dark-mode .modal-close { color: #ffffff; }
body.dark-mode .modal-body { background: #181818; color: #e0e0e0; }
body.dark-mode .modal-body th, body.dark-mode .modal-body td { border: 1px solid #333333; }
body.dark-mode .modal-body th { background-color: #2c2c2c; color: #ffffff; }

body.dark-mode .drawer { background-color: #1e1e1e; color: #e0e0e0; }
body.dark-mode .drawer hr { border-top: 1px solid #333333; }


/* Optimize column spacing for mobile prominence */
table th:nth-child(1), table td:nth-child(1) { width: 12%; } /* EMP # */
table th:nth-child(2), table td:nth-child(2) { width: 18%; } /* Date */
table th:nth-child(3), table td:nth-child(3) { width: 12%; } /* Type */
table th:nth-child(4), table td:nth-child(4) { width: 45%; } /* Readings (Prominent) */
table th:nth-child(5), table td:nth-child(5) { width: 13%; } /* Status */


/* =========================================================================
   Mobile-Friendly Touch Buttons for Readings (ESV, LSB, Attributes)
   ========================================================================= */
.version-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
    align-items: center;
}

.bible-btn {
    display: inline-block;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, transform 0.1s;
    line-height: 1.2;
}

.bible-btn:active {
    transform: scale(0.96);
}

/* ESV Button Theme */
body.light-mode .esv-btn {
    background-color: #e3f2fd;
    color: #1976d2;
    border: 1px solid #90caf9;
}
body.dark-mode .esv-btn {
    background-color: #0d3b66;
    color: #64b5f6;
    border: 1px solid #1d5f9c;
}

/* LSB Button Theme */
body.light-mode .lsb-btn {
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
}
body.dark-mode .lsb-btn {
    background-color: #1b4d3e;
    color: #81c784;
    border: 1px solid #28705a;
}

/* Attribute Button Theme */
body.light-mode .attr-btn {
    background-color: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}
body.dark-mode .attr-btn {
    background-color: #5c3a1e;
    color: #ffb74d;
    border: 1px solid #8c562a;
}