/**
 * IPCE Platform — Custom Stylesheet
 * Built on Bootstrap 5.3
 * Keep this file thin — use Bootstrap utilities first.
 */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
    --ipce-sidebar-width: 250px;
    --ipce-navbar-height: 56px;
    --ipce-primary: #0d6efd;
    --ipce-transition: 0.2s ease;
}

/* ── Base ───────────────────────────────────────────────────── */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    font-size: 0.9rem;
    color: #212529;
    background-color: #f1f5f9;
}

/* ── Navbar ─────────────────────────────────────────────────── */
#mainNav {
    height: var(--ipce-navbar-height);
    position: sticky;
    top: 0;
    z-index: 1030;
}

#mainNav .navbar-brand {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
}

/* ── Cards ──────────────────────────────────────────────────── */
.card {
    border-radius: 10px;
    transition: box-shadow var(--ipce-transition);
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* ── Forms ──────────────────────────────────────────────────── */
.form-control, .form-select {
    font-size: 0.875rem;
    border-radius: 8px;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ipce-primary);
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.35rem;
    color: #374151;
}

.input-group-text {
    border-radius: 8px 0 0 8px;
    border-color: #dee2e6;
    font-size: 0.9rem;
}

.is-invalid {
    border-color: #dc3545;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all var(--ipce-transition);
}

.btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a5ad4 100%);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0a58ca 0%, #0847b0 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.35);
}

.btn:active {
    transform: translateY(0);
}

/* ── Alerts ─────────────────────────────────────────────────── */
.alert {
    border-radius: 10px;
    border: none;
    font-size: 0.875rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger   { background: #fee2e2; color: #991b1b; }
.alert-warning  { background: #fef3c7; color: #92400e; }
.alert-info     { background: #dbeafe; color: #1e40af; }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Tables ─────────────────────────────────────────────────── */
.table {
    font-size: 0.875rem;
}

.table thead th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    border-bottom: 2px solid #e5e7eb;
    background: #f9fafb;
}

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

/* ── Sidebar (for future use) ────────────────────────────────── */
.sidebar {
    width: var(--ipce-sidebar-width);
    height: calc(100vh - var(--ipce-navbar-height));
    position: sticky;
    top: var(--ipce-navbar-height);
    overflow-y: auto;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.sidebar .nav-link {
    color: #374151;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 0;
    transition: all var(--ipce-transition);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sidebar .nav-link:hover {
    background: #f3f4f6;
    color: var(--ipce-primary);
}

.sidebar .nav-link.active {
    background: #eff6ff;
    color: var(--ipce-primary);
    border-left: 3px solid var(--ipce-primary);
}

/* ── Utility ────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.border-dashed   { border-style: dashed !important; }
.rounded-xl      { border-radius: 16px !important; }

/* ── Page transitions ────────────────────────────────────────── */
#mainContent {
    animation: fadeIn 0.15s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .display-6 { font-size: 1.5rem; }
}
