/*
TABLE OF CONTENTS
==================
1. RESET AND BASE
2. HEADER
3. NAVIGATION
4. MAIN CONTENT
5. ALERTS AND MESSAGES
6. SEARCH FORM
7. TABLES
8. BUTTONS
9. FORMS
10. DETAIL VIEWS
11. PAGINATION
12. FOOTER
13. BADGES
14. CALENDAR
15. AUTH CONTAINER & INFO BOX
*/


/* ========================================
   1. RESET AND BASE
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}


/* ========================================
   2. HEADER
   ======================================== */

header {
    background-color: #2c3e50;
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    text-align: center;
    margin-bottom: 15px;
    font-size: 28px;
}


/* ========================================
   3. NAVIGATION
   ======================================== */



/* ========================================
   4. MAIN CONTENT
   ======================================== */

main {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

.welcome-container {
    text-align: center;
    padding: 50px 20px;
}

.welcome-description {
    font-size: 18px;
    color: #555;
    margin: 20px 0;
}

.welcome-actions {
    margin-top: 40px;
}


/* ========================================
   5. ALERTS AND MESSAGES
   ======================================== */

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 5px;
    font-weight: bold;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert ul {
    margin-left: 20px;
    margin-top: 10px;
}

.alert strong {
    display: block;
    margin-bottom: 8px;
    font-size: 16px;
}

.alert ul li {
    font-weight: normal;
    margin-bottom: 5px;
}


/* ========================================
   6. SEARCH FORM
   ======================================== */

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

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #4CAF50;
}

.btn-search {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-search:hover {
    background-color: #45a049;
}

.btn-clear {
    padding: 10px 20px;
    background-color: #f44336;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
}

.btn-clear:hover {
    background-color: #da190b;
}


/* ========================================
   7. TABLES
   ======================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

table thead {
    background-color: #2c3e50;
    color: white;
}

table th,
table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table tbody tr:hover {
    background-color: #f5f5f5;
}

table th {
    font-weight: bold;
}

table th a.sortable {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

table th a.sortable:hover {
    color: #1abc9c;
}

.sort-arrow {
    font-size: 12px;
    margin-left: 5px;
}

.table-instruction {
    margin-bottom: 15px;
    color: #555;
    font-size: 14px;
    font-style: italic;
}

.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons a {
    padding: 8px 16px !important;
    font-size: 14px !important;
    width: 70px !important;
    height: 38px !important;
    text-align: center !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}

.action-buttons form {
    margin: 0 !important;
    padding: 0 !important;
    height: 38px !important;
}

.action-buttons form .btn {
    padding: 8px 16px !important;
    font-size: 14px !important;
    width: 70px !important;
    height: 38px !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}


/* ========================================
   8. BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
    min-width: 70px;
    text-align: center;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-success:hover {
    background-color: #229954;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-warning:hover {
    background-color: #e67e22;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background-color: #c0392b;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
    margin: 0 5px;
}


/* ========================================
   9. FORMS
   ======================================== */

form {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.3);
}

.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}


/* ========================================
   10. DETAIL VIEWS
   ======================================== */

.detail-card {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
}

.detail-card h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.detail-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item strong {
    display: inline-block;
    width: 150px;
    color: #555;
}


/* ========================================
   11. PAGINATION
   ======================================== */

.pagination-wrapper {
    margin-top: 30px;
    display: flex;
    justify-content: center;
}

.pagination-wrapper nav {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 10px 15px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
    background-color: #fff;
    border-radius: 5px;
    transition: all 0.3s;
    display: inline-block;
}

.pagination-wrapper a:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-wrapper span.active {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.pagination-wrapper span.disabled {
    color: #ccc;
    cursor: not-allowed;
    background-color: #f9f9f9;
}

.pagination-wrapper svg {
    display: none;
}


/* ========================================
   12. FOOTER
   ======================================== */

footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: auto;
}

footer p {
    margin: 0;
}

/* ========================================
   13. BADGES
   ======================================== */

.badge {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge.bg-primary {
    background-color: #3498db;
}

.badge.bg-success {
    background-color: #27ae60;
}

.badge.bg-danger {
    background-color: #e74c3c;
}

/* ========================================
   14. CALENDAR STYLES
   ======================================== */

#calendar {
    max-width: 100%;
    margin: 0 auto;
}

.fc-event {
    cursor: pointer;
    transition: transform 0.2s;
}

.fc-event:hover {
    transform: scale(1.02);
    opacity: 0.9;
}

.fc-daygrid-event {
    white-space: normal;
    align-items: normal;
}

.fc-event-title {
    font-weight: 500;
}

/* Modal improvements */
.modal-body p {
    margin-bottom: 10px;
}

.modal-body strong {
    color: #2c3e50;
    min-width: 100px;
    display: inline-block;
}


/* ========================================
   15. AUTH CONTAINER & INFO BOX
   ======================================== */

.auth-container {
    max-width: 600px;
    margin: 0 auto;
}
.auth-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}
.info-box {
    padding: 15px;
    background-color: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
    margin-bottom: 20px;
}
.info-box p {
    margin: 0;
    color: #1565C0;
    line-height: 1.6;
}
.form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: space-between;
}
.alert {
    margin-bottom: 20px;
}
.form-group .alert {
    margin-top: 5px;
    margin-bottom: 0;
}
