* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.dashboard-page {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: url('/images/dashboard-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

h1 {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.dashboard-logo {
    width: 70px;
    height: 60px;
    background: white;
    padding: 8px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.tab-logo, .btn-logo {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    margin-right: 6px;
}

.role-logo {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
}

.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
}

.tab {
    padding: 12px 24px;
    background: #264461;
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.tab:hover {
    background: #1a3a52;
    transform: translateY(-2px);
}

.tab.active {
    background: white;
    color: #264461;
    font-weight: bold;
}

.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

.stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: linear-gradient(135deg, 264461);
    color: white;
    background-color: #264461;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #264461;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

td {
    padding: 12px;
    border-bottom: 1px solid #eee;
    vertical-align: top;
}

tr:hover {
    background: #f8f9ff;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 2px;
}

.badge-code {
    background: #fff3cd;
    color: #856404;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-code:hover {
    background: #fdcb6e;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.view-btn {
    background: #264461;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.view-btn:hover {
    background: #5568d3;
    transform: translateY(-1px);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.refresh-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    color: #264461;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
}

.refresh-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.user-info {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 12px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 100;
}

.user-email {
    font-weight: 600;
    color: #264461;
    font-size: 0.9rem;
}

.settings-btn {
    background: #264461;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.settings-btn:hover {
    background: #1a2f3f;
    transform: translateY(-1px);
}

.settings-dropdown {
    position: fixed;
    top: 65px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
    min-width: 220px;
    z-index: 101;
    overflow: hidden;
}

.settings-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-item:last-child {
    border-bottom: none;
}

.settings-item:hover {
    background: #f8f9fa;
}

.settings-item span {
    color: #264461;
    font-weight: 500;
    font-size: 0.9rem;
}

.logout-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: #c82333;
    transform: scale(1.05);
}

.permission-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 12px 20px;
    border-radius: 10px;
    margin: 10px 0;
    font-size: 0.9rem;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 30px;
    background: linear-gradient(135deg, #264461 0%, #1a2f3f 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    color: white;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close {
    color: rgba(255, 255, 255, 0.7);
    font-size: 32px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
}

.close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    color: #333;
    line-height: 1.6;
    padding: 30px;
}

.modal-body pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

.modal-body ul {
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 10px;
}

.modal-body strong {
    color: #264461;
}

.modal-body em {
    display: block;
    margin-top: 5px;
    padding: 10px;
    background: #f8f9ff;
    border-left: 3px solid #264461;
    border-radius: 4px;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 0;
}

.table-control-left,
.table-control-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-control-left label,
.table-control-right label {
    color: #264461;
    font-weight: 500;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entries-select {
    padding: 6px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #264461;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.entries-select:hover,
.entries-select:focus {
    border-color: #264461;
    outline: none;
}

.search-input {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    min-width: 250px;
    transition: all 0.2s;
}

.search-input:focus {
    border-color: #264461;
    outline: none;
    box-shadow: 0 0 0 3px rgba(38, 68, 97, 0.1);
}

.search-input::placeholder {
    color: #999;
}

/* Table Footer */
.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 20px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-top: 0;
}

.table-info {
    color: #264461;
    font-size: 14px;
    font-weight: 500;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-btn {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    background: white;
    color: #264461;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    min-width: 40px;
}

.page-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #264461;
}

.page-btn.active {
    background: #264461;
    color: white;
    border-color: #264461;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.prev-btn,
.next-btn {
    font-weight: 600;
}

.page-ellipsis {
    padding: 8px 4px;
    color: #999;
    font-weight: bold;
}

/* Sortable Headers */
.sort-header {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s;
}

.sort-header:hover {
    background: #f0f0f0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .table-control-left,
    .table-control-right {
        justify-content: space-between;
        width: 100%;
    }
    
    .search-input {
        min-width: auto;
        flex: 1;
    }
    
    .table-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* User Management Styles */
.modal-large {
    max-width: 900px;
}

.user-management-table {
    width: 100%;
    margin-top: 15px;
}

.user-management-table th {
    background: #264461;
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.user-management-table td {
    padding: 12px;
    border-bottom: 1px solid #e0e0e0;
}

.user-management-table tr:hover {
    background: #f8f9fa;
}

.badge-success {
    background: #28a745;
    color: white;
}

.badge-danger {
    background: #dc3545;
    color: white;
}

.badge-warning {
    background: #ffc107;
    color: #856404;
}

.badge-role {
    background: #264461;
    color: white;
    text-transform: capitalize;
}

.action-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.enable-btn {
    background: #28a745;
    color: white;
}

.enable-btn:hover {
    background: #218838;
}

.disable-btn {
    background: #dc3545;
    color: white;
}

.disable-btn:hover {
    background: #bd2130;
}

/* Change Password Form Styles */
.change-password-form,
.verify-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.form-group label {
    color: #264461;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.form-group input,
.form-group select {
    padding: 14px 16px;
    border: 2px solid #e3e8ef;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: #f8f9fb;
}

.form-group input:hover,
.form-group select:hover {
    border-color: #cbd5e0;
    background: white;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #264461;
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(38, 68, 97, 0.08);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23264461' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 45px;
}

.form-group small {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: -5px;
    display: flex;
    align-items: flex-start;
    gap: 5px;
}

.form-group small::before {
    content: "ℹ️";
    font-size: 0.9rem;
}

.submit-btn {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.2);
}

.submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1ba87e 0%, #218838 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.3);
}

.submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resend-btn {
    background: transparent;
    color: #264461;
    border: 2px solid #264461;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.resend-btn:hover {
    background: #264461;
    color: white;
}

.error-message {
    background: #fee;
    border-left: 4px solid #dc3545;
    color: #721c24;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.error-message::before {
    content: "⚠️";
    font-size: 1.1rem;
    flex-shrink: 0;
}

.success-message {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.success-message::before {
    content: "✅";
    font-size: 1.1rem;
    flex-shrink: 0;
}

.verify-form p {
    color: #666;
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 10px;
}

/* Invite User Styles */
.invite-user-container {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.invite-user-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.invite-user-btn:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.invite-user-btn:active {
    transform: translateY(0);
}
/* Password Requirements Dynamic Validation */
.password-requirements ul {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
}

.password-requirements li {
    padding: 4px 0;
    transition: color 0.3s ease;
}

.password-requirements .req-icon {
    display: inline-block;
    width: 20px;
    font-weight: bold;
    margin-right: 8px;
    transition: color 0.3s ease;
}