/*
 * H.O.G. Chapter Platform - Premium UI Polish
 * Layered on top of Bootstrap 5 — no overrides, just upgrades.
 */

/* ── Google Font: Inter ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Root Variables ── */
:root {
    --hog-orange: #FF6600;
    --hog-orange-hover: #e55c00;
    --hog-orange-soft: rgba(255, 102, 0, 0.08);
    --hog-orange-glow: rgba(255, 102, 0, 0.15);
    --hog-gold: #C8A84E;
    --hog-dark: #1a1a1a;
    --hog-dark-2: #242424;
    --hog-dark-3: #2d2d2d;
    --hog-bg: #f0f2f5;
    --hog-card: #ffffff;
    --hog-border: #e5e7eb;
    --hog-text: #1f2937;
    --hog-text-muted: #6b7280;
    --hog-text-light: #9ca3af;
    --hog-radius: 12px;
    --hog-radius-sm: 8px;
    --hog-radius-lg: 16px;
    --hog-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --hog-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --hog-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
    --hog-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
}

/* ── Global Reset ── */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--hog-bg) !important;
    color: var(--hog-text);
    font-size: 0.9rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ══════════════════════════════
   SIDEBAR — Premium Dark
   ══════════════════════════════ */
.sidebar {
    background: var(--hog-dark) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand, .sidebar .p-3.text-center {
    padding: 1.25rem 1rem !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.sidebar-nav .nav-section {
    padding: 0.75rem 1.25rem 0.35rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.3);
    margin-top: 0.75rem;
}

.sidebar .nav-link,
.sidebar-nav .nav-link {
    padding: 0.6rem 1.25rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.85rem;
    font-weight: 400;
    border-radius: 0 8px 8px 0;
    margin-right: 8px;
    transition: all var(--hog-transition);
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover,
.sidebar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.95) !important;
    background: rgba(255, 255, 255, 0.05) !important;
}

.sidebar .nav-link.active,
.sidebar-nav .nav-link.active {
    color: var(--hog-orange) !important;
    background: var(--hog-orange-soft) !important;
    border-left-color: var(--hog-orange) !important;
    font-weight: 500;
}

.sidebar .nav-link i,
.sidebar-nav .nav-link i {
    font-size: 1.05rem;
    width: 22px;
    text-align: center;
    opacity: 0.7;
    transition: opacity var(--hog-transition);
}
.sidebar .nav-link:hover i,
.sidebar .nav-link.active i {
    opacity: 1;
}

.sidebar hr {
    border-color: rgba(255, 255, 255, 0.06) !important;
    margin: 0.5rem 1.25rem !important;
}

/* ══════════════════════════════
   TOP NAVBAR — Clean & Airy
   ══════════════════════════════ */
.top-navbar,
.main-content > .bg-white.border-bottom {
    background: var(--hog-card) !important;
    border-bottom: 1px solid var(--hog-border) !important;
    padding: 0.75rem 1.5rem !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(8px);
}

.top-navbar .fs-5,
.main-content > .bg-white h4 {
    font-weight: 600;
    font-size: 1.1rem !important;
    color: var(--hog-text);
}

/* User avatar circle */
.rounded-circle.bg-warning,
.bg-warning.text-dark.rounded-circle {
    background: linear-gradient(135deg, var(--hog-orange), var(--hog-gold)) !important;
    color: white !important;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.25);
}

/* ══════════════════════════════
   CONTENT AREA
   ══════════════════════════════ */
.content-wrapper {
    padding: 1.5rem !important;
    max-width: 1400px;
}

/* ══════════════════════════════
   CARDS — Soft & Modern
   ══════════════════════════════ */
.card {
    border: 1px solid var(--hog-border) !important;
    border-radius: var(--hog-radius) !important;
    box-shadow: var(--hog-shadow) !important;
    transition: box-shadow var(--hog-transition), transform var(--hog-transition);
    overflow: hidden;
}
.card:hover {
    box-shadow: var(--hog-shadow-md) !important;
}

.card-header {
    background: var(--hog-card) !important;
    border-bottom: 1px solid var(--hog-border) !important;
    padding: 1rem 1.25rem !important;
    font-weight: 600;
}
.card-header h5, .card-header h6 {
    font-weight: 600;
    font-size: 0.9rem;
}

.card-body {
    padding: 1.25rem;
}

/* ══════════════════════════════
   STAT CARDS — Elevated
   ══════════════════════════════ */
.stat-card {
    background: var(--hog-card);
    border: 1px solid var(--hog-border);
    border-radius: var(--hog-radius) !important;
    padding: 1.25rem 1.5rem !important;
    box-shadow: var(--hog-shadow);
    transition: all var(--hog-transition);
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hog-orange), var(--hog-gold));
    opacity: 0;
    transition: opacity var(--hog-transition);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--hog-shadow-lg);
}
.stat-card:hover::before {
    opacity: 1;
}

.stat-card .stat-value,
.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--hog-text);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--hog-text-muted);
    font-size: 0.8rem;
    font-weight: 500;
    margin-top: 0.15rem;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--hog-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ══════════════════════════════
   TABLES — Clean & Readable
   ══════════════════════════════ */
.table {
    font-size: 0.85rem;
    margin-bottom: 0;
}
.table > thead > tr > th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--hog-text-muted);
    border-bottom: 2px solid var(--hog-border);
    padding: 0.75rem 1rem;
    background: #fafbfc;
}
.table > tbody > tr > td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f3f4f6;
    color: var(--hog-text);
}
.table > tbody > tr:last-child > td {
    border-bottom: none;
}
.table-hover > tbody > tr:hover > td {
    background: var(--hog-orange-soft);
}

/* ══════════════════════════════
   BADGES — Pill Style
   ══════════════════════════════ */
.badge {
    font-weight: 500;
    font-size: 0.7rem;
    padding: 0.35em 0.75em;
    border-radius: 20px;
    letter-spacing: 0.3px;
}
.badge-pending {
    background: #FEF3C7 !important;
    color: #92400E !important;
}
.badge-active {
    background: #D1FAE5 !important;
    color: #065F46 !important;
}
.badge-suspended {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}
.badge-inactive {
    background: #F3F4F6 !important;
    color: #4B5563 !important;
}

/* ══════════════════════════════
   BUTTONS — Rounded & Smooth
   ══════════════════════════════ */
.btn {
    border-radius: var(--hog-radius-sm);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    transition: all var(--hog-transition);
}
.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 6px;
}
.btn-lg {
    border-radius: var(--hog-radius);
}

.btn-hog {
    background: linear-gradient(135deg, var(--hog-orange), #e85d04) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 2px 4px rgba(255, 102, 0, 0.2);
}
.btn-hog:hover {
    background: linear-gradient(135deg, #e85d04, #d45500) !important;
    box-shadow: 0 4px 8px rgba(255, 102, 0, 0.3);
    transform: translateY(-1px);
    color: white !important;
}
.btn-hog:active {
    transform: translateY(0);
}

.btn-outline-warning {
    border-color: var(--hog-orange);
    color: var(--hog-orange);
}
.btn-outline-warning:hover {
    background: var(--hog-orange);
    border-color: var(--hog-orange);
    color: white;
}

/* ══════════════════════════════
   FORMS — Soft Inputs
   ══════════════════════════════ */
.form-control, .form-select {
    border-radius: var(--hog-radius-sm);
    border: 1px solid #d1d5db;
    padding: 0.55rem 0.875rem;
    font-size: 0.875rem;
    transition: border-color var(--hog-transition), box-shadow var(--hog-transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--hog-orange);
    box-shadow: 0 0 0 3px var(--hog-orange-glow);
}
.form-label {
    font-weight: 500;
    font-size: 0.825rem;
    color: var(--hog-text);
    margin-bottom: 0.35rem;
}
.input-group-text {
    border-radius: var(--hog-radius-sm);
    border-color: #d1d5db;
    background: #f9fafb;
}

/* ══════════════════════════════
   MODALS — Polished
   ══════════════════════════════ */
.modal-content {
    border: none;
    border-radius: var(--hog-radius-lg);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}
.modal-header {
    border-bottom: 1px solid var(--hog-border);
    padding: 1rem 1.5rem;
}
.modal-title {
    font-weight: 600;
    font-size: 1.05rem;
}
.modal-body {
    padding: 1.5rem;
}
.modal-footer {
    border-top: 1px solid var(--hog-border);
    padding: 1rem 1.5rem;
}

/* ══════════════════════════════
   DROPDOWNS — Clean
   ══════════════════════════════ */
.dropdown-menu {
    border: 1px solid var(--hog-border);
    border-radius: var(--hog-radius);
    box-shadow: var(--hog-shadow-lg);
    padding: 0.5rem;
    animation: dropdownFade 0.15s ease;
}
.dropdown-item {
    border-radius: 6px;
    font-size: 0.85rem;
    padding: 0.5rem 0.75rem;
    transition: background var(--hog-transition);
}
.dropdown-item:hover {
    background: var(--hog-orange-soft);
}
.dropdown-item.text-danger:hover {
    background: #FEE2E2;
}
.dropdown-divider {
    margin: 0.35rem 0;
}

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

/* ══════════════════════════════
   LIST GROUPS — Modern
   ══════════════════════════════ */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f3f4f6;
    padding: 0.875rem 1.25rem;
    transition: background var(--hog-transition);
}
.list-group-item:last-child {
    border-bottom: none;
}
.list-group-item:hover {
    background: #fafbfc;
}
.list-group-item.active {
    background: var(--hog-orange-soft);
    border-color: transparent;
    color: var(--hog-orange);
}

/* ══════════════════════════════
   ALERTS — Softer
   ══════════════════════════════ */
.alert {
    border-radius: var(--hog-radius);
    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;
}

/* ══════════════════════════════
   PAGINATION — Rounded
   ══════════════════════════════ */
.page-link {
    border-radius: var(--hog-radius-sm) !important;
    margin: 0 2px;
    border: 1px solid var(--hog-border);
    font-size: 0.825rem;
    color: var(--hog-text-muted);
    transition: all var(--hog-transition);
}
.page-item.active .page-link {
    background: var(--hog-orange);
    border-color: var(--hog-orange);
}
.page-link:hover {
    background: var(--hog-orange-soft);
    color: var(--hog-orange);
    border-color: var(--hog-orange);
}

/* ══════════════════════════════
   NOTIFICATION BELL — Polished
   ══════════════════════════════ */
.bi-bell {
    transition: transform var(--hog-transition);
}
.bi-bell:hover {
    transform: rotate(15deg);
}
.badge.rounded-pill.bg-danger {
    font-size: 0.6rem;
    padding: 0.2em 0.5em;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
}

/* ══════════════════════════════
   PROGRESS BARS — Orange Gradient
   ══════════════════════════════ */
.progress {
    height: 6px;
    border-radius: 3px;
    background: #f3f4f6;
}
.progress-bar {
    border-radius: 3px;
}
.progress-bar.bg-warning {
    background: linear-gradient(90deg, var(--hog-orange), var(--hog-gold)) !important;
}

/* ══════════════════════════════
   UTILITY — Quick Access
   ══════════════════════════════ */
.text-hog {
    color: var(--hog-orange) !important;
}
.bg-hog-soft {
    background: var(--hog-orange-soft) !important;
}
.border-hog {
    border-color: var(--hog-orange) !important;
}

/* Smooth transitions on all interactive elements */
a, button, .btn, .nav-link, .card, .dropdown-item, .list-group-item {
    transition: all var(--hog-transition);
}

/* ══════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════ */
@media (max-width: 991px) {
    .sidebar {
        z-index: 1050;
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.3);
    }
    .content-wrapper {
        padding: 1rem !important;
    }
}

/* ══════════════════════════════
   PRINT
   ══════════════════════════════ */
@media print {
    .sidebar, .top-navbar, .main-content > .bg-white.border-bottom {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}
