/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--text-base);
    font-weight: 500;
    line-height: 1.5;
    border: 1px solid transparent;
    border-radius: 9999px;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s, transform 0.1s;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--color-primary);
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-white);
}

.btn-danger:hover:not(:disabled) {
    background: var(--color-error);
}

.btn-sm {
    padding: var(--space-xs) var(--space-md);
    font-size: var(--text-sm);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-group label {
    display: block;
    font-size: var(--text-sm);
    font-weight: 500;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-base);
    font-family: var(--font-sans);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
    transition: border-color 0.15s;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

.form-input::placeholder {
    color: var(--color-text-muted);
}

select.form-input {
    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='%23757575' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

/* Cards */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

/* Alerts / Messages */
.alert {
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius);
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
}

.alert-error {
    background: var(--color-error);
    color: var(--color-white);
    border: 1px solid var(--color-error);
}

.alert-success {
    background: var(--color-success);
    color: var(--color-white);
    border: 1px solid var(--color-success);
}

.alert-warning {
    background: var(--color-warning);
    color: var(--color-white);
    border: 1px solid var(--color-warning);
}

/* Auth layout */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: var(--space-lg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.auth-card p {
    color: var(--color-text-muted);
    margin-bottom: var(--space-xl);
}

.auth-card .form-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.auth-card .form-actions .btn {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: var(--space-lg);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

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

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navbar */
.navbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-md) 0;
    position: relative;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.navbar-brand:hover { text-decoration: none; }

.brand-icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
    gap: 4px;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-brand-accent);
    letter-spacing: 0.04em;
}

.brand-tagline {
    font-family: 'Lato', sans-serif;
    font-weight: 800;
    font-style: italic;
    font-size: 1 rem;
    color: var(--color-brand-secondary);
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.navbar-brand:hover .brand-name { opacity: 0.85; }


.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Hamburger menu toggle */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-text);
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .navbar-toggle {
        display: flex;
    }

    .navbar-actions {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
        padding: var(--space-md);
        gap: var(--space-sm);
        display: none;
        z-index: 1000;
    }

    .navbar-actions.active {
        display: flex;
    }

    .navbar-actions .btn {
        width: 100%;
        text-align: center;
    }
}
