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

body {
    margin: 0;
    padding: 0;
}

.btn-secondary,
.btn-primary {
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid #397DFA;
    color: #397DFA;
    margin-right: 10px;
}

.btn-secondary:hover {
    background-color: #f0f5ff;
}

.btn-primary {
    background-color: #397DFA;
    border: none;
    color: white;
    box-shadow: 0 4px 10px rgba(57, 125, 250, 0.3);
}

.btn-primary:hover {
    background-color: #2f6be0;
}

.modal-backdrop {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    background-color: rgba(0, 0, 0, 0.4);
    align-items: flex-start;
    justify-content: center;
    padding-top: 50px;
    padding-bottom: 50px;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 700px;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.user-list-card {
    padding: 30px;
}

.content-header .header-back h1 {
    margin-top: 0;
    padding-top: 0;
}

.sidebar {
    padding: 0;
}

.sidebar-header {
    padding: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.search-title-bar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.search-title-bar input {
    flex-grow: 0;
    width: 400px;
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
}

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

#searchInput {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    max-width: 400px;
}


.filter-dropdown-container {
    position: relative;
    display: inline-block;
}

.search-table-btn {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    background-color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 20px;
    width: 250px;
    z-index: 1000;
    border: 1px solid #e0e0e0;
    text-align: left;

}

.filter-menu.show {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f3b73;
    font-size: 0.9rem;
}

.filter-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background-color: #f9f9f9;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
}

.filter-group select:focus {
    outline: none;
    border-color: #397DFA;
    background-color: white;
}

.clear-filters-btn {
    width: 100%;
    padding: 10px;
    background-color: #f0f0f0;
    color: #666;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: #e0e0e0;
    color: #333;
}

.search-table-btn {
    padding: 10px 15px;
    height: 40px;
    box-shadow: none;
    line-height: 1;
    flex-shrink: 0;
}

.create-btn {
    padding: 10px 20px;
    height: auto;
    width: auto;
    box-shadow: 0 4px 10px rgba(57, 125, 250, 0.3);
    flex-shrink: 0;
    margin-left: auto;
}

.user-table-wrapper {
    overflow-x: auto;
}

.user-list-card table {
    width: 100%;
    border-collapse: collapse;
    min-width: 850px;
    table-layout: fixed;
}

.user-list-card thead th {
    text-align: left;
    padding: 12px 15px;
    background-color: #f5f8ff;
    color: #1f3b73;
    font-weight: 600;
    border-bottom: 2px solid #eef3ff;
    font-size: 0.95rem;
}

.user-list-card thead th:nth-child(1),
.user-list-card tbody td:nth-child(1) {
    width: 17%;
}

.user-list-card thead th:nth-child(2),
.user-list-card tbody td:nth-child(2) {
    width: 25%;
}

.user-list-card thead th:nth-child(3),
.user-list-card tbody td:nth-child(3) {
    width: 18%;
}

.user-list-card thead th:nth-child(4),
.user-list-card tbody td:nth-child(4) {
    width: 10%;
    text-align: center;
}

.user-list-card thead th:nth-child(5),
.user-list-card tbody td:nth-child(5) {
    width: 10%;
    text-align: center;
}

.user-list-card thead th:nth-child(6),
.user-list-card tbody td:nth-child(6) {
    width: 20%;
    text-align: center;
}


.user-list-card tbody td {
    padding: 15px;
    border-bottom: 1px solid #eee;
    color: #444;
    font-size: 0.9rem;
}

.user-list-card tbody tr:hover {
    background-color: #f8faff;
}

.user-list-card td:last-child {
    white-space: nowrap;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    line-height: 1;
}

.badge.active-status {
    background-color: #e8f5e9;
    color: #4CAF50;
}

.badge.inactive-status {
    background-color: #ffcdd2;
    color: #D32F2F;
}

.btn-edit,
.btn-delete {
    padding: 6px 12px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    margin: 0 3px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    font-size: 0.85rem;
}

.btn-edit {
    background-color: #eef3ff;
    color: #397DFA;
    border-color: #dbe3ff;
}

.btn-edit:hover {
    background-color: #dbe3ff;
}

.btn-delete {
    background-color: #ffcdd2;
    color: #D32F2F;
    border-color: #ffb3b3;
}

.btn-delete:hover {
    background-color: #ffb3b3;
}

.create-user-wrapper h1 {
    font-size: 1.8rem;
    color: #1f3b73;
    font-weight: 700;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
    margin-bottom: 10px;
}


.modal-content form {
    margin-top: 20px;
    padding-top: 0;
}





#edit-password-group,
#create-password-group {
    grid-column: 1 / 2;
}


.form-group {
    display: flex;
    flex-direction: column;
    min-height: 80px;
    margin-bottom: 0;
}

.form-group label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
    margin-bottom: 3px;
    line-height: 1.2;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 15px;
    height: 40px;
    flex-grow: 0;
    margin: 0;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border: 1px solid #397DFA;
}

#suspension-spacer {
    display: none;
    min-height: 0;
    margin-bottom: 0;
}

.form-group[style*="display: none"] {
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0 !important;
}

.help-text {
    font-size: 0.8rem;
    color: #999;
    margin-top: 4px;
}

.form-actions {
    grid-column: 1 / 3;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 10px;
}

.permission-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 15px;
    background-color: #f8fbff;
    border: 1px solid #e1e9ff;
    border-radius: 8px;
    height: auto;
}

.permission-checkboxes label {
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 12px;
    color: #444;
    line-height: 1.5;
    margin-bottom: 0;
    background-color: white;
    border: 1px solid #eee;
    border-radius: 6px;
    transition: all 0.2s;
    cursor: pointer;
}

.permission-checkboxes label:hover {
    border-color: #397DFA;
    background-color: #f0f5ff;
}

.permission-checkboxes input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* New UI Styles */
.form-section-title {
    grid-column: 1 / -1;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f3b73;
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #eef3ff;
    padding-bottom: 8px;
}

.form-section-title:first-child {
    margin-top: 0;
}

.modal-content .form-grid .admin-only-permission-group {
    grid-column: 1 / -1;
}

.modal-content .form-grid .full-width {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .permission-checkboxes {
        grid-template-columns: 1fr;
    }
}