﻿/* ══════════════════════════════════════════════════════
   Heavy Equipment Inventory — Site Stylesheet
   ══════════════════════════════════════════════════════ */

:root {
    --primary: #0f172a; /* dark navy    */
    --accent: #f59e0b; /* amber        */
    --accent-fg: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --bg: #f1f5f9;
    --card: #ffffff;
    --sidebar-w: 260px;
    --font: 'Inter', sans-serif;
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--primary);
    margin: 0;
}

/* ── SIDEBAR ─────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--primary);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    border-right: 1px solid rgba(255,255,255,.06);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand-icon {
    width: 38px;
    height: 38px;
    background: var(--accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .brand-icon i, .brand-icon-lg i {
        color: var(--primary);
        font-size: 1.1rem;
    }

.brand-name {
    display: block;
    font-weight: 800;
    font-size: .85rem;
    color: #fff;
    letter-spacing: .08em;
}

.brand-sub {
    display: block;
    font-size: .6rem;
    color: rgba(255,255,255,.3);
    letter-spacing: .3em;
    font-family: monospace;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    color: rgba(255,255,255,.55);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    transition: all .2s;
}

    .nav-item:hover {
        color: #fff;
        background: rgba(255,255,255,.07);
    }

    .nav-item.active {
        color: var(--accent);
        background: rgba(245,158,11,.1);
    }

    .nav-item i {
        font-size: 1rem;
        width: 18px;
    }

.sidebar-footer {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
}

/*.logout-btn {
    color: rgba(255,255,255,.4) !important;
    cursor: pointer; 

    .logout-btn:hover {
        color: #f87171 !important;
        background: rgba(248,113,113,.1) !important;
    }
*/
/* ── MAIN CONTENT ────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
}

/* ── PAGE STRUCTURE ──────────────────────────────────── */
.page-content {
    padding: 32px 40px;
    max-width: 1280px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.page-title {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0;
}

.page-sub {
    color: var(--muted);
    font-size: .88rem;
    margin: 4px 0 0;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn-accent {
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 600;
    border: none;
    padding: 9px 20px;
    border-radius: 10px;
    transition: opacity .2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

    .btn-accent:hover {
        opacity: .88;
        color: var(--accent-fg);
    }

/* ── STAT CARDS ──────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
    transition: box-shadow .2s;
}

    .stat-card:hover {
        box-shadow: 0 6px 24px rgba(0,0,0,.08);
    }

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon i {
        color: #fff;
        font-size: 1.15rem;
    }

.bg-amber {
    background: #f59e0b;
}

.bg-green {
    background: #10b981;
}

.bg-blue {
    background: #3b82f6;
}

.bg-orange {
    background: #f97316;
}

.bg-red {
    background: #ef4444;
}

.stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .06em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
}

/* ── PANELS ──────────────────────────────────────────── */
.panel {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: .95rem;
    font-weight: 700;
    margin: 0;
}

.panel-link {
    font-size: .8rem;
    color: var(--accent);
    text-decoration: none;
}

    .panel-link:hover {
        text-decoration: underline;
    }

.panel-body {
    padding: 8px 0;
}

.empty-state {
    text-align: center;
    color: var(--muted);
    padding: 32px;
    font-size: .88rem;
    margin: 0;
}

/* ── LIST ROWS ───────────────────────────────────────── */
.list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 22px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}

    .list-row:last-child {
        border-bottom: none;
    }

    .list-row:hover {
        background: var(--bg);
    }

.list-title {
    font-size: .9rem;
    font-weight: 600;
}

.list-sub {
    font-size: .78rem;
    color: var(--muted);
    margin-top: 2px;
}

.maint-date {
    font-size: .8rem;
    color: var(--muted);
}

/* ── STATUS BADGES ───────────────────────────────────── */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .73rem;
    font-weight: 600;
    border: 1px solid;
    text-transform: capitalize;
}

.status-available {
    background: #ecfdf5;
    color: #059669;
    border-color: #a7f3d0;
}

.status-inuse {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.status-maintenance {
    background: #fffbeb;
    color: #d97706;
    border-color: #fde68a;
}

.status-retired {
    background: #fef2f2;
    color: #dc2626;
    border-color: #fecaca;
}

/* ── EQUIPMENT GRID ──────────────────────────────────── */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.equipment-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    transition: box-shadow .2s, border-color .2s;
}

    .equipment-card:hover {
        box-shadow: 0 8px 30px rgba(0,0,0,.1);
        border-color: rgba(245,158,11,.35);
    }

.equipment-card-img {
    height: 180px;
    background: var(--bg);
    position: relative;
    overflow: hidden;
}

    .equipment-card-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform .4s;
    }

.equipment-card:hover .equipment-card-img img {
    transform: scale(1.05);
}

.equipment-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    opacity: .25;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

.equipment-card-body {
    padding: 18px;
}

.equipment-card-title {
    font-size: 1rem;
    font-weight: 700;
}

.equipment-card-cat {
    font-size: .75rem;
    color: var(--muted);
    font-family: monospace;
    margin: 2px 0 4px;
}

.equipment-card-mfr {
    font-size: .82rem;
    color: var(--muted);
    margin-bottom: 10px;
}

.equipment-card-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

    .equipment-card-meta span {
        font-size: .75rem;
        color: var(--muted);
        display: flex;
        align-items: center;
        gap: 4px;
    }

/* ── FILTER BAR ──────────────────────────────────────── */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-search {
    position: relative;
    flex: 1;
    min-width: 200px;
}

    .filter-search .form-control {
        padding-left: 36px;
    }

.filter-search-icon {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: .85rem;
}

.filter-select {
    width: 150px;
}

/* ── FORMS ───────────────────────────────────────────── */
.form-section {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 20px;
}

.section-title {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.form-label {
    font-size: .85rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.form-control, .form-select {
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: .9rem;
    padding: 9px 12px;
    transition: border-color .2s, box-shadow .2s;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--accent);
        box-shadow: 0 0 0 3px rgba(245,158,11,.15);
        outline: none;
    }

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 8px;
}

.img-preview {
    width: 120px;
    height: 120px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid var(--border);
}

.back-link {
    color: var(--muted);
    font-size: .88rem;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .back-link:hover {
        color: var(--primary);
    }

/* ── DETAIL VIEW ─────────────────────────────────────── */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 24px;
}

.detail-left {
}

.detail-right {
}

.detail-img-wrap {
    height: 220px;
    overflow: hidden;
}

.detail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-img-placeholder {
    width: 100%;
    height: 100%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    opacity: .25;
}

.detail-name {
    font-size: 1.25rem;
    font-weight: 800;
    margin: 0 0 4px;
}

.detail-cat {
    font-family: monospace;
    color: var(--muted);
    font-size: .82rem;
    margin: 0;
}

.detail-rows {
    padding: 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 22px;
    border-bottom: 1px solid var(--border);
    font-size: .88rem;
}

    .detail-row:last-child {
        border-bottom: none;
    }

    .detail-row span {
        color: var(--muted);
    }

/* ── LOGIN PAGE ──────────────────────────────────────── */
.login-page {
    display: flex;
    min-height: 100vh;
}

.login-hero {
    flex: 1;
    background: var(--primary);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.login-hero-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
    background-size: 60px 60px;
}

.login-hero::before {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: rgba(245,158,11,.07);
}

.login-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(245,158,11,.04);
}

.login-hero-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-icon-lg {
    width: 50px;
    height: 50px;
    background: var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .brand-icon-lg i {
        font-size: 1.3rem;
        color: var(--primary);
    }

.brand-name-lg {
    font-size: 1rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: .08em;
    display: block;
}

.brand-tagline {
    font-size: .6rem;
    color: rgba(255,255,255,.3);
    letter-spacing: .3em;
    font-family: monospace;
    display: block;
}

.hero-headline {
    font-size: clamp(2rem,4vw,3.2rem);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin: 0 0 20px;
}

.text-accent {
    color: var(--accent);
}

.hero-sub {
    color: rgba(255,255,255,.55);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-features {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 12px;
}

.hero-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    border: 1px solid rgba(255,255,255,.09);
}

    .hero-feature i {
        color: var(--accent);
        font-size: 1.1rem;
    }

    .hero-feature span {
        color: rgba(255,255,255,.65);
        font-size: .75rem;
        font-weight: 600;
        text-align: center;
    }

/* Right Panel */
.login-form-panel {
    width: 480px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 48px;
}

.login-card {
    width: 100%;
    max-width: 360px;
}

.login-card-header {
    text-align: center;
    margin-bottom: 36px;
}

.login-icon {
    width: 58px;
    height: 58px;
    background: rgba(245,158,11,.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

    .login-icon i {
        color: var(--accent);
        font-size: 1.5rem;
    }

.login-card-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
}

.login-card-header p {
    color: var(--muted);
    font-size: .9rem;
    margin: 0;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
}

.form-control-custom {
    padding-left: 36px !important;
}

.btn-login {
    background: var(--accent);
    color: var(--accent-fg);
    font-weight: 700;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 1rem;
    transition: opacity .2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .btn-login:hover {
        opacity: .88;
        color: var(--accent-fg);
    }

.forgot-link {
    color: var(--accent);
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.login-footer {
    margin-top: 36px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: .78rem;
}

/* ── EMPTY PAGE ──────────────────────────────────────── */
.empty-page {
    text-align: center;
    padding: 80px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    opacity: .5;
}

.empty-page p {
    color: var(--muted);
    font-size: 1rem;
}

/* ── RESPONSIVE ──────────────────────────────────────── */
@media (max-width: 992px) {
    .login-hero {
        display: none;
    }

    .login-form-panel {
        width: 100%;
        min-height: 100vh;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar {
        transform: translateX(-100%);
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-select {
        width: 100%;
    }
}
