/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    outline: none;
    font-family: inherit;
}

.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* Button Variants */
.btn-primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    background-color: hsl(var(--primary) / 0.9);
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

.btn-ghost {
    background-color: transparent;
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-outline {
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background-color: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
}

.btn-hero {
    background: var(--gradient-hero);
    color: white;
    border: none;
    box-shadow: var(--shadow-elegant);
    position: relative;
    overflow: hidden;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.2) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.btn-hero:hover::before {
    transform: translateX(100%);
}

.btn-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px hsl(var(--primary) / 0.4);
}

.btn-destructive {
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
    background-color: hsl(var(--destructive) / 0.9);
}

/* Button Sizes */
.btn-sm {
    height: 2.25rem;
    border-radius: calc(var(--radius) - 2px);
    padding: 0 0.75rem;
    font-size: 0.8125rem;
}

.btn-lg {
    height: 2.75rem;
    border-radius: var(--radius);
    padding: 0 2rem;
    font-size: 1rem;
}

.btn-icon {
    height: 2.5rem;
    width: 2.5rem;
    padding: 0;
}

/* Default button size */
.btn {
    height: 2.5rem;
    padding: 0 1rem;
}

/* Card Components */
.card {
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background-color: hsl(var(--card));
    color: hsl(var(--card-foreground));
    box-shadow: var(--shadow-card);
}

.card-header {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.025em;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: 1.5rem;
    padding-top: 0;
}

.card-footer {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    padding-top: 0;
}

/* Badge Components */
.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    border: 1px solid transparent;
    padding: 0.125rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: var(--transition-smooth);
    white-space: nowrap;
}

.badge:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.badge-default {
    border-color: transparent;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-default:hover {
    background-color: hsl(var(--primary) / 0.8);
}

.badge-secondary {
    border-color: transparent;
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-secondary:hover {
    background-color: hsl(var(--secondary) / 0.8);
}

.badge-destructive {
    border-color: transparent;
    background-color: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.badge-destructive:hover {
    background-color: hsl(var(--destructive) / 0.8);
}

.badge-outline {
    color: hsl(var(--foreground));
}

/* Input Components */
.input {
    display: flex;
    height: 2.5rem;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--input));
    background-color: hsl(var(--background));
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: var(--transition-smooth);
    color: hsl(var(--foreground));
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

.input:focus {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

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

/* Alert Components */
.alert {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 1rem;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
}

.alert-destructive {
    border-color: hsl(var(--destructive) / 0.5);
    color: hsl(var(--destructive));
}

.alert-destructive [data-icon] {
    color: hsl(var(--destructive));
}

.alert-title {
    margin-bottom: 0.25rem;
    font-weight: 500;
    line-height: 1;
    letter-spacing: -0.025em;
}

.alert-description {
    font-size: 0.875rem;
    line-height: 1.25;
}

/* Utility Classes */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Animation Classes */
.animate-spin {
    animation: spin 1s linear infinite;
}

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

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: none;
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

/* Skeleton Components */
.skeleton {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    border-radius: var(--radius);
    background-color: hsl(var(--muted));
}

/* Avatar Components */
.avatar {
    position: relative;
    display: flex;
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 9999px;
}

.avatar-image {
    aspect-ratio: 1 / 1;
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.avatar-fallback {
    display: flex;
    height: 100%;
    width: 100%;
    align-items: center;
    justify-content: center;
    border-radius: 9999px;
    background-color: hsl(var(--muted));
}

/* Separator Components */
.separator {
    flex-shrink: 0;
    background-color: hsl(var(--border));
}

.separator-horizontal {
    height: 1px;
    width: 100%;
}

.separator-vertical {
    height: 100%;
    width: 1px;
}

/* Progress Components */
.progress {
    position: relative;
    height: 1rem;
    width: 100%;
    overflow: hidden;
    border-radius: 9999px;
    background-color: hsl(var(--secondary));
}

.progress-indicator {
    height: 100%;
    width: 100%;
    flex: 1;
    background-color: hsl(var(--primary));
    transition: var(--transition-smooth);
}