/* ========== Variables ========== */
:root {
    --primary-color: rgba(134, 97, 255, 0.8);
    --secondary-color: rgba(88, 195, 255, 0.6);
    --glass-blur: blur(16px);
    --error-color: #ff2222;
    --success-color: #6cff89;
    --warning-color: #ffd966;
    --progress: 0%;
    --tab-highlight: rgba(134, 97, 255, 0.5);
}

/* ========== Global Styles ========== */
body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: linear-gradient(45deg, #2a2356, #1a3657, #0d2838);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
    color: rgba(255, 255, 255, 0.95);
}

/* ========== Typography ========== */
h1, h2, h3, h4 {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin-top: 0;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
}

/* ========== Particles Background ========== */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: radial-gradient(circle,
    rgba(134, 97, 255, 0.1) 0%,
    rgba(88, 195, 255, 0.05) 100%
    );
}

/* ========== Form Elements ========== */
input[type="text"],
input[type="password"],
input[type="number"],
select {
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(134, 97, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
}

.input-error {
    border-color: var(--error-color) !important;
    box-shadow: 0 0 0 2px rgba(255, 34, 34, 0.3) !important;
}

.error-message {
    color: var(--error-color);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    display: none;
}

/* Fix for number input spinners */
input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

select option {
    background-color: #2a2356;
    color: white;
    padding: 8px;
}

select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem top 50%;
    background-size: 0.8rem auto;
    padding-right: 2.5rem;
}

/* ========== Buttons ========== */
.action-button, .primary-button, .danger-button {
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: none;
}

.action-button {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.action-button:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.primary-button {
    background: linear-gradient(135deg,
    var(--primary-color),
    var(--secondary-color));
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.primary-button:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.danger-button {
    background: rgba(255, 34, 34, 0.8);
    color: white;
}

.danger-button:hover {
    background: rgba(255, 34, 34, 1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 34, 34, 0.4);
}

.action-button:disabled,
.primary-button:disabled,
.danger-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    filter: grayscale(0.5);
}

/* ========== Notification ========== */
.notification {
    position: fixed;
    top: -100px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: var(--glass-blur);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    z-index: 1100;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    border-left: 4px solid var(--primary-color);
}

.notification.active {
    transform: translateY(120px);
}

.notification.success {
    border-color: var(--success-color);
}

.notification.error {
    border-color: var(--error-color);
}

.notification.warning {
    border-color: var(--warning-color);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.25rem;
}

.notification-message {
    font-weight: 500;
}

.notification-close {
    margin-left: 1rem;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

/* ========== Header Styles ========== */
.dashboard-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: var(--glass-blur);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.dashboard-header .logo h1 {
    margin: 0;
    font-size: 1.5rem;
    text-align: left;
}

.user-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navigation-links {
    display: flex;
    gap: 1rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
}

.logout-button {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.logout-button:hover {
    background: rgba(255, 34, 34, 0.2);
    color: white;
}

/* ========== Modal ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #2a2356, #1a3657);
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-modal:hover {
    color: white;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    box-sizing: border-box;
}

/* ========== Empty States ========== */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: rgba(255, 255, 255, 0.6);
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.3);
}

/* ========== Animations ========== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ========== Responsive Styles ========== */
@media (max-width: 768px) {
    .dashboard-header {
        padding: 0 1rem;
    }

    .dashboard-header .logo h1 {
        font-size: 1.2rem;
    }

    .user-controls {
        gap: 0.75rem;
    }

    .navigation-links {
        gap: 0.5rem;
    }

    .nav-link span,
    .logout-button span {
        display: none;
    }
}