:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --dark-bg: #343a40;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: var(--light-bg);
    color: #333;
}

/* Login Page Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

#sidebar {
    width: 250px;
    background-color: var(--dark-bg);
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border-color);
}

#sidebar h2 {
    padding: 20px;
    margin: 0;
    font-size: 1.2rem;
    background-color: #23272b;
}

#resource-list {
    flex: 1;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin: 0;
}

#resource-list li {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 1px solid #454d55;
    transition: background 0.2s;
}

#resource-list li:hover {
    background-color: #495057;
}

#resource-list li.active {
    background-color: var(--primary-color);
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

header {
    padding: 15px 25px;
    background-color: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#content-area {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
}

/* Components */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 20px;
    margin-bottom: 20px;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

input[type="text"], input[type="password"], input[type="date"], input[type="datetime-local"], select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-sizing: border-box;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: opacity 0.2s;
}

.btn-primary { background-color: var(--primary-color); color: white; }
.btn-success { background-color: var(--success-color); color: white; }
.btn-danger { background-color: var(--danger-color); color: white; }
.btn-secondary { background-color: var(--secondary-color); color: white; }

/* Table */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f1f3f5;
    position: sticky;
    top: 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 25px;
    border-radius: 8px;
    width: 60%;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.loading {
    text-align: center;
    padding: 40px;
    font-style: italic;
    color: var(--secondary-color);
}
