/**
 * company/assets/css/company.css
 *
 * SCHOLTRIX SAAS MASTER PORTAL — SUPERVISORS PORTAL DESIGN SYSTEM
 * 100% matched to the Supervisors Portal UI (workspace/) layout, typography,
 * palette, hero cards, cream panels, kpi cards, buttons, badges, and responsiveness.
 */

:root {
    --brand: #0D530E;
    --brand-rgb: 13, 83, 14;
    --brand-secondary: #306D29;
    --brand-dark: #093c0a;
    --brand-darker: #062907;
    --brand-light: #E7E1B1;
    --brand-bg: #FBF5DD;
    --brand-soft: rgba(13, 83, 14, 0.08);
    --brand-glow: rgba(13, 83, 14, 0.22);
    --bs-primary: #0D530E;
    --bs-primary-rgb: 13, 83, 14;
    --bs-link-color: #0D530E;
    --bs-link-hover-color: #093c0a;
    --bs-focus-ring-color: rgba(13, 83, 14, 0.25);

    /* Supervisors Portal Signature Tokens */
    --sg-green-dark: #0D530E;
    --sg-green-mid:  #306D29;
    --sg-cream-bg:   #FBF5DD;
    --sg-cream-soft: #E7E1B1;

    /* Legacy Palette Aliases */
    --brand-primary: #0D530E;
    --brand-primary-hover: #093c0a;
    --border: #E7E1B1;
    --border-subtle: rgba(231, 225, 177, 0.7);
    --dark: #142013;
    --slate: #4e5f4c;
    --white: #ffffff;
    --status-success: #0D530E;
    --status-success-bg: rgba(48, 109, 41, 0.12);
    --status-warning: #854d0e;
    --status-warning-bg: #fef9c3;
    --status-danger: #991b1b;
    --status-danger-bg: #fee2e2;
}

body {
    font-family: 'Source Sans 3', 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--bs-body-color);
}

/* ==============================================================================
   1. APP SIDEBAR & BRAND HEADER (SUPERVISORS PORTAL SPEC)
   ============================================================================== */
.app-sidebar {
    transition: width 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.sidebar-brand {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    min-height: 58px;
}

.sidebar-brand .brand-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
    text-decoration: none;
    color: #ffffff;
    width: 100%;
}

.sidebar-brand .brand-logo-fallback {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--brand) !important;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    box-shadow: 0 4px 10px rgba(13, 83, 14, 0.35);
    flex-shrink: 0;
}

.sidebar-brand .brand-title-wrap {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    line-height: 1.2;
}

.sidebar-brand .brand-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.2px;
}

.sidebar-brand .brand-sub {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Sidebar Menu Items */
.sidebar-menu .nav-link {
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 0.5rem;
    margin: 0.12rem 0.5rem;
    padding: 0.55rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar-menu .nav-link:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08);
}

.sidebar-menu .nav-link.active {
    background-color: var(--brand) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 83, 14, 0.45) !important;
    font-weight: 700;
}

.sidebar-menu .nav-treeview .nav-link {
    padding-left: 2rem;
    font-size: 0.84rem;
    font-weight: 500;
}

.sidebar-menu .nav-treeview .nav-link.active {
    background-color: rgba(13, 83, 14, 0.35) !important;
    color: #ffffff !important;
    border-left: 3px solid #86efac !important;
    border-radius: 0 0.5rem 0.5rem 0;
}

.sidebar-menu .nav-header {
    font-size: 0.68rem !important;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 800 !important;
    color: #E7E1B1 !important;
    padding: 0.85rem 1rem 0.35rem !important;
}

/* ==============================================================================
   2. NAVBAR & TOP HEADER
   ============================================================================== */
.app-header.navbar {
    min-height: 58px;
    border-bottom: 1px solid var(--bs-border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.navbar .user-menu .user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--brand);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.academic-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(var(--brand-rgb), 0.10);
    color: var(--brand);
}

/* ==============================================================================
   3. APP CONTENT HEADER
   ============================================================================== */
.app-content-header {
    padding: 1.25rem 1rem 0.85rem;
}

.app-content-header h1,
.app-content-header h2,
.app-content-header h3 {
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--bs-heading-color);
    margin-bottom: 0;
}

.breadcrumb {
    margin-bottom: 0;
    font-size: 0.85rem;
    font-weight: 500;
}

.breadcrumb-item a {
    color: var(--brand);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: var(--bs-secondary-color);
}

.app-content .content-header {
    display: none !important;
}

/* ==============================================================================
   4. SUPERVISORS PORTAL CORE COMPONENTS (HERO, CREAM, KPI, BANNERS)
   ============================================================================== */
.sg-hero-card {
    background: linear-gradient(135deg, #0D530E 0%, #306D29 100%);
    color: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(231, 225, 177, 0.25);
}

.sg-cream-panel {
    background: #FBF5DD;
    border: 1px solid #E7E1B1;
    border-radius: 0.85rem;
    color: #0D530E;
}

.sg-btn-brand {
    background: #0D530E;
    border-color: #0D530E;
    color: #ffffff;
}

.sg-btn-brand:hover,
.sg-btn-brand:focus {
    background: #306D29;
    border-color: #306D29;
    color: #ffffff;
}

.sg-kpi-card {
    border-radius: 0.9rem;
    border: 1px solid rgba(13, 83, 14, 0.12);
    border-top: 4px solid #306D29;
    transition: transform .15s ease, box-shadow .15s ease;
}

.sg-kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 .45rem 1rem rgba(13, 83, 14, 0.08) !important;
}

.sg-review-banner {
    background: #FBF5DD;
    border-left: 5px solid #0D530E;
    border-top: 1px solid #E7E1B1;
    border-right: 1px solid #E7E1B1;
    border-bottom: 1px solid #E7E1B1;
    color: #0D530E;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

.sg-exceptional-banner {
    background: #fff3cd;
    border-left: 5px solid #b45309;
    border: 1px solid #f59e0b;
    color: #78350f;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
}

/* ==============================================================================
   5. CARDS & SECTIONS
   ============================================================================== */
.card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.85rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    margin-bottom: 1.25rem;
    background-color: var(--bs-body-bg);
    overflow: hidden;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--bs-border-color);
    padding: 0.95rem 1.25rem;
    font-weight: 700;
}

.card-title {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0;
}

.card-primary.card-outline {
    border-top: 3.5px solid var(--brand) !important;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--bs-border-color);
    padding: 0.85rem 1.25rem;
}

/* Small Boxes & Info Boxes */
.small-box {
    border-radius: 0.85rem;
    position: relative;
    display: block;
    margin-bottom: 1.25rem;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    color: #ffffff;
    padding: 1.25rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.small-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.small-box .inner h3 {
    font-size: 2.1rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    line-height: 1;
}

.small-box .inner p {
    font-size: 0.88rem;
    font-weight: 600;
    margin: 0;
    opacity: 0.92;
}

.small-box .small-box-icon {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    font-size: 3.2rem;
    opacity: 0.28;
    transition: transform 0.3s ease;
}

.small-box:hover .small-box-icon {
    transform: scale(1.1);
    opacity: 0.38;
}

.small-box .small-box-footer {
    display: block;
    margin: 0.85rem -1.25rem -1.25rem;
    padding: 0.45rem 1.25rem;
    background: rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: right;
    transition: background 0.2s;
}

.small-box .small-box-footer:hover {
    background: rgba(0, 0, 0, 0.25);
    color: #ffffff;
}

.small-box.bg-brand {
    background-color: var(--brand) !important;
}

.info-box {
    border-radius: 0.85rem;
    border: 1px solid var(--bs-border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    min-height: 82px;
    margin-bottom: 1.25rem;
    background-color: var(--bs-body-bg);
    overflow: hidden;
}

.info-box-icon {
    border-radius: 0.75rem 0 0 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.85rem;
    width: 72px;
}

/* ==============================================================================
   6. TABLES & DATA GRIDS
   ============================================================================== */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--bs-secondary-color);
}

.table td {
    padding: 0.85rem 0.75rem;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: rgba(var(--brand-rgb), 0.035);
}

/* ==============================================================================
   7. BUTTONS & STATUS BADGES
   ============================================================================== */
.btn-primary,
.btn-brand {
    --bs-btn-bg: var(--brand) !important;
    --bs-btn-border-color: var(--brand) !important;
    --bs-btn-hover-bg: var(--brand-secondary) !important;
    --bs-btn-hover-border-color: var(--brand-secondary) !important;
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #ffffff !important;
    font-weight: 600;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
}

.btn-primary:hover,
.btn-brand:hover {
    background-color: var(--brand-secondary) !important;
    border-color: var(--brand-secondary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(13, 83, 14, 0.25);
    transform: translateY(-1px);
}

.btn-outline-primary {
    color: var(--brand) !important;
    border-color: var(--brand) !important;
    font-weight: 600;
    border-radius: 0.5rem;
}

.btn-outline-primary:hover {
    background-color: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #ffffff !important;
}

.badge-active,
.badge-success-subtle {
    background-color: #dcfce7 !important;
    color: #166534 !important;
    border: 1px solid #bbf7d0 !important;
}

.badge-suspended,
.badge-danger-subtle {
    background-color: #fee2e2 !important;
    color: #991b1b !important;
    border: 1px solid #fecaca !important;
}

.badge-pending,
.badge-warning-subtle {
    background-color: #fef9c3 !important;
    color: #854d0e !important;
    border: 1px solid #fef08a !important;
}

.badge-info-subtle {
    background-color: #e0f2fe !important;
    color: #0369a1 !important;
    border: 1px solid #bae6fd !important;
}

.badge-secondary-subtle {
    background-color: #f1f5f9 !important;
    color: #475569 !important;
    border: 1px solid #e2e8f0 !important;
}

.badge-primary-subtle {
    background-color: #e8f5e9 !important;
    color: var(--brand) !important;
    border: 1px solid #c8e6c9 !important;
}

.text-brand {
    color: var(--brand) !important;
}

.bg-brand-subtle {
    background-color: rgba(13, 83, 14, 0.08) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 83, 14, 0.2) !important;
}

/* Universal Touch targets */
button, .btn, input, select, textarea {
    touch-action: manipulation;
}
