/* Common styles used across multiple pages */
:root {
    --color-primary: #5b21b6;
    --color-primary-light: #ede9fe;
    --color-accent: #10b981;
    --color-accent-hover: #059669;
    --color-inactive: #94a3b8;
    --color-error: #dc2626;
    --color-success: #059669;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.hidden {
    display: none;
}

/* Button styles */
.btn-primary {
    background-color: var(--color-primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #4c1d95;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: 1px solid var(--color-primary);
    cursor: pointer;
}

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

/* Form styles */
.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(91, 33, 182, 0.1);
}

.form-label {
    display: block;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.toast {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    color: white;
    font-weight: 500;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    opacity: 0;
    transform: translateY(20px);
    animation: toast-in 0.5s forwards;
}

.toast.success {
    background-color: var(--color-success);
}

.toast.error {
    background-color: var(--color-error);
}

@keyframes toast-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sidebar styles (for dashboard-like pages) */
.sidebar-link {
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #6b7280;
    text-decoration: none;
}

.sidebar-link:hover,
.sidebar-link-active {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

/* Modal styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Utility classes */
.text-primary {
    color: var(--color-primary);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.bg-primary {
    background-color: var(--color-primary);
}

.border-primary {
    border-color: var(--color-primary);
}
