
:root {
    --color-darkest: #5A54C4;
    --color-dark: #7672CB;
    --color-medium: #928FD2;
    --color-light: #AEACD9;
    --color-lightest: #CAC9DF;
    --color-bg: #f4f7fa; 
    --color-white: #ffffff;
    --color-text: #333;
    --color-border: #dee2e6;
}

body {
    font-family: Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

h1, h2, h3 {
    color: var(--color-darkest);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.table th, .table td {
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    text-align: center;
    vertical-align: middle; 
}

.table th {
    background-color: var(--color-darkest);
    color: var(--color-white);
    font-weight: bold;
}

.table tr:nth-child(even) {
    background-color: #f9f9f9;
}


.table th:last-child,
.table td:last-child {
    width: 1%;
    white-space: nowrap;
}


/* --- Button Styles --- */
.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 5px;
    text-decoration: none;
    color: var(--color-white);
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}


.action-buttons {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.btn-primary {
    background-color: var(--color-darkest);
}
.btn-primary:hover {
    background-color: #4a45a0;
}

.btn-view {
    background-color: #2859a7;
}
.btn-view:hover {
    background-color: #6887aa;
}

.btn-edit {
    background-color: var(--color-medium);
    /* Inalis ang margin-right: 5px; dahil may gap na sa .action-buttons */
}
.btn-edit:hover {
    background-color: #827fbc;
}

.btn-delete {
    background-color: var(--color-dark);
}
.btn-delete:hover {
    background-color: #6561b1;
}

/* --- Form Styles (add.php / edit.php) --- */
.form-container h2 {
    border-bottom: 2px solid var(--color-lightest);
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #555;
}

/* ============================================
 * MGA PAGBABAGO DITO SA BABA
 * ============================================ */

/* Underline style para sa INPUT fields */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="date"],
.form-group input[type="number"] {
    width: 100%;
    padding: 10px 2px 8px 2px;
    border: none;
    border-bottom: 2px solid var(--color-light);
    border-radius: 0;
    box-sizing: border-box;
    font-size: 14px;
    background-color: transparent;
    box-shadow: none;
    transition: border-color 0.3s ease;
}

/* Style para sa SELECT (Dropdown) */
.form-group select {
    width: 100%;
    padding: 10px 2px 8px 2px;
    border: none;
    border-bottom: 2px solid var(--color-light);
    border-radius: 0;
    box-sizing: border-box;
    font-size: 14px;
    background-color: transparent;
    appearance: none; /* Para mawala yung default dropdown box ng browser */
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: border-color 0.3s ease;
}


/* Focus style para sa INPUTS */
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group input[type="date"]:focus,
.form-group input[type="number"]:focus {
    outline: none;
    border-bottom-color: var(--color-medium);
    box-shadow: none;
}

/* Focus style para sa SELECTS */
.form-group select:focus {
    outline: none;
    border-bottom-color: var(--color-medium);
    box-shadow: none;
}

/* ============================================
 * TAPOS NA ANG MGA PAGBABAGO
 * ============================================ */

.form-actions {
    margin-top: 30px;
}

.back-link {
    margin-left: 15px;
    text-decoration: none;
    color: var(--color-dark);
}

/* --- Modal Styles --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    padding-top: 50px;
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    width: 80%;
    max-width: 900px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.modal-close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
}

.modal-close:hover,
.modal-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* --- Summary View sa Modal --- */
#modalBody {
    max-height: 70vh;
    overflow-y: auto;
}

#modalBody h3 {
    border-bottom: 2px solid var(--color-lightest);
    padding-bottom: 5px;
    margin-top: 25px;
    margin-bottom: 15px;
    color: var(--color-darkest);
}

/* 2-column grid para sa label at value */
.summary-grid {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 10px 15px;
    margin-bottom: 20px;
}

.summary-label {
    font-weight: bold;
    color: #555;
    text-align: right;
    padding-right: 15px;
    border-right: 1px solid #eee;
}

.summary-value {
    color: #333;
    word-break: break-all;
}


.summary-label.full-width {
    grid-column: 1 / -1;
    text-align: left;
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
    margin-bottom: -5px;
    font-size: 1.1em;
    color: var(--color-dark);
}

.summary-value.full-width {
    grid-column: 1 / -1;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin-top: 5px;
}