/* Add User Page Styles */

/* Table Styles */
table {
    border-collapse: separate;
    border-spacing: 0;
}

table tbody tr {
    transition: background-color 0.15s ease;
}

table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.dark table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

table tbody tr:last-child td {
    border-bottom: none;
}

table td {
    padding: 16px 24px;
    font-size: 14px;
    color: #374151;
}

.dark table td {
    color: #e5e7eb;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.active {
    background-color: #d1fae5;
    color: #065f46;
}

.dark .status-badge.active {
    background-color: #064e3b;
    color: #6ee7b7;
}

.status-badge.inactive {
    background-color: #fee2e2;
    color: #991b1b;
}

.dark .status-badge.inactive {
    background-color: #7f1d1d;
    color: #fca5a5;
}

/* Action Buttons */
.action-button {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.15s ease;
}

.action-button:hover {
    transform: translateY(-1px);
}

/* Add User Modal (Desktop) */
.add-user-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-user-modal.active {
    pointer-events: all;
    opacity: 1;
}

.add-user-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-user-modal.active .add-user-modal-backdrop {
    opacity: 1;
}

.add-user-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark .add-user-modal-content {
    background: #1c1c1e;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
}

.add-user-modal.active .add-user-modal-content {
    transform: translate(-50%, -50%) scale(1);
}

/* Add User Sheet (Mobile) */
.add-user-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-user-sheet.active {
    pointer-events: all;
    opacity: 1;
}

.add-user-sheet-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.add-user-sheet.active .add-user-sheet-backdrop {
    opacity: 1;
}

.add-user-sheet-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px 20px 0 0;
    max-height: 90vh;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dark .add-user-sheet-content {
    background: #1c1c1e;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
}

.add-user-sheet.active .add-user-sheet-content {
    transform: translateY(0);
}

.add-user-sheet-handle {
    width: 36px;
    height: 5px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    margin: 12px auto 8px;
    flex-shrink: 0;
}

.dark .add-user-sheet-handle {
    background: rgba(255, 255, 255, 0.3);
}

/* Pagination Styles */
.pagination-button {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    cursor: pointer;
}

.dark .pagination-button {
    color: #9ca3af;
}

.pagination-button:hover:not(:disabled) {
    background: rgba(0, 0, 0, 0.05);
    color: #111827;
}

.dark .pagination-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.1);
    color: #f3f4f6;
}

.pagination-button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.dark .pagination-button.active {
    background: #60a5fa;
    border-color: #60a5fa;
}

.pagination-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Custom Dropdown Styles - Apple Design */
.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-button {
    cursor: pointer;
    outline: none;
}

.custom-dropdown-button:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.dark .custom-dropdown-button:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.custom-dropdown-arrow {
    flex-shrink: 0;
    margin-left: 12px;
}

.custom-dropdown.active .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.custom-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 50;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 200px;
    overflow-y: auto;
}

.dark .custom-dropdown-menu {
    background: #1c1c1e;
    border-color: #374151;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

.custom-dropdown.active .custom-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-option {
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.15s ease;
    color: #111827;
    font-size: 14px;
}

.dark .custom-dropdown-option {
    color: #f3f4f6;
}

.custom-dropdown-option:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .custom-dropdown-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.custom-dropdown-option.selected {
    background-color: #3b82f6;
    color: white;
}

.dark .custom-dropdown-option.selected {
    background-color: #60a5fa;
    color: white;
}

.custom-dropdown-option:first-child {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.custom-dropdown-option:last-child {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Scrollbar styling for dropdown menu */
.custom-dropdown-menu::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.dark .custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
}

.custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

.dark .custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .add-user-modal-content {
        width: 95%;
        max-height: 85vh;
    }
    
    table {
        font-size: 12px;
    }
    
    table th,
    table td {
        padding: 12px 16px;
    }
}

