/* Custom component classes (Tailwind loaded via CDN in HTML head) */

/* ---- Buttons ---- */
.btn,
.btn-primary,
.btn-secondary,
.btn-danger,
.btn-success,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: all 150ms ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn:focus, .btn-primary:focus, .btn-secondary:focus, .btn-danger:focus, .btn-success:focus, .btn-outline:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.3);
}
.btn:disabled, .btn-primary:disabled, .btn-secondary:disabled, .btn-danger:disabled, .btn-success:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #4f46e5;
    color: white;
}
.btn-primary:hover { background: #4338ca; }

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}
.btn-secondary:hover { background: #e5e7eb; }

.btn-danger {
    background: #dc2626;
    color: white;
}
.btn-danger:hover { background: #b91c1c; }

.btn-success {
    background: #16a34a;
    color: white;
}
.btn-success:hover { background: #15803d; }

.btn-outline {
    background: transparent;
    color: #4f46e5;
    border: 1px solid #4f46e5;
}
.btn-outline:hover { background: #eef2ff; }

/* ---- Inputs ---- */
.input, select.input, textarea.input {
    display: block;
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    transition: all 150ms ease;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #111827;
}
.input:focus, select.input:focus, textarea.input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}
.input::placeholder { color: #9ca3af; }

/* ---- Labels ---- */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ---- Cards ---- */
.card {
    background: white;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    padding: 1.5rem;
}

/* ---- Badges ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }

/* ---- Tables ---- */
.table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}
.table-container table {
    width: 100%;
    font-size: 0.875rem;
}
.table-container th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #6b7280;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table-container td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}
.table-container tr:last-child td { border-bottom: none; }
.table-container tr:hover td { background: #f9fafb; }

/* ---- Alpine.js cloak ---- */
[x-cloak] { display: none !important; }
