:root {
    --primary-color: #0072CE;
    --primary-hover: #005bb5;
    --secondary-color: #6c757d;
    --secondary-hover: #5a6268;
    --success-color: #28a745;
    --success-hover: #218838;
    --danger-color: #dc3545;
    --danger-hover: #c82333;
    --warning-color: #ffc107;
    --warning-hover: #e0a800;
    --info-color: #17a2b8;
    --info-hover: #138496;
    --sidebar-bg: #ffffff;
    --body-bg: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --border-radius: 8px;
}
body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background-color: var(--body-bg);
    margin: 0;
    padding: 20px;
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 20px auto;
    background: white;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.07);
    border: 1px solid var(--border-color);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}
.page-header h2 {
    margin: 0;
    font-size: 1.8em;
    color: var(--text-primary);
    font-weight: 600;
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
}
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
    font-size: 0.95em;
}
th, td {
    border-bottom: 1px solid var(--border-color);
    padding: 12px 15px;
    text-align: left;
    vertical-align: middle;
}
th {
    background-color: var(--primary-color);
    color: white;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85em;
}
th:first-child { border-top-left-radius: var(--border-radius); }
th:last-child { border-top-right-radius: var(--border-radius); }
tr:last-child td:first-child { border-bottom-left-radius: var(--border-radius); }
tr:last-child td:last-child { border-bottom-right-radius: var(--border-radius); }
tr:nth-child(even) td { background-color: var(--body-bg); }
tr:hover td { background-color: #e9ecef; }

.form-group {
    margin-bottom: 22px;
}
.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #343a40;
    font-size: 0.95em;
}
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="date"], textarea, select {
    width: 100%;
    padding: 12px 15px;
    box-sizing: border-box;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1em;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}
input[type="text"]:focus, input[type="email"]:focus, input[type="tel"]:focus, input[type="number"]:focus, input[type="date"]:focus, textarea:focus, select:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}
textarea {
  resize: vertical;
  min-height: 110px;
}

.error-message {
    color: #c0392b;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 0.95em;
    text-align: center;
    margin-bottom: 20px;
}
.no-data {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 40px;
    font-size: 1.1em;
    padding: 20px;
    background-color: #e9ecef;
    border-radius: 8px;
    width: 100%;
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .container {
        padding: 15px;
        margin: 10px 0;
    }
    table {
        font-size: 0.85em;
    }
    th, td {
        padding: 8px 10px;
    }
    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .global-modal-content {
        padding: 20px;
        width: 95%;
    }
    .global-modal-actions {
        flex-direction: column;
    }
    .global-modal-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 12px;
        border-radius: 8px;
    }
    .page-header h2 {
        font-size: 1.4em;
    }
}

/* Modal Core Styles */
.global-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999; 
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

.global-modal-content {
    background: white;
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: popIn 0.3s ease-out forwards;
    transition: all 0.3s ease;
}

/* Glassmorphism Variant for Terms Modal */
.global-modal-content.glass-modal {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    max-width: 600px; /* Wider for reading */
}

.global-modal-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 15px;
}

.global-modal-icon.success { color: #28a745; }
.global-modal-icon.error { color: #dc3545; }
.global-modal-icon.info { color: #0072CE; }
.global-modal-icon.warning { color: #ffc107; }

.global-modal-content h2 {
    margin: 0 0 10px 0;
    color: #212529;
    font-size: 1.5rem;
    font-weight: 700;
}

.global-modal-content p {
    margin: 0 0 25px 0;
    color: #6c757d;
    font-size: 1rem;
    line-height: 1.5;
}

/* Scrollable Terms Area */
.terms-scroll-area {
    max-height: 350px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.6);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    text-align: left;
    font-size: 0.95em;
    color: #495057;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.03);
}

.terms-scroll-area h4 {
    margin-top: 15px;
    margin-bottom: 8px;
    color: #212529;
    font-weight: 600;
}
.terms-scroll-area h4:first-child { margin-top: 0; }

.terms-scroll-area p {
    margin-bottom: 15px;
    color: #495057;
    font-size: 0.95em;
}
.terms-scroll-area ul {
    margin: 10px 0 15px 0;
    padding-left: 20px;
}
.terms-scroll-area li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.global-modal-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.global-modal-btn {
    padding: 10px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 500;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.2s;
}

.global-modal-btn.primary {
    background-color: #0072CE;
    color: white;
}
.global-modal-btn.primary:hover { background-color: #005bb5; }

.global-modal-btn.danger {
    background-color: #dc3545;
    color: white;
}
.global-modal-btn.danger:hover { background-color: #c82333; }

.global-modal-btn.secondary {
    background-color: #e9ecef;
    color: #495057;
}
.global-modal-btn.secondary:hover { background-color: #dde2e6; }

@keyframes popIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}