/**
 * HIH Portal - Main Stylesheet
 * 
 * Uses CSS Variables for theming.
 */

:root {
    /* Default Theme (can be overridden by inline styles) */
    --hih-primary: #0055ff;
    --hih-primary-hover: #0044cc;
    --hih-secondary: #6c757d;
    --hih-bg: #f8f9fa;
    --hih-surface: #ffffff;
    --hih-text: #212529;
    --hih-text-muted: #6c757d;
    --hih-border: #dee2e6;
    --hih-radius: 12px;
    --hih-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    
    /* Spacing */
    --hih-space-xs: 4px;
    --hih-space-sm: 8px;
    --hih-space-md: 16px;
    --hih-space-lg: 24px;
    --hih-space-xl: 32px;
    
    /* Status Colors */
    --hih-success: #28a745;
    --hih-warning: #ffc107;
    --hih-danger: #dc3545;
    --hih-info: #17a2b8;
}

/* Base Wrapper */
.hih-portal-wrapper {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--hih-text);
    background-color: var(--hih-bg);
    line-height: 1.5;
    box-sizing: border-box;
}

.hih-portal-wrapper *, .hih-portal-wrapper *::before, .hih-portal-wrapper *::after {
    box-sizing: inherit;
}

/* Utilities */
.hih-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--hih-space-md);
}

.hih-card {
    background: var(--hih-surface);
    border-radius: var(--hih-radius);
    padding: var(--hih-space-lg);
    box-shadow: var(--hih-shadow);
    border: 1px solid var(--hih-border);
    margin-bottom: var(--hih-space-md);
}

/* Buttons */
.hih-btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: transparent;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 6px; /* Slightly smaller radius for buttons */
    transition: color 0.15s, background-color 0.15s, border-color 0.15s;
    text-decoration: none; 
}

.hih-btn-primary {
    color: #fff;
    background-color: var(--hih-primary);
    border-color: var(--hih-primary);
}

.hih-btn-primary:hover {
    background-color: var(--hih-primary-hover);
    color: #fff;
    text-decoration: none;
}

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

.hih-btn-outline:hover {
    background-color: var(--hih-primary);
    color: #fff;
}

/* Form Elements */
.hih-form-group {
    margin-bottom: var(--hih-space-md);
}

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

.hih-form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--hih-text);
    background-color: var(--hih-surface);
    background-clip: padding-box;
    border: 1px solid var(--hih-border);
    border-radius: 6px;
    transition: border-color 0.15s;
}

.hih-form-control:focus {
    border-color: var(--hih-primary);
    outline: 0;
}

/* Tables */
.hih-table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--hih-text);
    border-collapse: collapse;
}

.hih-table th,
.hih-table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--hih-border);
}

.hih-table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--hih-border);
    text-align: left;
}

/* Status Badges */
.hih-badge {
    display: inline-block;
    padding: 0.25em 0.4em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    color: #fff;
}

.hih-badge-success { background-color: var(--hih-success); }
.hih-badge-warning { background-color: var(--hih-warning); color: #212529; }
.hih-badge-danger { background-color: var(--hih-danger); }
.hih-badge-info { background-color: var(--hih-info); }
