/* The Portal - Design System CSS */
/* Component classes using standard CSS. Tailwind loaded via CDN script in layout. */

/* Cards */
.portal-card {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Buttons */
.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: background-color 150ms, color 150ms;
    cursor: pointer;
    border: none;
    outline: none;
}

.portal-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px white, 0 0 0 4px #3b82f6;
}

.portal-btn-primary {
    background-color: #2563eb;
    color: white;
}

.portal-btn-primary:hover {
    background-color: #1d4ed8;
}

.portal-btn-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

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

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

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

/* Badges */
.portal-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.portal-badge-green { background-color: #dcfce7; color: #166534; }
.portal-badge-amber { background-color: #fef3c7; color: #92400e; }
.portal-badge-red { background-color: #fee2e2; color: #991b1b; }
.portal-badge-blue { background-color: #dbeafe; color: #1e40af; }
.portal-badge-gray { background-color: #f3f4f6; color: #1f2937; }

/* Alerts */
.portal-alert {
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid;
    font-size: 0.875rem;
}

.portal-alert-info { background-color: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.portal-alert-warning { background-color: #fffbeb; border-color: #fde68a; color: #b45309; }
.portal-alert-error { background-color: #fef2f2; border-color: #fecaca; color: #dc2626; }
.portal-alert-success { background-color: #f0fdf4; border-color: #bbf7d0; color: #16a34a; }

/* Tables */
.portal-table {
    width: 100%;
    font-size: 0.875rem;
    text-align: left;
}

.portal-table thead {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.portal-table th {
    padding: 0.75rem 1rem;
    font-weight: 600;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.portal-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.portal-table tbody tr:hover {
    background-color: #f9fafb;
}

/* Forms */
.portal-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: border-color 150ms, box-shadow 150ms;
}

.portal-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

.portal-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Stat cards */
.portal-stat {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    padding: 1rem;
}

.portal-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
}

.portal-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* Tabs */
.portal-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}

.portal-tab {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color 150ms, border-color 150ms;
    margin-bottom: -1px;
}

.portal-tab:hover {
    color: #374151;
    border-color: #d1d5db;
}

.portal-tab-active {
    color: #2563eb;
    border-color: #2563eb;
}
