/* Admin Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: var(--darker-bg);
    font-family: 'Inter', sans-serif;
}

.login-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--darker-bg) 0%, rgba(2, 6, 23, 0.95) 100%);
}

@keyframes particleFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.login-container {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 20px;
    padding: 40px 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 20px 20px 0 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    margin-bottom: 20px;
}

.logo-circle {
    width: 70px;
    height: 70px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.logo-circle i {
    font-size: 28px;
    color: white;
}

.login-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 4px;
}

.login-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 12px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
}

.login-form {
    margin-bottom: 28px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.input-field {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(148, 163, 184, 0.15);
    border-radius: 12px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.input-field:hover {
    border-color: rgba(139, 92, 246, 0.3);
    background: rgba(15, 23, 42, 0.7);
}

.input-field:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
    background: rgba(15, 23, 42, 0.8);
    transform: translateY(-1px);
}

.input-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 16px;
    transition: all 0.3s ease;
}

.input-field:focus-within .input-icon {
    color: var(--primary-color);
}

.input-field input {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 16px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
    font-family: inherit;
}

.input-field input::placeholder {
    color: var(--text-muted);
    font-weight: 400;
}

.login-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.login-btn i {
    font-size: 14px;
    transition: all 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(3px);
}

.login-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-weight: 500;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.security-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 16px;
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.security-badge:hover {
    background: rgba(16, 185, 129, 0.15);
    transform: translateY(-1px);
}

.security-badge i {
    font-size: 10px;
}

/* Admin Panel */
.admin-panel {
    min-height: 100vh;
    background: var(--darker-bg);
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
}

.admin-nav {
    background: rgba(2, 6, 23, 0.98);
    backdrop-filter: blur(30px);
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.admin-nav .nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav-logo i {
    color: var(--primary-color);
    font-size: 24px;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
}

.user-info i {
    color: var(--primary-color);
    font-size: 20px;
}

.user-role {
    background: var(--gradient-primary);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.admin-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 32px 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    gap: 24px;
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.header-content p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
}

.header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-secondary);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.btn-secondary:hover {
    background: rgba(30, 41, 59, 1);
    color: var(--text-primary);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-1px);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(139, 92, 246, 0.4);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.stat-icon i {
    font-size: 24px;
    color: white;
}

.stat-content h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1;
}

.stat-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-trend {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.stat-trend.warning {
    color: var(--accent-color);
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 40px;
}

.quick-actions h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.action-card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(139, 92, 246, 0.4);
}

.action-card:hover::before {
    opacity: 1;
}

.action-icon {
    width: 80px;
    height: 80px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    flex-shrink: 0;
}

.action-icon i {
    font-size: 32px;
    color: white;
}

.action-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    flex-shrink: 0;
}

.action-card p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 24px;
    line-height: 1.6;
    flex-grow: 1;
}

.action-card .btn {
    margin-top: auto;
    flex-shrink: 0;
}

/* Licenses Section */
.licenses-section {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 16px;
    padding: 32px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    gap: 24px;
}

.header-left h2 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.header-left p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.header-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 16px;
    color: var(--text-muted);
    font-size: 16px;
    z-index: 2;
}

.search-box input {
    padding: 12px 16px 12px 48px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 300px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.filter-box select {
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-box select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.5);
    max-width: 100%;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.data-table th {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-primary);
    font-weight: 600;
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.data-table td {
    padding: 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-secondary);
    font-size: 0.9rem;
    vertical-align: top;
}

.data-table th:nth-child(1) { width: 15%; }
.data-table th:nth-child(2) { width: 20%; }
.data-table th:nth-child(3) { width: 12%; }
.data-table th:nth-child(4) { width: 15%; }
.data-table th:nth-child(5) { width: 12%; }
.data-table th:nth-child(6) { width: 10%; }
.data-table th:nth-child(7) { width: 16%; }

.data-table tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.license-key {
    font-family: 'Courier New', monospace;
    background: rgba(15, 23, 42, 0.8);
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--primary-color);
    border: 1px solid rgba(139, 92, 246, 0.2);
    display: inline-block;
    word-break: break-all;
    max-width: 100%;
    line-height: 1.2;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit,
.btn-delete {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
    transform: translateY(-1px);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    backdrop-filter: blur(20px);
    animation: modalFadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.95) 100%);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 24px;
    padding: 0;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(139, 92, 246, 0.1);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px 40px 24px;
    border-bottom: 1px solid rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-radius: 24px 24px 0 0;
    position: relative;
    margin-top: 4px;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 24px 24px 0 0;
}

.modal-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 0;
}

.modal-header h2 i {
    font-size: 24px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    transform: rotate(90deg) scale(1.1);
}

#staffFormModal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    margin-bottom: 36px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(2, 6, 23, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

.form-group input:hover,
.form-group select:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(2, 6, 23, 0.9);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    background: rgba(2, 6, 23, 1);
    transform: translateY(-2px);
}

/* Modal Body */
#licenseForm {
    padding: 32px 40px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 32px 40px;
    border-top: 1px solid rgba(139, 92, 246, 0.2);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border-radius: 0 0 24px 24px;
}

.modal-cancel {
    background: rgba(30, 41, 59, 0.8);
    color: var(--text-secondary);
    border: 2px solid rgba(139, 92, 246, 0.2);
    padding: 14px 28px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.modal-cancel:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

/* Modal Primary Button Override */
.modal-actions .btn-primary {
    padding: 14px 32px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border-radius: 12px;
    background: var(--gradient-primary);
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modal-actions .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.modal-actions .btn-primary:hover::before {
    left: 100%;
}

.modal-actions .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* Staff Management Styles */
.staff-list {
    margin-top: 24px;
}

.staff-member {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    transition: all 0.3s ease;
    min-width: 0;
}

.staff-member:hover {
    background: rgba(30, 41, 59, 0.7);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.staff-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.staff-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 1.2rem;
}

.staff-details h4 {
    color: var(--text-primary);
    margin: 0 0 4px 0;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-details p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-role {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.staff-role.admin {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.staff-role.manager {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.staff-role.support {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.staff-role.moderator {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
}

.staff-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.staff-actions button {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.staff-actions .edit-btn {
    background: var(--primary-color);
    color: white;
}

.staff-actions .edit-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.staff-actions .delete-btn {
    background: #ef4444;
    color: white;
}

.staff-actions .delete-btn:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* Permissions Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

#staffFormModal .permissions-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 32px;
    padding: 28px;
    background: rgba(15, 23, 42, 0.3);
    border-radius: 12px;
    border: 1px solid rgba(139, 92, 246, 0.1);
}

.permission-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

#staffFormModal .permission-checkbox {
    padding: 16px 20px;
    background: rgba(2, 6, 23, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    gap: 12px;
    min-height: 64px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
}

.permission-checkbox:hover {
    background: rgba(30, 41, 59, 0.5);
    border-color: var(--primary-color);
}

#staffFormModal .permission-checkbox:hover {
    background: rgba(2, 6, 23, 0.9);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

#staffFormModal .permission-checkbox input[type="checkbox"]:checked {
    transform: scale(1.1);
}

#staffFormModal .permission-checkbox:has(input[type="checkbox"]:checked) {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
}

.permission-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

#staffFormModal .permission-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 4px;
}

.permission-checkbox span {
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
}

#staffFormModal .permission-checkbox span {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.3px;
}

.permission-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 500;
}

#staffFormModal .permission-checkbox input[type="checkbox"]:checked + span {
    color: var(--primary-color);
    font-weight: 600;
    transform: translateX(2px);
}

/* Staff Form Specific Styles */
#staffFormModal .modal-content {
    max-width: 1200px;
    width: 95vw;
}

#staffFormModal .form-group {
    margin-bottom: 28px;
}

#staffFormModal .form-group:last-child {
    margin-bottom: 40px;
}

#staffFormModal .form-group:has(.permissions-grid) {
    margin-bottom: 40px;
}

#staffFormModal .form-group label {
    display: block;
    margin-bottom: 12px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.3px;
}

#staffFormModal .form-group input,
#staffFormModal .form-group select {
    width: 100%;
    padding: 16px 20px;
    background: rgba(2, 6, 23, 0.8);
    border: 2px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    min-width: 0;
}

#staffFormModal .form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%238B5CF6' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 48px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#staffFormModal .form-group select option {
    background: var(--darker-bg);
    color: var(--text-primary);
    padding: 12px 16px;
    border: none;
    font-size: 1rem;
    font-weight: 500;
}

#staffFormModal .form-group input:hover,
#staffFormModal .form-group select:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background: rgba(2, 6, 23, 0.9);
}

#staffFormModal .form-group input:focus,
#staffFormModal .form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15);
    background: rgba(2, 6, 23, 1);
    transform: translateY(-2px);
}

#staffFormModal .form-group input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 8px;
    font-size: 0.8rem;
}

.password-strength.weak {
    color: #ef4444;
}

.password-strength.medium {
    color: #f59e0b;
}

.password-strength.strong {
    color: #10b981;
}

/* Responsive adjustments for staff management */
@media (max-width: 768px) {
    .staff-member {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .staff-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .staff-info {
        width: 100%;
    }
}

/* Ensure modal content fits properly */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 95vw;
        margin: 10px;
    }
    
    #staffFormModal .modal-content {
        max-width: 98vw;
        width: 98vw;
    }
    
    #staffFormModal .form-row {
        gap: 24px;
    }
    
    .staff-member {
        padding: 12px 16px;
    }
    
    .staff-actions button {
        padding: 5px 8px;
        font-size: 0.8rem;
    }
    
    #staffFormModal .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    #staffFormModal .permissions-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Custom Scrollbar Styling */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #9F7AEA 0%, #8B5CF6 100%);
    transform: scale(1.1);
}

/* Firefox scrollbar */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) rgba(15, 23, 42, 0.3);
}

/* Additional improvements for better UI consistency */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-edit, .btn-delete {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-edit {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-edit:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-inactive {
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.license-key {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--primary-color);
    background: rgba(139, 92, 246, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(139, 92, 246, 0.2);
    word-break: break-all;
}

/* Improved table styling */
.data-table th {
    background: rgba(15, 23, 42, 0.8);
    color: var(--text-primary);
    font-weight: 600;
    padding: 16px 12px;
    text-align: left;
    border-bottom: 2px solid rgba(148, 163, 184, 0.1);
    white-space: nowrap;
}

.data-table td {
    padding: 16px 12px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(30, 41, 59, 0.3);
}

/* Improved modal animations */
.modal.show {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Better notification styling */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 400px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-success {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.1);
}

.notification-error {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.1);
}

.notification-warning {
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.1);
}

.notification-info {
    border-color: rgba(59, 130, 246, 0.3);
    background: rgba(59, 130, 246, 0.1);
}
