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

:root {
    --primary:        #f59e0b;
    --primary-dark:   #d97706;
    --primary-light:  #fbbf24;
    --accent:         #fb923c;
    --bg-dark:        #0f172a;
    --bg-card:        #1e293b;
    --bg-card-alt:    #334155;
    --text-white:     #f8fafc;
    --text-muted:     #94a3b8;
    --success:        #22c55e;
    --danger:         #ef4444;
    --info:           #3b82f6;
    --warning:        #eab308;
    --radius:         14px;
    --radius-sm:      10px;
    --shadow:         0 8px 32px rgba(0,0,0,.25);
    --transition:     .25s cubic-bezier(.4,0,.2,1);
    --bottom-nav-h:   64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg-dark);
    color: var(--text-white);
    min-height: 100dvh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* ── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-card-alt); border-radius: 99px; }

/* ── LOGIN PAGE ────────────────────────────────────────────── */
.login-wrapper {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(245,158,11,.15) 0%, transparent 70%);
    top: -80px; right: -80px;
    animation: pulse-glow 4s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 250px; height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(251,146,60,.1) 0%, transparent 70%);
    bottom: -60px; left: -60px;
    animation: pulse-glow 4s ease-in-out infinite 2s;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: .6; }
    50% { transform: scale(1.15); opacity: 1; }
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(30,41,59,.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(248,250,252,.06);
    border-radius: var(--radius);
    padding: 2.5rem 2rem 2rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.login-logo {
    width: 140px; height: 140px;
    object-fit: contain;
    margin: 0 auto 0rem;
    display: block;
    filter: drop-shadow(0 4px 12px rgba(245,158,11,.35));
}

.login-title {
    text-align: center;
    font-size: 1.55rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: .35rem;
}

.login-subtitle {
    text-align: center;
    font-size: .82rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* ── FORM CONTROLS ─────────────────────────────────────────── */
.form-floating > .form-control,
.form-control.custom-input {
    background: var(--bg-dark);
    border: 1px solid rgba(248,250,252,.08);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    transition: var(--transition);
}

.form-floating > label {
    color: var(--text-muted);
}

.form-floating > .form-control:focus,
.form-control.custom-input:focus {
    background: var(--bg-dark);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
    color: var(--text-white);
}

.form-select.custom-select {
    background-color: var(--bg-dark);
    border: 1px solid rgba(248,250,252,.08);
    color: var(--text-white);
    border-radius: var(--radius-sm);
    font-size: .92rem;
    transition: var(--transition);
}

.form-select.custom-select:focus {
    background-color: var(--bg-dark);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(245,158,11,.15);
    color: var(--text-white);
}

.form-label {
    color: var(--text-muted);
    font-size: .82rem;
    font-weight: 500;
    margin-bottom: .4rem;
}

/* ── BUTTONS ───────────────────────────────────────────────── */
.btn-solar {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #000;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    padding: .75rem 1.5rem;
    font-size: .95rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-solar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,.15));
    opacity: 0;
    transition: var(--transition);
}

.btn-solar:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(245,158,11,.35); color: #000; }
.btn-solar:hover::after { opacity: 1; }
.btn-solar:active { transform: translateY(0); }

.btn-outline-solar {
    border: 1px solid var(--primary);
    color: var(--primary);
    background: transparent;
    border-radius: var(--radius-sm);
    padding: .55rem 1.2rem;
    font-weight: 500;
    font-size: .85rem;
    transition: var(--transition);
}

.btn-outline-solar:hover {
    background: var(--primary);
    color: #000;
}

/* ── BOTTOM NAVIGATION ─────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    height: var(--bottom-nav-h);
    background: rgba(30,41,59,.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(248,250,252,.06);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 500;
    padding: .5rem 0;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
}

.bottom-nav .nav-item i {
    font-size: 1.25rem;
    transition: var(--transition);
}

.bottom-nav .nav-item.active,
.bottom-nav .nav-item:hover {
    color: var(--primary);
}

.bottom-nav .nav-item.active i {
    filter: drop-shadow(0 2px 6px rgba(245,158,11,.4));
}

/* ── OFFCANVAS SIDE MENU ───────────────────────────────────── */
.offcanvas.offcanvas-start {
    background: var(--bg-card);
    border-right: 1px solid rgba(248,250,252,.06);
    width: 280px;
    color: var(--text-white);
}

/* ── OFFCANVAS BOTTOM SHEET (dark theme) ───────────────────── */
.offcanvas.offcanvas-bottom {
    background: var(--bg-card) !important;
    color: var(--text-white) !important;
    border-top: 1px solid rgba(248,250,252,.08) !important;
}

.offcanvas.offcanvas-bottom .offcanvas-header {
    border-bottom: 1px solid rgba(248,250,252,.06);
    background: var(--bg-card);
}

.offcanvas.offcanvas-bottom .offcanvas-title {
    color: var(--text-white);
}

.offcanvas.offcanvas-bottom .btn-close {
    filter: invert(1) brightness(2);
}

.offcanvas.offcanvas-bottom .offcanvas-body {
    background: var(--bg-card);
    color: var(--text-white);
}

.offcanvas-header {
    border-bottom: 1px solid rgba(248,250,252,.06);
    padding: 1.2rem 1.5rem;
}

.offcanvas-title {
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.offcanvas-title img {
    width: 32px; height: 32px;
    object-fit: contain;
}

.offcanvas .btn-close {
    filter: invert(1) brightness(2);
}

.side-menu {
    list-style: none;
    padding: .8rem 0;
}

.side-menu li a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.side-menu li a:hover,
.side-menu li a.active {
    color: var(--primary);
    background: rgba(245,158,11,.06);
    border-left-color: var(--primary);
}

.side-menu li a i {
    width: 22px;
    text-align: center;
    font-size: 1.05rem;
}

.side-menu .menu-divider {
    height: 1px;
    background: rgba(248,250,252,.06);
    margin: .6rem 1.5rem;
}

/* ── PAGE WRAPPER ──────────────────────────────────────────── */
.page-wrapper {
    padding: 1rem 1rem calc(var(--bottom-nav-h) + 1rem);
    max-width: 600px;
    margin: 0 auto;
}

/* ── PAGE HEADER ───────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.2rem;
}

.page-header h1 {
    font-size: 1.35rem;
    font-weight: 700;
}

/* ── DASHBOARD CARDS ───────────────────────────────────────── */
.stat-card {
    background: var(--bg-card);
    border: 1px solid rgba(248,250,252,.06);
    border-radius: var(--radius);
    padding: 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
    text-decoration: none;
    color: var(--text-white);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(245,158,11,.15);
    color: var(--text-white);
}

.stat-icon {
    width: 50px; height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icon.amber  { background: rgba(245,158,11,.15); color: var(--primary); }
.stat-icon.blue   { background: rgba(59,130,246,.15);  color: var(--info); }
.stat-icon.green  { background: rgba(34,197,94,.15);   color: var(--success); }
.stat-icon.red    { background: rgba(239,68,68,.15);   color: var(--danger); }

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stat-info p {
    font-size: .78rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── DATA LIST CARDS ───────────────────────────────────────── */
.data-card {
    background: var(--bg-card);
    border: 1px solid rgba(248,250,252,.06);
    border-radius: var(--radius-sm);
    padding: 1rem 1.1rem;
    margin-bottom: .65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.data-card:hover {
    border-color: rgba(245,158,11,.12);
}

.data-card .data-info h6 {
    font-size: .92rem;
    font-weight: 600;
    margin-bottom: .15rem;
}

.data-card .data-info small {
    color: var(--text-muted);
    font-size: .75rem;
}

.data-card .data-actions {
    display: flex;
    gap: .4rem;
}

.data-card .data-actions .btn {
    width: 34px; height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: .82rem;
    padding: 0;
    border: none;
    transition: var(--transition);
}

.btn-icon-edit {
    background: rgba(59,130,246,.12);
    color: var(--info);
}
.btn-icon-edit:hover { background: var(--info); color: #fff; }

.btn-icon-toggle {
    background: rgba(34,197,94,.12);
    color: var(--success);
}
.btn-icon-toggle:hover { background: var(--success); color: #fff; }
.btn-icon-toggle.inactive {
    background: rgba(239,68,68,.12);
    color: var(--danger);
}
.btn-icon-toggle.inactive:hover { background: var(--danger); color: #fff; }

.btn-icon-delete {
    background: rgba(239,68,68,.12);
    color: var(--danger);
}
.btn-icon-delete:hover { background: var(--danger); color: #fff; }

/* ── BADGES ────────────────────────────────────────────────── */
.badge-active {
    background: rgba(34,197,94,.15);
    color: var(--success);
    font-size: .7rem;
    font-weight: 600;
    padding: .25rem .6rem;
    border-radius: 6px;
}

.badge-inactive {
    background: rgba(239,68,68,.15);
    color: var(--danger);
    font-size: .7rem;
    font-weight: 600;
    padding: .25rem .6rem;
    border-radius: 6px;
}

/* ── MODAL OVERRIDES ───────────────────────────────────────── */
.modal-content {
    background: var(--bg-card);
    border: 1px solid rgba(248,250,252,.08);
    border-radius: var(--radius);
    color: var(--text-white);
}

.modal-header {
    border-bottom: 1px solid rgba(248,250,252,.06);
    padding: 1rem 1.3rem;
}

.modal-title {
    font-weight: 600;
    font-size: 1.05rem;
}

.modal-header .btn-close {
    filter: invert(1) brightness(2);
}

.modal-body {
    padding: 1.3rem;
}

.modal-footer {
    border-top: 1px solid rgba(248,250,252,.06);
    padding: .8rem 1.3rem;
}

/* ── LOADING SPINNER ───────────────────────────────────────── */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* ── EMPTY STATE ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 2.5rem;
    margin-bottom: .8rem;
    opacity: .4;
}

.empty-state p {
    font-size: .9rem;
}

/* ── CATEGORY BADGE ────────────────────────────────────────── */
.badge-category {
    background: rgba(139,92,246,.12);
    color: #a78bfa;
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .55rem;
    border-radius: 5px;
}

/* ── FILTER BAR ────────────────────────────────────────────── */
.filter-bar {
    margin-bottom: 1rem;
}

/* ── Password toggle ───────────────────────────────────────── */
.input-group .btn-outline-secondary {
    border-color: rgba(248,250,252,.08);
    color: var(--text-muted);
    background: var(--bg-dark);
}

.input-group .btn-outline-secondary:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--bg-dark);
}

/* ── RESPONSIVE TWEAKS ─────────────────────────────────────── */
@media (max-width: 400px) {
    .login-card { padding: 2rem 1.4rem 1.5rem; }
    .page-wrapper { padding: .8rem .8rem calc(var(--bottom-nav-h) + .8rem); }
}

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

.animate-in {
    animation: fadeInUp .35s ease-out;
}

/* ── Price display ─────────────────────────────────────────── */
.price-tag {
    color: var(--primary);
    font-weight: 700;
    font-size: .88rem;
}

/* ── FORM CARD (full-page forms) ───────────────────────────── */
.form-card {
    background: var(--bg-card);
    border: 1px solid rgba(248,250,252,.06);
    border-radius: var(--radius);
    padding: 1.5rem 1.2rem;
    margin-bottom: 1rem;
}

/* ── Staff / Profile Image ─────────────────────────────────── */
.staff-thumb {
    width: 36px; height: 36px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.profile-preview {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary);
}

.profile-placeholder {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: var(--bg-card-alt);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    border: 2px dashed rgba(248,250,252,.12);
}

/* ── Textarea ──────────────────────────────────────────────── */
textarea.custom-input {
    resize: vertical;
    min-height: 60px;
}

