/* =============================================
   AumentaHub Business Portal
   Light Theme — Client-Facing Design
   ============================================= */

:root {
    /* Brand Colors (New Palette) */
    --primary: #2A72F3;
    /* Digital Cobalt */
    --primary-light: rgba(42, 114, 243, 0.1);
    --primary-hover: #1e62d4;
    --secondary: #F6BF42;
    /* Golden Honey */
    --accent: #4022E2;
    /* Electric Indigo */
    --complementary: #EB3E51;
    /* Urban Coral */
    --success: #286050;
    /* Forest Depth */
    --warning: #F08C47;
    /* Amber Clay */
    --danger: #EB3E51;

    /* Layout Refinements */
    --sidebar-width: 280px;
    --topbar-height: 72px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Light Theme Surfaces (Aumenta Style) */
    --bg-page: #f9fafb;
    --bg-white: #ffffff;
    --bg-sidebar: #ffffff;
    --bg-sidebar-item: #f3f4f6;

    /* Text */
    --text-dark: #111827;
    --text-body: #4b5563;
    --text-muted: #9ca3af;
    --text-subtle: #d1d5db;
    --text-sidebar: #4b5563;

    /* Borders */
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows (Aumenta Premium) */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 20px 25px -5px rgba(0, 0, 0, 0.03), 0 10px 10px -5px rgba(0, 0, 0, 0.02);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cursor-pointer { cursor: pointer; }
.x-small { font-size: 0.65rem; }

/* Hide dropdown arrow on user card */
.sidebar-user-card.dropdown-toggle::after { display: none; }

/* =============================================
   Reset & Base
   ============================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    background: var(--bg-page);
    color: var(--text-dark);
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

h1,
h2,
h3,
h4,
h5,
h6,
.onest-font {
    font-family: 'Onest', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.blauer-title {
    font-family: 'Onest', sans-serif;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--text-dark);
}

/* =============================================
   Login / Auth (keep dark for contrast)
   ============================================= */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    z-index: 0;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 3.5rem 3rem;
    position: relative;
    z-index: 10;
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    margin: 2rem auto;
}

.form-group-business {
    position: relative;
    margin-bottom: 1.8rem;
    width: 100%;
    display: flex;
    justify-content: center;
}

.form-control-business {
    width: 90%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 1.75rem 1.25rem 0.75rem 1.25rem;
    border-radius: 16px;
    transition: var(--transition);
    font-size: 1rem;
    outline: none;
}

.form-control-business:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05);
}

.form-label-business {
    position: absolute;
    left: 8%;
    top: 1.25rem;
    color: rgba(255, 255, 255, 0.5);
    transition: var(--transition);
    pointer-events: none;
    font-size: 1rem;
    margin-bottom: 0;
}

.form-control-business:focus+.form-label-business,
.form-control-business:not(:placeholder-shown)+.form-label-business {
    top: 0.5rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #fff;
    opacity: 0.9;
}

.btn-primary-business {
    width: 100%;
    background: var(--primary);
    color: white;
    font-weight: 700;
    padding: 1.1rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 15px -3px rgba(42, 114, 243, 0.3);
    font-size: 1.05rem;
    margin-top: 1rem;
}

.btn-primary-business:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

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

/* =============================================
   Mobile Top Bar
   ============================================= */
.mobile-top-bar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    z-index: 1100;
    padding: 0 1.25rem;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-xs);
}

/* =============================================
   Sidebar — dark for strong contrast/brand
   ============================================= */
.sidebar-business {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    z-index: 1100;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-inner {
    padding: 1.25rem 0.875rem;
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.brand-logo-img {
    height: 32px;
    filter: none;
    /* Let the original color show */
}

.sidebar-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 0 0.875rem;
    margin: 1.5rem 0 0.5rem;
}

.nav-link-business {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 0.875rem;
    color: var(--text-sidebar);
    font-weight: 600;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    text-decoration: none;
    border: none;
    margin: 0 0.5rem;
}

.nav-link-business i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
    opacity: 0.7;
}

.nav-link-business:hover {
    color: var(--primary);
    background: var(--bg-sidebar-item);
}

.nav-link-business.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 8px 16px rgba(42, 114, 243, 0.2);
}

.nav-link-business.active i {
    opacity: 1;
}

/* Sidebar user */
.sidebar-user-card {
    padding: 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-sidebar-item);
    border: 1px solid var(--border);
    margin: 0.5rem;
}

.sidebar-avatar {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 8px rgba(42, 114, 243, 0.15);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-md);
    background: transparent;
    border: none;
    width: 100%;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.btn-logout:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.08);
}

/* =============================================
   Main Content
   ============================================= */
.main-content-business {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 2rem 2.25rem;
    transition: var(--transition);
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* =============================================
   Page Header
   ============================================= */
.page-header-title {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--text-dark);
    line-height: 1.3;
    margin: 0;
}

.page-header-sub {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0.45rem 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-body);
    box-shadow: var(--shadow-xs);
}

/* =============================================
   Stat Cards
   ============================================= */
.card-stat {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    cursor: default;
}

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

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.375rem;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    color: var(--text-dark);
}

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

/* Stat card accent bar - Subtler for Aumenta Style */
.card-stat-primary {
    border-left: 4px solid var(--primary);
}

.card-stat-success {
    border-left: 4px solid var(--success);
}

.card-stat-accent {
    border-left: 4px solid var(--accent);
}

/* =============================================
   Chart & Status Cards
   ============================================= */
.chart-card,
.status-card,
.table-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(42, 114, 243, 0.04), 0 1px 2px rgba(0, 0, 0, 0.04);
}

.chart-card {
    padding: 1.5rem;
}

.status-card {
    padding: 1.5rem;
}

.table-card {
    padding: 0;
    overflow: hidden;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0;
    letter-spacing: -0.03em;
}

.section-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin: 0.2rem 0 0;
}

/* Status items */
.status-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.status-item:hover {
    border-color: var(--border);
}

.status-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

/* =============================================
   Table
   ============================================= */
.table-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.table-business {
    width: 100%;
    border-collapse: collapse;
}

.table-business thead th {
    text-align: left;
    padding: 0.75rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table-business tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}

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

.table-business tbody tr:hover {
    background: #fafbff;
}

.table-business td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-body);
    vertical-align: middle;
}

/* Badge Status - Pastel Style */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.875rem;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.badge-status::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* Action button */
.btn-action {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border) !important;
    background: white;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: var(--transition);
    cursor: pointer;
    box-shadow: var(--shadow-xs);
}

.btn-action:hover {
    background: var(--primary-light);
    border-color: var(--primary) !important;
    color: var(--primary);
    transform: scale(1.05);
}

/* Empty state */
.table-empty {
    text-align: center;
    padding: 3rem 1rem;
}

/* =============================================
   Table Pagination (override dark defaults)
   ============================================= */
nav[aria-label][class*="pagination"] span,
nav[aria-label][class*="pagination"] a {
    background: var(--bg-white) !important;
    color: var(--text-body) !important;
    border-color: var(--border) !important;
}

/* =============================================
   Responsive
   ============================================= */
@media (max-width: 991.98px) {
    .sidebar-business {
        transform: translateX(-100%);
        width: 100%;
        max-width: 280px;
    }

    .sidebar-business.show {
        transform: translateX(0);
        box-shadow: 8px 0 32px rgba(0, 0, 0, 0.2);
    }

    .main-content-business {
        margin-left: 0;
        padding: 1.25rem;
        padding-top: calc(var(--topbar-height) + 1.25rem);
    }

    .mobile-top-bar {
        display: flex;
    }
}

@media (max-width: 575.98px) {
    .main-content-business {
        padding: 1rem;
        padding-top: calc(var(--topbar-height) + 1rem);
    }

    .page-header-title {
        font-size: 1.25rem;
    }
}