/* ============================================================
   EBENEZER SHOP — COMPLETE STYLESHEET
   ============================================================ */

:root {
    --primary: #ffc107;
    --primary-dark: #e0a800;
    --primary-light: #fff8e1;
    --dark: #0f172a;
    --dark-light: #1e293b;
    --success: #28a745;
    --danger: #dc3545;
    --info: #3b82f6;
    --warning: #ff9800;
    --gray: #64748b;
    --gray-light: #e2e8f0;
    --light: #f8fafc;
    --white: #ffffff;
    --sidebar-w: 260px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.12);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover { text-decoration: none; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

p {
    color: var(--gray);
    margin-bottom: 0.75rem;
}

/* ============================================================
   PUBLIC NAVBAR
   ============================================================ */
.navbar-public {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%) !important;
    padding: 12px 0;
    border-bottom: 3px solid var(--primary);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.navbar-public .container {
    position: relative;
    z-index: 5;
}

.navbar-public .navbar-brand {
    font-weight: 800;
    font-size: 1.4rem;
    color: #fff !important;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.navbar-public .navbar-brand i { color: var(--primary); }
.navbar-public .navbar-brand .text-warning { color: var(--primary) !important; }

.navbar-public .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    padding: 8px 16px !important;
    border-radius: 50px;
    transition: var(--transition);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.navbar-public .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 193, 7, 0.15);
}

.navbar-public .nav-link.active {
    color: var(--primary) !important;
    background: rgba(255, 193, 7, 0.15);
}

.nav-login-item {
    position: relative;
    z-index: 50;
    list-style: none;
}

a.btn-login,
a.btn-login:link,
a.btn-login:visited,
a.btn-login:hover,
a.btn-login:active,
a.btn-login:focus {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--warning)) !important;
    color: #0f172a !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 26px !important;
    border-radius: 50px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.35);
    transition: var(--transition);
    cursor: pointer !important;
    pointer-events: auto !important;
    white-space: nowrap;
    min-width: 110px;
    border: none;
}

a.btn-login:hover {
    background: linear-gradient(135deg, var(--warning), var(--primary)) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 193, 7, 0.55);
    color: #0f172a !important;
}

.navbar-dark .navbar-toggler {
    border: 2px solid rgba(255, 255, 255, 0.25);
    padding: 6px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.navbar-dark .navbar-toggler:hover {
    background: rgba(255, 193, 7, 0.15);
    border-color: var(--primary);
}

.navbar-dark .navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
    outline: none;
}

.navbar-dark .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255,193,7,1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    width: 24px;
    height: 24px;
}

/* ============================================================
   DASHBOARD SIDEBAR
   ============================================================ */
.app-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    z-index: 1040;
    overflow-y: auto;
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: rgba(255, 255, 255, 0.85);
    border-right: 3px solid var(--primary);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.app-sidebar::-webkit-scrollbar { width: 6px; }
.app-sidebar::-webkit-scrollbar-track { background: transparent; }
.app-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}
.app-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.25); }

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
}

.sidebar-brand a i {
    color: var(--primary);
    font-size: 1.2rem;
}

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

.sidebar-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 8px;
    transition: var(--transition);
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.user-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--warning));
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.35);
}

.user-meta { min-width: 0; flex: 1; }

.user-name {
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role { margin-top: 3px; }

.badge-role {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-role.admin {
    background: rgba(220, 53, 69, 0.2);
    color: #ff8b97;
}

.badge-role.manager {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 12px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow-y: auto;
}

.nav-section-title {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.35);
    padding: 14px 14px 6px;
    font-weight: 700;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: rgba(255, 255, 255, 0.75);
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    text-decoration: none;
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.95rem;
    color: rgba(255, 193, 7, 0.7);
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.sidebar-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-link:hover {
    background: rgba(255, 193, 7, 0.1);
    color: #fff;
    text-decoration: none;
}

.sidebar-link:hover i { color: var(--primary); }

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 152, 0, 0.1));
    color: #fff;
    box-shadow: inset 3px 0 0 var(--primary);
}

.sidebar-link.active i { color: var(--primary); }

.sidebar-footer {
    padding: 14px 12px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-link.logout-link { color: rgba(255, 255, 255, 0.55); }
.sidebar-link.logout-link i { color: rgba(220, 53, 69, 0.75); }

.sidebar-link.logout-link:hover {
    background: rgba(220, 53, 69, 0.15);
    color: #ff8b97;
}

.sidebar-link.logout-link:hover i { color: var(--danger); }

/* ============================================================
   APP TOPBAR (mobile only)
   ============================================================ */
.app-topbar { display: none; }

.topbar-menu-btn {
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
}

.topbar-menu-btn:hover { background: rgba(255, 193, 7, 0.25); }

.topbar-title {
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
}

.topbar-user { display: flex; align-items: center; }

.user-avatar-sm {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--warning));
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.85rem;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1035;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
    opacity: 1;
}

/* ============================================================
   MAIN WRAPPER
   ============================================================ */
body.public-view .main-wrapper {
    display: block;
    width: 100%;
    min-height: 60vh;
    background: var(--light);
}

body.logged-in .main-wrapper {
    display: block;
    margin-left: var(--sidebar-w);
    padding: 24px;
    min-height: 100vh;
    background: #f5f7fb;
    transition: margin-left 0.3s ease;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: 50px;
    font-weight: 600;
    padding: 10px 22px;
    transition: var(--transition);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.92rem;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.25);
}

.btn-warning {
    background: var(--primary);
    color: var(--dark);
}

.btn-warning:hover {
    background: var(--primary-dark);
    color: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.35);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #218838;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.35);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #c82333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.35);
}

.btn-primary {
    background: var(--info);
    color: #fff;
}

.btn-primary:hover {
    background: #2563eb;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.35);
}

.btn-secondary {
    background: var(--gray);
    color: #fff;
}

.btn-secondary:hover {
    background: #475569;
    color: #fff;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.05rem;
}

.btn-outline-warning {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline-warning:hover {
    background: var(--primary);
    color: var(--dark);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    background: #fff;
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    border-radius: var(--radius) var(--radius) 0 0 !important;
    border-bottom: none;
    padding: 16px 20px;
    font-weight: 700;
    background: transparent;
}

.card-body {
    padding: 20px;
}

.card-footer {
    background: #fff;
    border-top: 1px solid #f1f5f9;
    padding: 16px 20px;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-control,
.form-select {
    border-radius: 10px;
    border: 1.5px solid var(--gray-light);
    padding: 10px 14px;
    font-size: 0.95rem;
    transition: var(--transition);
    background: #fff;
    color: var(--dark);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15);
    outline: none;
}

.form-control::placeholder {
    color: #94a3b8;
}

.form-label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
    margin-bottom: 6px;
    display: block;
}

.input-group-text {
    border-radius: 10px 0 0 10px;
    border: 1.5px solid var(--gray-light);
    border-right: none;
    background: #fff;
    color: var(--gray);
}

.input-group .form-control {
    border-radius: 0 10px 10px 0;
}

/* ============================================================
   TABLES
   ============================================================ */
.table {
    margin-bottom: 0;
    vertical-align: middle;
    --bs-table-bg: transparent;
}

.table thead th {
    background: var(--dark);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    white-space: nowrap;
    vertical-align: middle;
}

.table tbody td {
    padding: 12px 16px;
    border-color: #f1f5f9;
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-hover tbody tr {
    transition: background 0.2s ease;
}

.table-hover tbody tr:hover {
    background: rgba(255, 193, 7, 0.05);
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    padding: 5px 12px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge.bg-success {
    background: rgba(40, 167, 69, 0.15) !important;
    color: var(--success);
}

.badge.bg-danger {
    background: rgba(220, 53, 69, 0.15) !important;
    color: var(--danger);
}

.badge.bg-warning {
    background: rgba(255, 193, 7, 0.15) !important;
    color: var(--warning);
}

.badge.bg-primary {
    background: rgba(59, 130, 246, 0.15) !important;
    color: var(--info);
}

.badge.bg-secondary {
    background: rgba(100, 116, 139, 0.15) !important;
    color: var(--gray);
}

.badge.bg-dark {
    background: var(--dark) !important;
    color: #fff;
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.15) !important;
    color: var(--info);
}

/* ============================================================
   MODALS
   ============================================================ */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    padding: 18px 22px;
    border-bottom: none;
    background: transparent;
}

.modal-header.bg-warning {
    background: var(--primary) !important;
    color: var(--dark);
}

.modal-header.bg-danger {
    background: var(--danger) !important;
    color: #fff;
}

.modal-header.bg-success {
    background: var(--success) !important;
    color: #fff;
}

.modal-header .modal-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid #f1f5f9;
    gap: 8px;
}

.modal-backdrop.show {
    opacity: 0.6;
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none;
    border-radius: 12px;
    padding: 14px 18px;
    font-weight: 500;
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #b8860b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 240px;
    animation: dropdownFade 0.2s ease;
}

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

.dropdown-item {
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-item:hover {
    background: rgba(255, 193, 7, 0.1);
}

.dropdown-item.text-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger) !important;
}

.dropdown-divider {
    margin: 4px 0;
    border-color: #f1f5f9;
}

.dropdown-item-text {
    padding: 8px 14px;
    font-size: 0.85rem;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-tile {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

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

.stat-icon-bg {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.stat-blue .stat-icon-bg { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-green .stat-icon-bg { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-orange .stat-icon-bg { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-purple .stat-icon-bg { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-red .stat-icon-bg { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-teal .stat-icon-bg { background: linear-gradient(135deg, #14b8a6, #0d9488); }

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

.stat-label {
    font-size: 0.78rem;
    color: var(--gray);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    word-break: break-word;
}

.stat-sub {
    font-size: 0.78rem;
    color: #94a3b8;
    margin-top: 2px;
}

/* ============================================================
   PERIOD CARDS
   ============================================================ */
.period-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    height: 100%;
}

.period-head {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: #fff;
    padding: 16px 22px;
    border-bottom: 3px solid var(--primary);
}

.period-head h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.period-head i { color: var(--primary); }

.period-body {
    padding: 8px 4px;
}

.period-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.92rem;
}

.period-item:last-child {
    border-bottom: none;
}

.period-item span {
    color: var(--gray);
    font-weight: 600;
}

.period-item strong {
    color: var(--dark);
    font-weight: 700;
}

.period-item.highlight {
    background: rgba(255, 193, 7, 0.08);
    border-radius: 8px;
    margin: 4px 8px;
}

/* ============================================================
   YEAR CARD
   ============================================================ */
.year-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-bottom: 3px solid var(--primary);
    color: #fff;
}

.year-head h5 {
    margin: 0 0 20px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.year-head i {
    color: var(--primary);
}

.year-item {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.year-label {
    font-size: 0.72rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    margin-bottom: 6px;
}

.year-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: #fff;
    word-break: break-word;
}

.year-value.text-success { color: #4ade80 !important; }
.year-value.text-danger { color: #f87171 !important; }
.year-value.text-primary { color: var(--primary) !important; }

/* ============================================================
   QUICK ACTIONS
   ============================================================ */
.quick-action {
    background: #fff;
    border-radius: 16px;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 700;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
    height: 100%;
    text-align: center;
}

.quick-action:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    color: var(--dark);
    text-decoration: none;
}

.quick-action i {
    font-size: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.qa-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.qa-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.qa-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
.qa-red { background: linear-gradient(135deg, #ef4444, #dc2626); }
.qa-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.qa-teal { background: linear-gradient(135deg, #14b8a6, #0d9488); }

/* ============================================================
   IMAGE UPLOAD
   ============================================================ */
.image-upload-zone {
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 26px 18px;
    text-align: center;
    background: #f8fafc;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.image-upload-zone:hover,
.image-upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(255, 193, 7, 0.05);
}

.image-upload-zone i.upload-icon {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.image-upload-zone .upload-hint {
    font-size: 0.85rem;
    color: var(--gray);
    margin: 0;
}

.image-upload-zone input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.image-preview-wrap {
    position: relative;
    display: none;
    margin-top: 14px;
}

.image-preview-wrap.show {
    display: block;
}

.image-preview {
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border-radius: 12px;
    background: #f1f5f9;
    border: 1px solid var(--gray-light);
}

.image-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--danger);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.image-preview-remove:hover {
    transform: scale(1.1);
}

.img-thumb-cell {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.2rem;
}

.product-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
    background: #f1f5f9;
}

/* ============================================================
   STOCK BADGES
   ============================================================ */
.stock-badge {
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.stock-good {
    background: rgba(40, 167, 69, 0.15);
    color: var(--success);
}

.stock-low {
    background: rgba(255, 193, 7, 0.15);
    color: #b8860b;
}

.stock-out {
    background: rgba(220, 53, 69, 0.15);
    color: var(--danger);
}

/* ============================================================
   CART & POS
   ============================================================ */
.product-grid {
    max-height: calc(100vh - 300px);
    overflow-y: auto;
    padding-right: 4px;
}

.pos-product {
    background: #fff;
    border: 2px solid var(--gray-light);
    border-radius: 12px;
    padding: 10px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-product:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.25);
}

.pos-product.out {
    opacity: 0.5;
    cursor: not-allowed;
}

.pos-thumb {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    flex-shrink: 0;
    object-fit: cover;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--primary);
    font-size: 1.3rem;
}

.cart-item {
    background: var(--light);
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.sticky-cart {
    position: sticky;
    top: 20px;
}

/* POS Customer selection */
.customer-box {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
    margin-bottom: 12px;
    position: relative;
    z-index: 10;
}

.customer-results {
    max-height: 220px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    margin-top: 8px;
    display: none;
    position: relative;
    z-index: 20;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.customer-result-item {
    padding: 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.15s;
    pointer-events: auto;
}

.customer-result-item:last-child { border-bottom: none; }
.customer-result-item:hover { background: rgba(255, 193, 7, 0.15); }
.customer-result-item strong { color: #0f172a; display: block; font-size: 0.9rem; }
.customer-result-item span { color: #64748b; font-size: 0.8rem; }

.debt-alert {
    background: rgba(220, 53, 69, 0.08);
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #dc3545;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.82rem;
    margin-top: 8px;
}

.delivery-row {
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #e2e8f0;
}

/* ============================================================
   PRODUCT CARDS (public)
   ============================================================ */
.prod-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid #f1f5f9;
}

.prod-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
}

.prod-image {
    height: 190px;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.prod-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prod-image .placeholder {
    font-size: 3.2rem;
    color: var(--primary);
    font-weight: 800;
}

.prod-body {
    padding: 18px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.prod-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 8px;
    line-height: 1.3;
    min-height: 2.6em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.prod-price {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--warning);
    margin-bottom: 8px;
}

.btn-prod {
    display: block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #25d366, #1da851);
    color: #fff;
    padding: 9px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-decoration: none;
    margin-top: auto;
    transition: var(--transition);
}

.btn-prod:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    color: #fff;
}

.btn-prod.disabled {
    background: #cbd5e1;
    pointer-events: none;
}

/* ============================================================
   WELCOME BANNER
   ============================================================ */
.welcome-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    border-radius: 20px;
    padding: 26px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    border-bottom: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.welcome-banner::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.15) 0%, transparent 70%);
    border-radius: 50%;
}

.welcome-text {
    position: relative;
    z-index: 2;
}

.welcome-text h2 {
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 6px;
    color: #fff;
}

.welcome-text p {
    color: #94a3b8;
    margin: 0;
    font-size: 0.95rem;
}

.role-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 193, 7, 0.15);
    border: 1px solid rgba(255, 193, 7, 0.3);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    position: relative;
    z-index: 2;
}

.action-card {
    display: flex;
    gap: 20px;
    padding: 28px 26px;
    border-radius: 20px;
    text-decoration: none;
    color: #fff;
    transition: var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.action-card::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
}

.action-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-decoration: none;
}

.action-primary {
    background: linear-gradient(135deg, var(--primary), var(--warning));
    color: var(--dark);
}

.action-primary .action-icon,
.action-primary h4,
.action-primary p,
.action-primary .action-cta {
    color: var(--dark);
}

.action-primary .action-icon {
    background: rgba(15, 23, 42, 0.1);
}

.action-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.action-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.action-icon {
    width: 70px;
    height: 70px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
}

.action-body {
    position: relative;
    z-index: 2;
    flex: 1;
}

.action-body h4 {
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.action-body p {
    margin: 0 0 10px;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.5;
}

.action-cta {
    font-weight: 700;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-tile {
    background: #fff;
    border-radius: 18px;
    padding: 22px;
    display: flex;
    gap: 16px;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    height: 100%;
    transition: var(--transition);
}

.info-tile:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.info-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    flex-shrink: 0;
}

.info-icon.bg-blue { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.info-icon.bg-green { background: linear-gradient(135deg, #22c55e, #16a34a); }
.info-icon.bg-orange { background: linear-gradient(135deg, #f59e0b, #d97706); }

.info-content {
    min-width: 0;
}

.info-content h6 {
    font-size: 0.8rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
    font-weight: 700;
}

.info-content h3 {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 2px;
    color: var(--dark);
}

.tips-card {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-left: 5px solid #f59e0b;
    border-radius: 16px;
    padding: 22px 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.tips-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f59e0b;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.tips-body h6 {
    color: #78350f;
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1rem;
}

.tips-body ul {
    margin: 0;
    padding-left: 20px;
    color: #78350f;
    font-size: 0.9rem;
    line-height: 1.8;
}

.tips-body ul li {
    margin-bottom: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--dark);
    color: #fff;
    padding: 50px 0 20px;
    border-top: 3px solid var(--primary);
    margin-top: 0;
}

.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand i { color: var(--primary); }
.footer-brand .text-warning { color: var(--primary) !important; }

.footer h5 {
    font-weight: 700;
    margin-bottom: 18px;
    color: #fff;
    position: relative;
    padding-bottom: 10px;
    font-size: 1rem;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 36px;
    height: 3px;
    background: var(--primary);
    border-radius: 10px;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer ul li a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer ul li i {
    color: var(--primary);
    margin-right: 8px;
    width: 16px;
}

.footer .social-links a {
    display: inline-flex;
    width: 38px;
    height: 38px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: #fff;
    margin-right: 8px;
    transition: var(--transition);
}

.footer .social-links a:hover {
    background: var(--primary);
    color: var(--dark);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 30px;
    padding-top: 18px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition);
    animation: pulseGreen 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.5);
}

@keyframes pulseGreen {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.text-primary-custom { color: var(--primary); }
.text-dark-custom { color: var(--dark); }
.bg-primary-custom { background: var(--primary); }
.bg-dark-custom { background: var(--dark); }
.rounded-lg { border-radius: var(--radius-lg); }
.shadow-custom { box-shadow: var(--shadow); }
.shadow-custom-lg { box-shadow: var(--shadow-lg); }
.highlight-text { color: var(--warning); }
.min-vh-100 { min-height: 100vh; }

/* ============================================================
   HERO TEXT PROTECTION
   Ensures hero paragraphs stay white/light on dark gradients
   ============================================================ */
.page-hero p,
.about-hero p,
.hero-section p,
.hero-content p {
    color: rgba(255, 255, 255, 0.9) !important;
}

.page-hero h1,
.about-hero h1,
.hero-section h1,
.hero-content h1 {
    color: #ffffff !important;
}

.page-hero h1 span,
.about-hero h1 span,
.hero-section h1 span,
.hero-content h1 span {
    color: #ffc107 !important;
    -webkit-text-fill-color: #ffc107;
    background: none;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.fade-in { animation: fadeIn 0.5s ease forwards; }
.fade-in-up { animation: fadeInUp 0.6s ease forwards; }
.scale-in { animation: scaleIn 0.4s ease forwards; }

/* ============================================================
   RESPONSIVE — TABLET
   ============================================================ */
@media (max-width: 991px) {
    .navbar-public .navbar-brand {
        font-size: 1.25rem;
    }

    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.3);
    }

    .app-sidebar.open {
        transform: translateX(0);
    }

    body.logged-in .main-wrapper {
        margin-left: 0;
        padding: 16px;
        padding-top: 80px;
    }

    .app-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(135deg, #0f172a, #1e293b);
        color: #fff;
        padding: 12px 16px;
        border-bottom: 3px solid var(--primary);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1030;
    }

    .sidebar-overlay {
        display: none;
    }

    .sidebar-overlay.show {
        display: block;
    }

    .stat-value {
        font-size: 1.1rem;
    }

    .stat-tile {
        padding: 16px;
        gap: 12px;
    }

    .stat-icon-bg {
        width: 48px;
        height: 48px;
        font-size: 1.15rem;
    }

    .modal-body {
        padding: 18px;
    }

    .modal-header,
    .modal-footer {
        padding: 14px 18px;
    }
}

@media (min-width: 992px) {
    .sidebar-overlay {
        display: none !important;
    }

    .app-topbar {
        display: none !important;
    }
}

/* ============================================================
   RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.1rem;
    }

    .whatsapp-float {
        width: 48px;
        height: 48px;
        font-size: 1.3rem;
        bottom: 16px;
        right: 16px;
    }

    .footer {
        padding: 32px 0 16px;
    }

    .footer h5 {
        margin-top: 16px;
    }

    .table thead th {
        font-size: 0.72rem;
        padding: 10px;
    }

    .table tbody td {
        font-size: 0.82rem;
        padding: 10px;
    }

    .action-card {
        padding: 22px 20px;
        flex-direction: column;
    }

    .action-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .action-body h4 {
        font-size: 1.15rem;
    }

    .info-tile {
        padding: 18px;
    }

    .info-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }

    .period-item {
        padding: 10px 18px;
        font-size: 0.85rem;
    }

    .year-card {
        padding: 18px;
    }

    .year-value {
        font-size: 0.95rem;
    }

    .quick-action {
        padding: 16px 10px;
        font-size: 0.8rem;
    }

    .quick-action i {
        font-size: 1.5rem;
        width: 44px;
        height: 44px;
    }

    .product-grid {
        max-height: 400px;
    }

    .sticky-cart {
        position: static;
    }

    .welcome-banner {
        padding: 20px;
    }

    .welcome-text h2 {
        font-size: 1.2rem;
    }

    .tips-card {
        padding: 18px;
        flex-direction: column;
    }
}

/* ============================================================
   RESPONSIVE — SMALL PHONES
   ============================================================ */
@media (max-width: 575px) {
    .navbar-brand {
        font-size: 1rem;
    }

    .btn {
        padding: 8px 18px;
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 5px 10px;
        font-size: 0.75rem;
    }

    .table thead th {
        font-size: 0.68rem;
        padding: 8px;
    }

    .table tbody td {
        font-size: 0.78rem;
        padding: 8px;
    }

    body.logged-in .main-wrapper {
        padding: 12px;
        padding-top: 76px;
    }

    .stat-value {
        font-size: 1rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .modal-dialog {
        margin: 8px;
    }

    .badge {
        font-size: 0.68rem;
        padding: 4px 10px;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .navbar-public,
    .app-sidebar,
    .app-topbar,
    .sidebar-overlay,
    .footer,
    .whatsapp-float,
    .no-print,
    .btn {
        display: none !important;
    }

    body,
    body.logged-in .main-wrapper,
    body.public-view .main-wrapper {
        background: #fff !important;
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid var(--gray-light) !important;
    }
}