/* ============================================
   BaseAnvil — Professional Dashboard Stylesheet
   Brand: BaseAnvil Systems
   Primary: #F5841F (Orange)  |  Dark: #2C3E50 (Navy)  |  Accent: #F5841F
   ============================================ */

/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-orange: #F5841F;
    --dark-orange: #D35400;
    --light-orange: #F39C12;
    --brand-color: #F5841F;
    --primary-blue: #2C3E50;
    --dark-blue: #2C3E50;
    --success-green: #27AE60;
    --warning-yellow: #F1C40F;
    --danger-red: #E74C3C;
    --dark-gray: #2C3E50;
    --medium-gray: #7F8C8D;
    --light-gray: #ECF0F1;
    --white: #FFFFFF;
    --bg-main: #F5F0EB;
    --bg-card: #FFFFFF;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.12);
    --shadow-hover: 0 8px 20px rgba(0, 0, 0, 0.12);
    --brand-rgb: 245, 132, 31;
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;
    --transition: all 0.2s ease;
    --font: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    /* Stage colors — BaseAnvil-aligned palette */
    --stage-registration: #2C3E50;
    --stage-pending: #F39C12;
    --stage-verified: #2C3E50;
    --stage-message: #F5841F;
    --stage-recruited: #27AE60;
}

body {
    font-family: var(--font);
    background: #F5F0EB;
    min-height: 100vh;
    color: #2C3E50;
    -webkit-font-smoothing: antialiased;
}

/* ============ NAVIGATION ============ */
.navbar {
    background: #2C3E50;
    padding: 0 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 56px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #F5841F 0%, #F39C12 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
    font-weight: bold;
}

.logo-icon-img {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: contain;
}

.logo-text {
    color: #FFFFFF;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.logo-text span {
    color: #F5841F;
}

.nav-links {
    display: flex;
    gap: 2px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.85rem;
}

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

.nav-link.active {
    background: #F5841F;
    color: #FFFFFF;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #F5841F;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.user-avatar:hover {
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.3);
}

.notification-bell {
    position: relative;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    transition: var(--transition);
}

.notification-bell:hover {
    color: #F5841F;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #E74C3C;
    color: white;
    font-size: 0.65rem;
    padding: 1px 5px;
    border-radius: 10px;
    font-weight: 700;
}

.notification-button {
    background: none;
    border: none;
    padding: 4px;
}

/* ============ MAIN CONTENT ============ */
.main-content {
    margin-top: 56px;
    padding: 0;
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

.dashboard-content {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem;
    overflow-x: hidden;
}

/* Sidebar hidden in top-nav layout */
.sidebar {
    display: none !important;
}

/* ============ PAGE HEADER ============ */
.page-header {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-left: 5px solid #F5841F;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2C3E50;
    letter-spacing: -0.3px;
}

.page-title span {
    color: #F5841F;
    font-weight: 800;
}

.breadcrumb {
    display: flex;
    gap: 6px;
    font-size: 0.8rem;
    color: #7F8C8D;
    margin-top: 2px;
}

.breadcrumb a {
    color: #F5841F;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ============ DASHBOARD HERO ============ */
.dashboard-hero {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1.25rem;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 50%, #F5841F 100%);
    color: white;
    border-radius: var(--radius-lg);
    padding: 1.75rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 70%;
    height: 200%;
    background: radial-gradient(circle, rgba(245, 132, 31, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    background: transparent;
    background-color: transparent;
}

.dashboard-hero h2 {
    font-size: 1.5rem;
    line-height: 1.35;
    margin: 0 0 0.75rem;
    font-weight: 700;
    color: #FFFFFF !important;
    background: none !important;
    border: none;
    box-shadow: none;
    padding: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    -webkit-text-fill-color: #FFFFFF !important;
}

.hero-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.hero-panel {
    display: grid;
    gap: 0.6rem;
    position: relative;
    z-index: 1;
}

.hero-panel div {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    transition: var(--transition);
}

.hero-panel div:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.hero-panel strong {
    display: block;
    color: #FFFFFF !important;
    margin-bottom: 0.15rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.hero-panel span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85) !important;
}

.hero-panel strong,
.hero-panel span {
    display: block;
}

/* ============ STATS CARDS ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.stat-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #F5841F;
}

.stat-card.blue::before { background: #2C3E50; }
.stat-card.green::before { background: #27AE60; }
.stat-card.yellow::before { background: #D4A017; }

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle at top right, rgba(245, 132, 31, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.stat-card.blue::after { background: radial-gradient(circle at top right, rgba(44, 62, 80, 0.06) 0%, transparent 70%); }
.stat-card.green::after { background: radial-gradient(circle at top right, rgba(39, 174, 96, 0.06) 0%, transparent 70%); }
.stat-card.yellow::after { background: radial-gradient(circle at top right, rgba(212, 160, 23, 0.06) 0%, transparent 70%); }

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-title {
    color: #7F8C8D;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-icon.orange { background: rgba(245, 132, 31, 0.1); color: #F5841F; }
.stat-icon.blue { background: rgba(44, 62, 80, 0.1); color: #2C3E50; }
.stat-icon.green { background: rgba(39, 174, 96, 0.1); color: #27AE60; }
.stat-icon.yellow { background: rgba(241, 196, 15, 0.1); color: #F1C40F; }

.stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #2C3E50;
    margin-bottom: 0.35rem;
    letter-spacing: -0.5px;
}

.stat-card.blue .stat-value { color: #2C3E50; }
.stat-card.green .stat-value { color: #1B7A3D; }
.stat-card.yellow .stat-value { color: #92790C; }

.stat-change {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive { color: #27AE60; }
.stat-change.negative { color: #E74C3C; }

.clickable-stat {
    cursor: pointer;
}

.clickable-stat:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

/* ============ PROCESS SECTIONS ============ */
.process-section {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 3px solid #F5841F;
}

#external-portal.process-section {
    border-top-color: #2C3E50;
}

#prospects.process-section {
    border-top-color: #8E44AD;
}

#products.process-section {
    border-top-color: #2C3E50;
}

#admin.process-section {
    border-top-color: #2C3E50;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 2px solid #E5E0DB;
    background: none;
    background-color: transparent;
    box-shadow: none;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    color: #2C3E50;
    font-weight: 700;
    letter-spacing: -0.2px;
    background: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
}

.section-title-icon {
    width: 36px;
    height: 36px;
    background: #F5841F;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.95rem;
}

.section-title-icon.blue { background: #2C3E50; }
.section-title-icon.green { background: #27AE60; }
.section-title-icon.yellow { background: #D4A017; }
.section-title-icon.dark { background: #2C3E50; }

.section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ============ TABLE FILTER BAR ============ */
.table-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #F8F6F3;
    border-radius: var(--radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-filter-bar .filter-search {
    flex: 1;
    position: relative;
}

.table-filter-bar .filter-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #7F8C8D;
    font-size: 0.85rem;
}

.table-filter-bar .filter-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1.5px solid #DDD8D3;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    background: #FFFFFF;
    color: #2C3E50;
    transition: var(--transition);
}

.table-filter-bar .filter-search input:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245,132,31, 0.1);
}

.table-filter-bar .filter-search input::placeholder {
    color: #aab;
}

.table-filter-bar .filter-count {
    font-size: 0.78rem;
    color: #7F8C8D;
    white-space: nowrap;
    font-weight: 500;
}

/* ============ DATA TABLES ============ */
.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0;
}

.data-table th,
.data-table td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid #E5E0DB;
}

.data-table thead th {
    background: #2C3E50;
    font-weight: 600;
    color: #FFFFFF;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    border-bottom: 2px solid #2C3E50;
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table thead th:first-child {
    border-radius: var(--radius-sm) 0 0 0;
}

.data-table thead th:last-child {
    border-radius: 0 var(--radius-sm) 0 0;
}

.data-table thead th:first-child:last-child {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:nth-child(even) {
    background: #FAFBFC;
}

.data-table tbody tr:hover {
    background: rgba(245, 132, 31, 0.06);
}

.data-table tbody td {
    font-size: 0.87rem;
    color: #2C3E50;
    padding: 11px 14px;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: rgba(245, 132, 31, 0.08) !important;
}

.clickable-row:hover .link-like-name {
    color: #F5841F;
}

.link-like-name {
    color: #2C3E50;
    font-weight: 700;
    transition: var(--transition);
}

.link-like-name:hover {
    color: #F5841F;
}

/* Table responsive wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.admin-table-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ============ BADGES ============ */
.badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    letter-spacing: 0.2px;
}

.badge-success { background: rgba(39, 174, 96, 0.12); color: #1B7A3D; }
.badge-warning { background: rgba(241, 196, 15, 0.15); color: #92790C; }
.badge-danger { background: rgba(231, 76, 60, 0.12); color: #C0392B; }
.badge-info { background: rgba(44, 62, 80, 0.12); color: #2C3E50; }
.badge-secondary { background: rgba(44, 62, 80, 0.08); color: #2C3E50; }
.badge-primary { background: rgba(245, 132, 31, 0.12); color: #D35400; }

/* Stage badges */
.stage-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.stage-badge.stage-registration { background: rgba(44, 62, 80, 0.15); color: #2C3E50; }
.stage-badge.stage-pending { background: rgba(243, 156, 18, 0.15); color: #F39C12; }
.stage-badge.stage-verified { background: rgba(44, 62, 80, 0.15); color: #2C3E50; }
.stage-badge.stage-message { background: rgba(245, 132, 31, 0.15); color: #F5841F; }
.stage-badge.stage-recruited { background: rgba(39, 174, 96, 0.15); color: #27AE60; }

/* Registration status badges */
.reg-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: capitalize;
}

.reg-status-badge.received { background: rgba(241, 196, 15, 0.15); color: #92790C; }
.reg-status-badge.verified { background: rgba(39, 174, 96, 0.12); color: #1B7A3D; }
.reg-status-badge.rejected { background: rgba(231, 76, 60, 0.12); color: #C0392B; }
.reg-status-badge.pending { background: rgba(44, 62, 80, 0.12); color: #2C3E50; }
.reg-status-badge.active { background: rgba(39, 174, 96, 0.12); color: #1B7A3D; }
.reg-status-badge.approved { background: rgba(245, 132, 31, 0.12); color: #D35400; }

/* ============ BUTTONS ============ */
.btn {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font);
}

.btn-primary {
    background: #F5841F;
    color: white;
}

.btn-primary:hover {
    background: #D35400;
    box-shadow: 0 4px 12px rgba(245,132,31, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #FFFFFF;
    color: #2C3E50;
    border: 1.5px solid #D5CEC8;
}

.btn-secondary:hover {
    background: #F8F3EE;
    border-color: #F5841F;
    color: #F5841F;
}

.btn-success {
    background: #2C3E50;
    color: white;
}

.btn-success:hover {
    background: #2C3E50;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #c0392b;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 0.75rem;
    margin-right: 0;
    gap: 4px;
    border-radius: 5px;
}

.action-btn {
    margin-right: 0;
}

.action-button-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

/* Stage workflow buttons */
.btn-stage-registration,
.btn-stage-pending,
.btn-stage-verified,
.btn-stage-message,
.btn-stage-recruited {
    border: none;
    color: white;
}

.btn-stage-registration { background: #2C3E50; }
.btn-stage-pending { background: #F5841F; }
.btn-stage-verified { background: #27AE60; }
.btn-stage-message { background: #F39C12; }
.btn-stage-recruited { background: #2C3E50; }

.btn-stage-registration:hover,
.btn-stage-pending:hover,
.btn-stage-verified:hover,
.btn-stage-message:hover,
.btn-stage-recruited:hover {
    filter: brightness(0.9);
    transform: translateY(-1px);
}

/* ============ FORMS ============ */
.form-group {
    margin-bottom: 0.85rem;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.85rem;
}

.form-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #DDD8D3;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    transition: var(--transition);
    background: #FFFFFF;
    color: #2C3E50;
    font-family: var(--font);
}

.form-input:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245,132,31, 0.1);
}

.form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #DDD8D3;
    border-radius: var(--radius-sm);
    font-size: 0.87rem;
    background: #FFFFFF;
    cursor: pointer;
    color: #2C3E50;
    transition: var(--transition);
    font-family: var(--font);
}

.form-select:focus {
    outline: none;
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245,132,31, 0.1);
}

.form-select:disabled {
    background: #f0f0f0;
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.85rem;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* ============ MODALS ============ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    backdrop-filter: blur(2px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #FFFFFF;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    width: 90%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: all 0.25s ease;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-wide {
    width: min(1100px, 94vw);
    max-width: 1100px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #ECF0F1;
}

.modal-title {
    font-size: 1.15rem;
    color: #2C3E50;
    font-weight: 700;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #ECF0F1;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: #7F8C8D;
}

.modal-close:hover {
    background: #E74C3C;
    color: white;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 1.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #ECF0F1;
}

/* ============ LOADING STATES ============ */
.loading-text {
    text-align: center;
    padding: 2rem;
    color: #7F8C8D;
    font-style: italic;
    font-size: 0.9rem;
}

.loading-text.error {
    color: #E74C3C;
}

/* ============ PORTAL SUB-TABS ============ */
.portal-sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid #E5E0DB;
    padding-bottom: 0;
}

.portal-sub-tab {
    background: none;
    border: none;
    padding: 10px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #7F8C8D;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
    font-family: var(--font);
}

.portal-sub-tab:hover {
    color: #2C3E50;
    background: rgba(245, 132, 31, 0.04);
}

.portal-sub-tab.active {
    color: #F5841F;
    border-bottom-color: #F5841F;
    font-weight: 700;
}

.portal-sub-content {
    display: none;
}

.portal-sub-content.active {
    display: block;
}

/* ============ EXTERNAL USER DETAIL ============ */
.external-user-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.external-user-detail-card {
    background: #F8F3EE;
    border: 1px solid #E5E0DB;
    border-radius: 8px;
    padding: 0.85rem;
}

.external-user-detail-card strong {
    display: block;
    font-size: 0.75rem;
    color: #7F8C8D;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.external-user-detail-card span {
    font-size: 0.92rem;
    color: #1A1410;
    font-weight: 600;
}

.external-user-section {
    margin-bottom: 1.25rem;
}

.external-user-section h4 {
    font-size: 0.95rem;
    color: #F5841F;
    margin-bottom: 0.65rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #E5E0DB;
}

/* ============ STATUS GRID (Consultant Modal) ============ */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.status-card {
    background: #F8F3EE;
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    border-left: 3px solid #F5841F;
}

.status-card strong {
    display: block;
    color: #7F8C8D;
    font-size: 0.72rem;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.status-card span {
    color: #2C3E50;
    font-weight: 700;
    font-size: 0.92rem;
}

.compact-table th {
    width: 200px;
    background: #F8F3EE;
}

/* ============ DASHBOARD DRILL-DOWN ============ */
#dashboardDetailsTable th,
#dashboardDetailsTable td {
    white-space: nowrap;
}

/* ============ USER DROPDOWN ============ */
.user-profile-menu {
    position: relative;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 220px;
    background: #FFFFFF;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 2000;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.user-dropdown.active {
    display: block;
}

.user-dropdown-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #ECF0F1;
}

.user-dropdown-header strong {
    display: block;
    color: #2C3E50;
    font-size: 0.88rem;
    margin-bottom: 2px;
}

.user-dropdown-header span {
    display: block;
    color: #7F8C8D;
    font-size: 0.8rem;
    word-break: break-all;
}

.user-dropdown-item {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    color: #E74C3C;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.user-dropdown-item:hover {
    background: #fef2f2;
}

.user-dropdown-item i {
    margin-right: 6px;
}

/* ============ MESSAGES ============ */
.message-card {
    background: #FAF5EF;
    border-left: 3px solid #2C3E50;
    border-radius: var(--radius-sm);
    padding: 0.85rem;
    margin-bottom: 0.6rem;
}

.message-card p {
    white-space: pre-line;
    margin: 0.35rem 0;
}

/* ============ MISCELLANEOUS ============ */
.link-counter-card {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff7ef;
    color: #2C3E50;
    border: 1px solid #fde8d0;
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.85rem;
    font-weight: 600;
    font-size: 0.88rem;
}

.link-counter-card span {
    background: #F5841F;
    color: white;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.8rem;
}

.protected-admin-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff7ef;
    color: #2C3E50;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    border: 1px solid #fde8d0;
}

.share-link-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.share-link-row .form-input {
    flex: 1;
}

.low-stock-row {
    background: #fff5f5;
}

.low-stock-row td {
    border-color: #ffdfdf;
}

/* EFT info */
.eft-info-card {
    background: #fff7ef;
    border: 1px solid #f0d2b8;
    border-left: 4px solid #F5841F;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    color: #5b3317;
    line-height: 1.5;
}

.eft-banking-details {
    background: #F8F3EE;
    border: 1px solid #DDD8D3;
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.eft-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E8E3DE;
}

.eft-detail-row:last-child {
    border-bottom: none;
}

.eft-detail-label {
    font-weight: 600;
    color: #2C3E50;
    font-size: 0.87rem;
}

.eft-detail-value {
    font-weight: 700;
    color: #F5841F;
    font-size: 0.92rem;
}

/* ============ PAGE VISIBILITY ============ */
.app-page {
    display: none;
}

.app-page.active-page,
.dashboard-page.active-page {
    display: block;
}

.dashboard-page:not(.active-page) {
    display: none;
}

/* ============ ANIMATIONS ============ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
}

@media (max-width: 900px) {
    .dashboard-content {
        padding: 1rem;
    }
    
    .dashboard-hero {
        grid-template-columns: 1fr;
    }

    .dashboard-hero h2 {
        font-size: 1.2rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .section-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 0.85rem;
    }

    .share-link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .table-filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .navbar, .sidebar, .btn, .table-filter-bar {
        display: none;
    }

    .main-content {
        margin: 0;
        padding: 0;
    }

    .process-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}


/* ============================================
   LOGIN PAGE STYLES
   ============================================ */

.login-page {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: #F5F0EB;
    font-family: var(--font);
}

.login-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Left Branding Section ===== */
.login-branding {
    flex: 1;
    background: linear-gradient(160deg, #2C3E50 0%, #34495E 35%, #D35400 70%, #F5841F 100%) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.login-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 80%, rgba(245,132,31,0.22) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 15%, rgba(245,132,31,0.10) 0%, transparent 40%),
        radial-gradient(ellipse at 50% 50%, rgba(44, 62, 80,0.25) 0%, transparent 70%);
    pointer-events: none;
}

.login-branding::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(255,255,255,0.015) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.015) 87.5%),
        linear-gradient(150deg, rgba(255,255,255,0.015) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.015) 87.5%),
        linear-gradient(30deg, rgba(255,255,255,0.015) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.015) 87.5%),
        linear-gradient(150deg, rgba(255,255,255,0.015) 12%, transparent 12.5%, transparent 87%, rgba(255,255,255,0.015) 87.5%);
    background-size: 80px 140px;
    pointer-events: none;
}

.login-branding-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 480px;
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.login-logo-shield {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}

.login-logo-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 8px;
}

.login-logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1;
}

.login-logo-text .logo-base {
    color: #ffffff;
}

.login-logo-text .logo-anvil {
    color: #F5841F;
}

.login-tagline {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 3rem;
    line-height: 1.7;
    font-weight: 400;
}

.login-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-feature {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.08);
    padding: 1rem 1.25rem;
    border-radius: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.login-feature:hover {
    background: rgba(245, 132, 31, 0.15);
    border-color: rgba(245, 132, 31, 0.35);
    transform: translateX(6px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, rgba(245,132,31,0.28), rgba(245,132,31,0.12));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #F5A623;
    flex-shrink: 0;
}

.feature-text h4 {
    margin: 0 0 0.2rem 0;
    font-size: 0.95rem;
    font-weight: 600;
}

.feature-text p {
    margin: 0;
    opacity: 0.75;
    font-size: 0.85rem;
    font-weight: 400;
}

.login-brand-footer {
    margin-top: 3rem;
    opacity: 0.4;
    font-size: 0.8rem;
    font-weight: 400;
}

/* ===== Right Login Form Section ===== */
.login-form-container {
    width: 520px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
}

.login-form-wrapper {
    width: 100%;
    max-width: 380px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #4B3F36 0%, #F5841F 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 8px 24px rgba(44, 62, 80, 0.25);
}

.login-header h2 {
    font-size: 1.75rem;
    color: #2C3E50;
    margin-bottom: 0.4rem;
    font-weight: 700;
}

.login-header p {
    color: #2C3E50;
    font-size: 0.95rem;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form .form-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #2C3E50;
    font-weight: 500;
    font-size: 0.9rem;
}

.login-form .form-label i {
    color: #F5841F;
    font-size: 0.85rem;
}

.login-form .form-input {
    border: 1.5px solid #D5CEC8;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.25s ease;
    background: #FAFBFC;
}

.login-form .form-input:focus {
    border-color: #F5841F;
    box-shadow: 0 0 0 3px rgba(245, 132, 31, 0.1);
    background: #fff;
}

.password-input-wrapper {
    position: relative;
}

.password-input-wrapper .form-input {
    padding-right: 50px;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7F8C8D;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #F5841F;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: #2C3E50;
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: #F5841F;
}

.forgot-password {
    color: #F5841F;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #F5841F;
}

.btn-login {
    width: 100%;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: 600;
    margin-top: 0.5rem;
    background: #F5841F !important;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(245,132,31, 0.3);
    letter-spacing: 0.3px;
}

.btn-login:hover {
    background: #D35400 !important;
    box-shadow: 0 6px 18px rgba(245,132,31, 0.35);
    transform: translateY(-1px);
}

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

.login-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    margin-top: 0.5rem;
    display: none;
}

.login-message:not(:empty) {
    display: block;
}

.login-message.success {
    background: rgba(39, 174, 96, 0.1);
    color: #2E7D32;
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.login-message.error {
    background: rgba(211, 47, 47, 0.08);
    color: #C62828;
    border: 1px solid rgba(211, 47, 47, 0.2);
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: #7F8C8D;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #EDE8E3;
}

.login-divider span {
    padding: 0 1rem;
    font-size: 0.9rem;
}

.social-login {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #EDE8E3;
    background: white;
    color: #2C3E50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 10px;
}

.btn-social:hover {
    border-color: #2C3E50;
    background: rgba(44, 62, 80, 0.04);
}

.btn-social i {
    font-size: 1.2rem;
}

.btn-google i { color: #DB4437; }
.btn-microsoft i { color: #F5841F; }

.login-footer {
    text-align: center;
    margin-top: 2rem;
}

.admin-note {
    font-size: 0.88rem;
    color: #7F8C8D;
    font-style: italic;
    padding: 0.75rem 1rem;
    background: #F5F0EB;
    border-radius: 8px;
    margin-top: 0.5rem;
}

/* ===== Responsive Login Page ===== */
@media (max-width: 1024px) {
    .login-branding {
        display: none;
    }
    .login-form-container {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .login-form-container {
        padding: 1.5rem;
    }
    .login-header h2 {
        font-size: 1.5rem;
    }
    .form-options {
        flex-direction: column;
        gap: 0.75rem;
        align-items: flex-start;
    }
}


/* ============================================
   REGISTRATION PAGE STYLES
   ============================================ */

.registration-page {
    min-height: 100vh;
    background: #F5F0EB;
    padding: 2rem;
}

.registration-wrapper {
    max-width: 980px;
    margin: 0 auto;
}

.registration-card {
    background: #FFFFFF;
    border-radius: var(--radius-lg);
    padding: 2rem 2.25rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.registration-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ECF0F1;
}

.registration-header h1 {
    margin: 0;
    color: #2C3E50;
    font-size: 1.4rem;
}

.registration-header p {
    margin: 0.25rem 0 0;
    color: #7F8C8D;
    font-size: 0.95rem;
}

.registration-form h2 {
    color: #2C3E50;
    margin: 1.8rem 0 1rem;
    font-size: 1.25rem;
}

.registration-form .form-section-card h2 {
    margin: 0;
    font-size: 1.05rem;
}

.affidavit-notice {
    background: #fff4e8;
    border-left: 4px solid #F5841F;
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.affidavit-notice h3 {
    margin: 0 0 0.5rem;
    color: #2C3E50;
}

.affidavit-notice p {
    color: #7F8C8D;
    margin-bottom: 1rem;
}

.attachment-warning,
.share-link-note {
    color: #7F8C8D;
    background: #ECF0F1;
    padding: 0.85rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .registration-page {
        padding: 1rem;
    }
    .registration-card {
        padding: 1.25rem;
    }
}

/* Form Progress Bar & Step Indicators */
.form-progress-bar {
    width: 100%;
    height: 5px;
    background: #ddd8d3;
    border-radius: 3px;
    margin: 1.25rem 0 0.5rem;
    overflow: hidden;
}

.form-progress-fill {
    height: 100%;
    background: #F5841F;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.form-progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
    padding: 0 0.25rem;
}

.progress-step {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: #2C3E50;
    font-weight: 500;
    transition: color 0.3s;
    white-space: nowrap;
}

.progress-step .step-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #2C3E50;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    transition: all 0.3s;
}

.progress-step.active {
    color: #F5841F;
}

.progress-step.active .step-num {
    background: #F5841F;
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 132, 31, 0.4);
}

.progress-step.completed {
    color: #F5841F;
}

.progress-step.completed .step-num {
    background: #F5841F;
    color: #fff;
}

/* Form Section Cards */
.form-section-card {
    background: #fff;
    border: 1px solid #e5e0db;
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: box-shadow 0.25s ease;
}

.form-section-card:hover {
    box-shadow: 0 2px 12px rgba(44, 62, 80, 0.06);
}

.form-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    background: #F8F3EE;
    border-bottom: 1px solid #e5e0db;
    cursor: default;
}

.form-section-header .section-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #F5841F;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.form-section-header h2 {
    color: #2C3E50;
    font-size: 1rem;
    margin: 0;
    font-weight: 700;
}

.form-section-header p {
    color: #7F8C8D;
    font-size: 0.82rem;
    margin: 0.15rem 0 0;
}

.form-section-body {
    padding: 1.25rem;
}

.form-section-body .form-row {
    margin-bottom: 0.75rem;
}

.form-section-body .form-group {
    margin-bottom: 0.75rem;
}

.registration-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.registration-actions .btn {
    flex: 1;
    min-width: 180px;
}

/* Payment link buttons */
.payment-links-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.payment-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
    background: linear-gradient(135deg, #F5841F, #b8743f);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
    box-shadow: 0 2px 8px rgba(217, 146, 90, 0.25);
}

.payment-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(217, 146, 90, 0.35);
    background: linear-gradient(135deg, #e5a36a, #c98045);
    color: #fff;
}

.payment-link-btn:active { transform: translateY(0); }
.payment-link-btn i { font-size: 1rem; }
.payment-link-btn.disabled-link { opacity: 0.45; pointer-events: none; }

/* Terms & conditions */
.terms-acceptance-block {
    background: #fffdf8;
    border: 1px solid #f0d9b5;
    border-radius: 12px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.terms-acceptance-block h2 {
    color: #2C3E50;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.terms-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-top: 0.75rem;
    cursor: pointer;
    font-size: 0.92rem;
    line-height: 1.5;
}

.terms-checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: #F5841F;
    flex-shrink: 0;
}

@media (max-width: 700px) {
    .form-progress-steps {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .progress-step { font-size: 0.7rem; }
    .progress-step .step-num { width: 20px; height: 20px; font-size: 0.65rem; }
}

/* T-shirt section */
.tshirt-section-card .section-icon {
    background: linear-gradient(135deg, #8B4513, #F5841F);
}

.tshirt-info-card {
    background: #fff7ef;
    border: 1px solid #f0d2b8;
    border-left: 4px solid #F5841F;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1.25rem;
    color: #5b3317;
    line-height: 1.5;
}

.tshirt-option-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.tshirt-option-list label {
    background: #fff;
    border: 1px solid #ead7c6;
    border-radius: 10px;
    padding: 0.7rem 0.85rem;
    margin-bottom: 0.5rem;
}

.compact-fee-summary {
    background: linear-gradient(135deg, #fff7ef 0%, #fff 100%);
    border: 1px solid #f5d5b8;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1.25rem;
    text-align: center;
}

.compact-fee-summary h2 {
    color: #F5841F;
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.compact-fee-summary h2 i {
    margin-right: 0.4rem;
}

.eft-section-card .section-icon {
    background: linear-gradient(135deg, #4B3F36, #F5841F);
}


/* ============================================
   PORTAL (EXTERNAL) PAGE STYLES
   ============================================ */

.portal-card {
    max-width: 900px;
    margin: 0 auto;
}

.portal-logo-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, #F5841F 0%, #F5841F 100%);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(217, 146, 90, 0.3);
}

.portal-section { margin-top: 1.5rem; }

.portal-summary { margin-bottom: 1.5rem; }

.portal-summary h2 {
    color: #2C3E50;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.portal-session-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 10px;
    padding: 0.7rem 1.1rem;
    margin-bottom: 1.25rem;
    border: 1px solid #ddd8d3;
    flex-wrap: wrap;
    gap: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.portal-session-bar strong { color: #2C3E50; }

.portal-landing {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: stretch;
}

.portal-landing-card {
    flex: 1;
    background: #fff;
    border: 1px solid #ddd8d3;
    border-radius: 12px;
    padding: 1.75rem 1.5rem;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: box-shadow 0.2s ease;
}

.portal-landing-card:hover {
    box-shadow: 0 4px 16px rgba(44, 62, 80, 0.08);
}

.portal-landing-card h2 {
    color: #2C3E50;
    font-size: 1.15rem;
    margin: 0.5rem 0 0.4rem;
    font-weight: 600;
}

.portal-landing-desc {
    color: #7F8C8D;
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.portal-landing-card .form-group {
    text-align: left;
    width: 100%;
    margin-bottom: 0.85rem;
}

.portal-landing-card .form-label { text-align: left; }

.portal-landing-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #F5841F;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.portal-landing-icon.register-icon { background: #2C3E50; }

.portal-landing-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.portal-landing-divider span {
    background: #e5e0db;
    color: #7F8C8D;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

.portal-landing-steps {
    text-align: left;
    width: 100%;
    margin-bottom: 1.25rem;
}

.portal-step {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0;
    font-size: 0.92rem;
    color: #555;
    border-bottom: 1px solid #F0EBE5;
}

.portal-step:last-child { border-bottom: none; }
.portal-step i { color: #F5841F; font-size: 0.85rem; width: 18px; text-align: center; }

@media (max-width: 700px) {
    .portal-landing { flex-direction: column; gap: 1rem; }
    .portal-landing-divider { flex-direction: row; padding: 0; }
    .portal-session-bar { flex-direction: column; align-items: stretch; }
}


/* ============================================
   PRODUCT ORDERING PAGE STYLES
   ============================================ */

.product-section { margin-top: 1rem; }

.product-section h2 {
    color: #2C3E50;
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #F5841F;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.product-card {
    background: #fff;
    border: 1px solid #ddd8d3;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(44, 62, 80, 0.1);
}

.product-image {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: #ffffff;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.product-category-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(44, 62, 80, 0.85);
    color: #fff;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-info { padding: 0.85rem; flex: 1; }
.product-name { color: #2C3E50; font-size: 1rem; font-weight: 700; margin: 0 0 0.25rem 0; line-height: 1.3; }
.product-code { color: #8C7B6E; font-size: 0.78rem; margin: 0 0 0.5rem 0; }
.product-desc { color: #7F8C8D; font-size: 0.85rem; margin: 0 0 0.75rem 0; line-height: 1.4; }
.product-meta { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.product-price { font-size: 1.15rem; font-weight: 700; color: #F5841F; }
.product-stock { font-size: 0.78rem; display: flex; align-items: center; gap: 0.3rem; }
.product-stock i { font-size: 0.5rem; }
.product-stock.stock-ok { color: #27AE60; }
.product-stock.stock-low { color: #F5841F; }
.product-stock.stock-out { color: #E74C3C; }

.product-actions {
    padding: 0.6rem 0.85rem;
    border-top: 1px solid #ddd8d3;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-selector { display: flex; align-items: center; gap: 0.25rem; }
.qty-btn {
    width: 30px; height: 30px; border: 1px solid #d6d3d0; background: #f5f0eb; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.75rem;
    color: #2C3E50; transition: all 0.2s;
}
.qty-btn:hover:not(:disabled) { background: #F5841F; color: #fff; border-color: #F5841F; }
.qty-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.qty-display { min-width: 30px; text-align: center; font-weight: 600; font-size: 0.95rem; color: #2C3E50; }

.btn-add-cart, .btn-remove-cart {
    padding: 0.4rem 0.75rem; font-size: 0.82rem; border-radius: 8px; border: 1px solid #d6d3d0;
    cursor: pointer; display: flex; align-items: center; gap: 0.3rem; transition: all 0.2s; margin-left: auto;
}
.btn-add-cart { background: #F5841F; color: #fff; border-color: #F5841F; }
.btn-add-cart:hover { background: #D35400; border-color: #D35400; }
.btn-remove-cart { background: #E74C3C; color: #fff; border-color: #E74C3C; }
.btn-remove-cart:hover { background: #c0392b; border-color: #c0392b; }

.order-summary-section {
    margin-top: 1.5rem; background: #fafbfc; border: 1px solid #ddd8d3; border-radius: 12px; padding: 1.25rem;
}
.order-summary-section h2 {
    color: #2C3E50; font-size: 1.05rem; margin-bottom: 0.75rem; padding-bottom: 0.4rem;
    border-bottom: 2px solid #F5841F;
}

.cart-items { margin-bottom: 1rem; }
.cart-empty { text-align: center; color: #8C7B6E; font-style: italic; padding: 1.5rem 0; margin: 0; }

.cart-item { display: flex; align-items: center; gap: 1rem; padding: 0.75rem 0; border-bottom: 1px solid #ddd8d3; }
.cart-item:last-child { border-bottom: none; }
.cart-item-info { flex: 1; }
.cart-item-name { display: block; font-weight: 600; color: #2C3E50; font-size: 0.92rem; }
.cart-item-code { display: block; font-size: 0.78rem; color: #8C7B6E; }
.cart-item-qty { display: flex; align-items: center; gap: 0.25rem; }
.cart-item-price { font-weight: 700; color: #F5841F; min-width: 80px; text-align: right; }
.cart-item-remove { background: none; border: none; color: #E74C3C; cursor: pointer; padding: 0.25rem; font-size: 0.9rem; opacity: 0.6; transition: opacity 0.2s; }
.cart-item-remove:hover { opacity: 1; }

.cart-totals { margin-top: 1rem; padding-top: 1rem; border-top: 2px solid #ddd8d3; }
.cart-line { display: flex; justify-content: space-between; padding: 0.35rem 0; font-size: 0.95rem; color: #555; }
.cart-line.cart-total { font-size: 1.2rem; font-weight: 700; color: #2C3E50; padding-top: 0.75rem; margin-top: 0.5rem; border-top: 2px solid #2C3E50; }

.profit-insight-card {
    margin-top: 1.25rem; background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
    border: 1px solid #a5d6a7; border-left: 4px solid #2E7D32; border-radius: 12px;
    padding: 1rem 1.25rem; position: relative; overflow: hidden;
}
.profit-insight-card::before { content: ''; position: absolute; top: -20px; right: -20px; width: 80px; height: 80px; background: rgba(46, 125, 50, 0.06); border-radius: 50%; }
.profit-insight-header { display: flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; font-weight: 600; color: #2E7D32; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.35rem; }
.profit-insight-header i { font-size: 0.95rem; }
.profit-insight-amount { font-size: 1.6rem; font-weight: 800; color: #1B5E20; line-height: 1.2; }
.profit-insight-note { font-size: 0.75rem; color: #66BB6A; margin-top: 0.25rem; font-style: italic; }

.delivery-section { margin: 1.25rem 0; padding: 1rem 0; }
.delivery-section h3 { color: #2C3E50; font-size: 1rem; margin-bottom: 0.75rem; }
.delivery-options { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.delivery-option { cursor: pointer; border: 2px solid #ddd8d3; border-radius: 12px; padding: 1rem; transition: all 0.2s; position: relative; }
.delivery-option input[type="radio"] { position: absolute; opacity: 0; }
.delivery-option:hover { border-color: #F5841F; background: #fffdf8; }
.delivery-option:has(input:checked) { border-color: #F5841F; background: #fff8f0; box-shadow: 0 0 0 1px #F5841F; }
.delivery-option-content { display: flex; flex-direction: column; gap: 0.25rem; }
.delivery-option-header { display: flex; align-items: center; gap: 0.5rem; }
.delivery-option-header i { color: #F5841F; font-size: 1.1rem; }
.delivery-name { font-weight: 700; color: #2C3E50; font-size: 0.95rem; }
.delivery-desc { font-size: 0.82rem; color: #7F8C8D; }
.delivery-fee { font-weight: 700; color: #F5841F; font-size: 1rem; margin-top: 0.25rem; }
.delivery-address-preview { display: block; font-size: 0.82rem; color: #2C3E50; background: #f5f0eb; border-radius: 6px; padding: 0.4rem 0.6rem; margin-top: 0.35rem; border-left: 3px solid #F5841F; }
.delivery-address-preview i { color: #F5841F; margin-right: 0.3rem; }
.delivery-disclaimer { background: #fef9f0; border: 1px solid #f0d9b5; border-left: 4px solid #F5841F; border-radius: 10px; padding: 0.85rem 1rem; margin-top: 0.85rem; display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.85rem; line-height: 1.5; color: #6b4c2a; }
.delivery-disclaimer i { color: #F5841F; margin-top: 0.15rem; flex-shrink: 0; }
.delivery-disclaimer span { flex: 1; }

.payment-section { margin-top: 1.25rem; }
.payment-section h2 { color: #2C3E50; font-size: 1.05rem; margin-bottom: 0.75rem; padding-bottom: 0.4rem; border-bottom: 2px solid #F5841F; }
.payment-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.payment-option { cursor: pointer; border: 2px solid #ddd8d3; border-radius: 10px; padding: 0.85rem; transition: all 0.2s; position: relative; }
.payment-option input[type="radio"] { position: absolute; opacity: 0; }
.payment-option:hover { border-color: #F5841F; background: #fffdf8; }
.payment-option:has(input:checked) { border-color: #F5841F; background: #fff8f0; box-shadow: 0 0 0 1px #F5841F; }
.payment-option-content { display: flex; align-items: center; gap: 0.65rem; font-weight: 600; color: #2C3E50; font-size: 0.95rem; }
.payment-option-content i { color: #F5841F; font-size: 1.1rem; }

.order-actions { margin-top: 1.25rem; text-align: center; }
.order-actions .btn { padding: 0.85rem 2.5rem; font-size: 1.05rem; }
.order-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }

.order-success-card { background: #e8f5e9; border: 2px solid #a5d6a7; border-radius: 14px; padding: 2rem; text-align: center; }
.order-success-card h2 { color: #2e7d32; margin-bottom: 0.75rem; }
.order-success-card p { margin: 0.35rem 0; }

.product-loading { text-align: center; color: #8C7B6E; padding: 2rem; font-style: italic; grid-column: 1 / -1; }

@media (max-width: 700px) {
    .product-grid { grid-template-columns: 1fr; }
    .delivery-options, .payment-options { grid-template-columns: 1fr; }
    .cart-item { flex-wrap: wrap; gap: 0.5rem; }
}


/* ============================================
   Ba Kene Logo Styles
   ============================================ */
.ba-kene-logo-header { text-align: center; padding: 0.75rem 0 0.35rem; }
.ba-kene-logo-img { max-width: 200px; height: auto; display: inline-block; }
.ba-kene-logo-avatar { width: 32px; height: 32px; object-fit: contain; border-radius: 4px; vertical-align: middle; }
.navbar .logo .ba-kene-nav-logo { width: 30px; height: 30px; object-fit: contain; margin-right: 8px; border-radius: 4px; vertical-align: middle; }
.login-logo .ba-kene-login-logo { max-width: 180px; height: auto; display: block; margin: 0 auto 0.75rem; }


/* ============================================
   RECRUITMENT TIMELINE
   ============================================ */
.recruitment-timeline {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr auto 1fr;
    gap: 0.75rem;
    align-items: stretch;
    margin: 1.5rem 0;
    padding: 1.25rem;
    background: #FAF5EF;
    border: 1px solid #E5E0DB;
    border-radius: var(--radius-lg);
}

.timeline-step {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    background: white;
    border-radius: var(--radius);
    padding: 1rem;
    border: 1px solid #E5E0DB;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.04);
    cursor: default;
}

.timeline-marker {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex: 0 0 38px;
    font-size: 0.85rem;
}

.timeline-content span { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; color: #7f8c8d; font-weight: 700; }
.timeline-content h4 { margin: 0.15rem 0 0.35rem; color: #2C3E50; font-size: 0.9rem; }
.timeline-content p { margin: 0; color: #5C534A; font-size: 0.82rem; line-height: 1.4; }

.timeline-connector { width: 24px; height: 3px; background: #D5CEC8; align-self: center; border-radius: 999px; }

.stage-registration .timeline-marker { background: #2C3E50; color: white; }
.stage-pending .timeline-marker { background: #F5841F; color: white; }
.stage-verified .timeline-marker { background: #27AE60; color: white; }
.stage-message .timeline-marker { background: #F39C12; color: white; }
.stage-recruited .timeline-marker { background: #2C3E50; color: white; }

@media (max-width: 1100px) {
    .recruitment-timeline { grid-template-columns: 1fr; }
    .timeline-connector { width: 3px; height: 20px; justify-self: center; }
}


/* ============ ANALYTICS DASHBOARD STYLES ============ */

.analytics-dashboards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.analytics-card {
    background: #FAFAF8;
    border: 1px solid #E5E0DB;
    border-radius: var(--radius-lg, 12px);
    padding: 1.25rem;
    transition: var(--transition, all 0.2s ease);
}

.analytics-card:hover {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.analytics-card-wide {
    grid-column: 1 / -1;
}

.analytics-card-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #E5E0DB;
}

.analytics-card-header i {
    color: #F5841F;
    font-size: 1rem;
}

.analytics-card-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #2C3E50;
    letter-spacing: -0.2px;
}

.analytics-card-body {
    min-height: 60px;
}

/* Bar Chart Rows */
.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

.analytics-bar-row.compact {
    margin-bottom: 0.4rem;
}

.analytics-bar-label {
    min-width: 110px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5C534A;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.analytics-bar-row.compact .analytics-bar-label {
    min-width: 90px;
    font-size: 0.72rem;
}

.analytics-bar-track {
    flex: 1;
    height: 20px;
    background: #F0EDE8;
    border-radius: 10px;
    overflow: hidden;
    min-width: 60px;
}

.analytics-bar-row.compact .analytics-bar-track {
    height: 16px;
}

.analytics-bar-fill {
    height: 100%;
    border-radius: 10px;
    min-width: 4px;
    transition: width 0.6s ease;
}

.analytics-bar-value {
    min-width: 65px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #2C3E50;
    white-space: nowrap;
}

.analytics-bar-row.compact .analytics-bar-value {
    min-width: 55px;
    font-size: 0.72rem;
}

.analytics-bar-value small {
    font-weight: 400;
    color: #7F8C8D;
}

/* Analytics Subsections */
.analytics-subsection {
    margin-bottom: 1rem;
}

.analytics-subsection:last-child {
    margin-bottom: 0;
}

.analytics-subsection h5 {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: #7F8C8D;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.analytics-subsection h5 i {
    font-size: 0.72rem;
}

/* Conversion Summary */
.conversion-summary {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.conversion-stat {
    text-align: center;
    flex: 1;
    min-width: 80px;
    padding: 0.75rem 0.5rem;
    background: white;
    border-radius: 10px;
    border: 1px solid #E5E0DB;
}

.conversion-stat-value {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    color: #2C3E50;
    line-height: 1.2;
}

.conversion-stat-label {
    display: block;
    font-size: 0.68rem;
    color: #7F8C8D;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.2rem;
    font-weight: 600;
}

/* Monthly Trend Mini-Chart */
.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 100px;
    padding: 0.5rem 0 0;
    border-bottom: 2px solid #E5E0DB;
}

.trend-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 20px;
}

.trend-bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 80px;
    width: 100%;
}

.trend-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: height 0.4s ease;
}

.trend-bar.reg {
    background: #3498DB;
}

.trend-bar.conv {
    background: #27AE60;
}

.trend-label {
    font-size: 0.6rem;
    color: #7F8C8D;
    margin-top: 0.25rem;
    font-weight: 600;
}

.trend-legend {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    justify-content: center;
}

.trend-legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    color: #5C534A;
    font-weight: 600;
}

.trend-legend-color {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    display: inline-block;
}

/* Responsive: stack analytics on smaller screens */
@media (max-width: 900px) {
    .analytics-dashboards-row {
        grid-template-columns: 1fr;
    }
    .analytics-card-wide {
        grid-column: 1;
    }
    .analytics-bar-label {
        min-width: 80px;
        font-size: 0.72rem;
    }
    .conversion-summary {
        gap: 0.5rem;
    }
}
