/* =========================================================
   LSPB BASE
========================================================= */
.lspb-dashboard,
.lspb-app,
.lspb-card,
.lspb-table,
.lspb-filter-grid,
.lspb-stock-grid,
.lspb-inline-form,
.lspb-template-list,
.lspb-maintenance-grid,
.lspb-stats-grid {
    box-sizing: border-box;
}

.lspb-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 24px 0;
    color: #e5e7eb;
}

/* =========================================================
   NAVIGATION
========================================================= */
.lspb-nav,
.lspb-admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 16px;
}

.lspb-nav a,
.lspb-admin-nav a,
.lspb-app-sidebar a,
.lspb-tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    background: #1f2937;
    color: #e5e7eb;
    border: 1px solid #374151;
}

.lspb-nav a:hover,
.lspb-admin-nav a:hover,
.lspb-app-sidebar a:hover,
.lspb-tab-link:hover {
    background: #374151;
    color: #fff;
}

.lspb-tab-link.is-active,
.lspb-app-sidebar a.is-active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* =========================================================
   CARD
========================================================= */
.lspb-card {
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.20);
}

.lspb-card h3 {
    margin: 0 0 18px;
    font-size: 22px;
    line-height: 1.2;
    color: #fff;
}

.lspb-card p {
    color: #d1d5db;
    line-height: 1.5;
}

/* =========================================================
   SUCCESS / WARNING
========================================================= */
.lspb-success,
.lspb-warning {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 500;
}

.lspb-success {
    background: rgba(22, 163, 74, 0.15);
    border: 1px solid rgba(22, 163, 74, 0.35);
    color: #bbf7d0;
}

.lspb-warning {
    background: rgba(245, 158, 11, 0.14);
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #fde68a;
}

/* =========================================================
   TABLES
========================================================= */
.lspb-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    overflow: hidden;
    border-radius: 14px;
    background: #0f172a;
    border: 1px solid #1f2937;
}

.lspb-table thead {
    background: #1e293b;
}

.lspb-table th,
.lspb-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #1f2937;
    color: #e5e7eb;
    font-size: 14px;
}

.lspb-table th {
    font-weight: 700;
    color: #fff;
}

.lspb-table tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* =========================================================
   FORMS
========================================================= */
.lspb-card label,
.lspb-card strong {
    color: #f3f4f6;
}

.lspb-card input[type="text"],
.lspb-card input[type="number"],
.lspb-card input[type="email"],
.lspb-card input[type="password"],
.lspb-card select,
.lspb-card textarea,
.lspb-inline-form input[type="text"],
.lspb-inline-form input[type="number"],
.lspb-inline-form select,
.lspb-inline-form textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 12px;
    border: 1px solid #374151;
    background: #0f172a;
    color: #f9fafb;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.lspb-card input:focus,
.lspb-card select:focus,
.lspb-card textarea:focus,
.lspb-inline-form input:focus,
.lspb-inline-form select:focus,
.lspb-inline-form textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

.lspb-card textarea {
    min-height: 110px;
    resize: vertical;
}

.lspb-card button,
.lspb-card .button,
.lspb-inline-form button,
.lspb-stock-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid #2563eb;
    background: #2563eb;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lspb-card button:hover,
.lspb-card .button:hover,
.lspb-inline-form button:hover,
.lspb-stock-form button:hover {
    background: #1d4ed8;
    border-color: #1d4ed8;
    color: #fff;
}

.lspb-card .button {
    background: #1f2937;
    border-color: #374151;
}

.lspb-card .button:hover {
    background: #374151;
    border-color: #4b5563;
}

.lspb-danger,
.lspb-card .lspb-danger,
.lspb-inline-form .lspb-danger {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
    color: #fff !important;
}

.lspb-danger:hover,
.lspb-card .lspb-danger:hover,
.lspb-inline-form .lspb-danger:hover {
    background: #991b1b !important;
    border-color: #991b1b !important;
}

/* =========================================================
   GRID LAYOUTS
========================================================= */
.lspb-filter-grid,
.lspb-stock-grid,
.lspb-maintenance-grid,
.lspb-stats-grid {
    display: grid;
    gap: 14px;
}

.lspb-filter-grid,
.lspb-stock-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.lspb-maintenance-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    margin-top: 16px;
}

.lspb-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.lspb-span-2 {
    grid-column: span 2;
}

.lspb-filter-actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

/* =========================================================
   STATS
========================================================= */
.lspb-stat-box {
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(180deg, #1e293b 0%, #111827 100%);
    border: 1px solid #334155;
}

.lspb-stat-number {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.lspb-stat-label {
    font-size: 13px;
    color: #cbd5e1;
}

/* =========================================================
   STOCK FORMS
========================================================= */
.lspb-stock-form {
    margin-top: 14px;
}

.lspb-stock-form hr {
    border: 0;
    border-top: 1px solid #1f2937;
    margin: 18px 0;
}

/* =========================================================
   INLINE FORM
========================================================= */
.lspb-inline-form {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* =========================================================
   TEMPLATE LIST
========================================================= */
.lspb-template-list {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.lspb-template-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid #374151;
    background: #0f172a;
    cursor: pointer;
}

.lspb-template-item:hover {
    border-color: #2563eb;
    background: #111c31;
}

.lspb-template-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    flex: 0 0 auto;
}

.lspb-template-item strong {
    display: block;
    color: #fff;
    margin-bottom: 4px;
}

.lspb-template-item span {
    color: #cbd5e1;
    font-size: 13px;
}

/* =========================================================
   APP LAYOUT
========================================================= */
.lspb-app {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.lspb-app-sidebar {
    position: sticky;
    top: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    background: #111827;
    border: 1px solid #1f2937;
    border-radius: 18px;
}

.lspb-app-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* =========================================================
   TAB PANELS
========================================================= */
.lspb-tab-panel {
    display: none;
}

.lspb-tab-panel.is-active {
    display: block;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 1024px) {
    .lspb-app {
        grid-template-columns: 1fr;
    }

    .lspb-app-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .lspb-card {
        padding: 16px;
        border-radius: 16px;
    }

    .lspb-card h3 {
        font-size: 20px;
    }

    .lspb-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .lspb-span-2 {
        grid-column: span 1;
    }

    .lspb-nav,
    .lspb-admin-nav {
        flex-direction: column;
    }

    .lspb-app-sidebar {
        padding: 14px;
    }
}