/* ======================================================
   LCX INVENTORY MANAGEMENT SYSTEM
   MAIN STYLESHEET
   File: assets/style.css
   ====================================================== */


/* ======================================================
   GLOBAL RESET SECTION
   ====================================================== */

* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f6f9;
    color: #1f2933;
    line-height: 1.5;
}

a {
    color: #0b5cab;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

strong {
    font-weight: 700;
}

small {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.85rem;
}

.required {
    color: #b91c1c;
    font-weight: bold;
}

.muted-text {
    color: #64748b;
    font-size: 0.9rem;
}


/* ======================================================
   LOGIN PAGE SECTION
   ====================================================== */

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(20, 83, 45, 0.92)),
        #0f172a;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: #ffffff;
    border-radius: 16px;
    padding: 34px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.login-logo {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.login-logo-main {
    font-size: 34px;
    font-weight: 800;
    color: #14532d;
    letter-spacing: 1px;
}

.login-logo-sub {
    font-size: 0.95rem;
    color: #475569;
    margin-top: 2px;
}

.login-card h1 {
    margin: 0 0 10px 0;
    color: #0f172a;
    font-size: 1.8rem;
}

.login-intro {
    margin-top: 0;
    margin-bottom: 22px;
    color: #475569;
}

.login-links {
    margin-top: 20px;
    text-align: center;
}


/* ======================================================
   APPLICATION LAYOUT SECTION
   ====================================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    min-width: 0;
    padding: 0 26px 28px 26px;
}


/* ======================================================
   SIDEBAR SECTION
   ====================================================== */

.sidebar {
    width: 280px;
    background: #0f172a;
    color: #ffffff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar-brand {
    padding: 24px 22px;
    background: #111827;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-main {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: #ffffff;
}

.sidebar-brand-sub {
    color: #cbd5e1;
    font-size: 0.95rem;
    margin-top: 2px;
}

.sidebar-menu {
    padding: 16px 14px;
    flex: 1;
    overflow-y: auto;
}

.menu-heading {
    margin: 18px 10px 8px 10px;
    color: #93c5fd;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    font-weight: 700;
}

.menu-item {
    display: block;
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 9px;
    color: #e5e7eb;
    font-size: 0.95rem;
}

.menu-item:hover {
    background: #1e293b;
    color: #ffffff;
    text-decoration: none;
}

.menu-item.active {
    background: #14532d;
    color: #ffffff;
    font-weight: 700;
}

.sidebar-footer {
    padding: 16px 20px;
    background: #111827;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #cbd5e1;
    font-size: 0.85rem;
}

.sidebar-footer strong {
    display: block;
    color: #ffffff;
    margin-top: 4px;
}

.sidebar-footer small {
    color: #93c5fd;
}


/* ======================================================
   TOP BAR SECTION
   ====================================================== */

.topbar {
    margin: 0 -26px 24px -26px;
    padding: 15px 26px;
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-title {
    font-weight: 700;
    color: #0f172a;
    font-size: 1rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    text-align: right;
}

.user-name {
    display: block;
    font-weight: 700;
    color: #0f172a;
    font-size: 0.95rem;
}

.user-role {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
}

.logout-link {
    display: inline-block;
    background: #b91c1c;
    color: #ffffff;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9rem;
}

.logout-link:hover {
    background: #991b1b;
    color: #ffffff;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    border: none;
    background: #14532d;
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 11px;
    cursor: pointer;
    font-size: 1.1rem;
}


/* ======================================================
   CARD AND CONTENT SECTION
   ====================================================== */

.page-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 22px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
    border: 1px solid #e5e7eb;
}

.page-card h1 {
    margin-top: 0;
    margin-bottom: 8px;
    color: #0f172a;
    font-size: 1.75rem;
}

.page-card h2 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #111827;
    font-size: 1.25rem;
}

.page-card p {
    color: #475569;
}

.placeholder-note {
    background: #f8fafc;
    border: 1px dashed #94a3b8;
    color: #475569;
    border-radius: 10px;
    padding: 16px;
    margin-top: 12px;
}


/* ======================================================
   FORM SECTION
   ====================================================== */

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group-button {
    align-self: end;
}

label {
    display: block;
    font-weight: 700;
    color: #334155;
    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-size: 0.95rem;
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #14532d;
    box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.15);
}

input:disabled {
    background: #f1f5f9;
    color: #64748b;
}

textarea {
    resize: vertical;
}

.form-actions {
    margin-top: 18px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-form {
    margin-top: 10px;
}


/* ======================================================
   BUTTON SECTION
   ====================================================== */

button,
.btn {
    display: inline-block;
    border: none;
    background: #14532d;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.93rem;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
}

button:hover,
.btn:hover {
    background: #166534;
    color: #ffffff;
    text-decoration: none;
}

.btn-secondary {
    background: #334155;
}

.btn-secondary:hover {
    background: #1e293b;
}

.btn-danger {
    background: #b91c1c;
}

.btn-danger:hover {
    background: #991b1b;
}

.btn-small {
    padding: 7px 10px;
    font-size: 0.82rem;
}


/* ======================================================
   ALERT SECTION
   ====================================================== */

.alert {
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 600;
}

.alert-info {
    background: #dbeafe;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.alert-success {
    background: #dcfce7;
    color: #14532d;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}


/* ======================================================
   TABLE SECTION
   ====================================================== */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 780px;
}

th,
td {
    padding: 12px 13px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
    font-size: 0.92rem;
}

th {
    background: #f8fafc;
    color: #334155;
    font-weight: 800;
    white-space: nowrap;
}

tr:hover td {
    background: #f8fafc;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}


/* ======================================================
   DASHBOARD SECTION
   ====================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.small-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-two-column {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin-bottom: 22px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-left: 6px solid #14532d;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.07);
}

.stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
}

.stat-label {
    color: #64748b;
    font-weight: 700;
    margin-top: 4px;
}

.mini-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid #e5e7eb;
}

.mini-stat-row span {
    color: #475569;
}

.mini-stat-row strong {
    color: #0f172a;
    font-size: 1.1rem;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}


/* ======================================================
   SUMMARY GRID SECTION
   ====================================================== */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.summary-item {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
}

.summary-item span {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
    margin-bottom: 4px;
}

.summary-item strong {
    color: #0f172a;
}


/* ======================================================
   STATUS BADGE SECTION
   ====================================================== */

.status-badge {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.status-active {
    background: #dcfce7;
    color: #14532d;
}

.status-inactive {
    background: #e5e7eb;
    color: #374151;
}

.status-warning {
    background: #fef3c7;
    color: #92400e;
}

.status-danger {
    background: #fee2e2;
    color: #991b1b;
}


/* ======================================================
   ERROR PAGE SECTION
   ====================================================== */

.error-page {
    min-height: 100vh;
    background: #f3f6f9;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.error-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 16px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
}

.error-code {
    font-size: 4rem;
    font-weight: 900;
    color: #b91c1c;
    line-height: 1;
    margin-bottom: 14px;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 22px;
}


/* ======================================================
   FOOTER SECTION
   ====================================================== */

.page-footer {
    margin-top: 26px;
    padding: 18px 0;
    color: #64748b;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
}


/* ======================================================
   MOBILE RESPONSIVE SECTION
   ====================================================== */

@media (max-width: 1100px) {
    .dashboard-grid,
    .small-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-two-column {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 850px) {
    .app-wrapper {
        display: block;
    }

    .sidebar {
        display: none;
        width: 100%;
        min-height: auto;
    }

    .sidebar.sidebar-open {
        display: block;
    }

    .main-content {
        padding: 0 16px 24px 16px;
    }

    .topbar {
        margin: 0 -16px 20px -16px;
        padding: 14px 16px;
        align-items: flex-start;
    }

    .menu-toggle {
        display: inline-block;
    }

    .topbar-right {
        flex-direction: column;
        align-items: flex-end;
        gap: 8px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .page-footer {
        display: block;
    }

    .page-footer div {
        margin-bottom: 6px;
    }
}

@media (max-width: 560px) {
    .login-card {
        padding: 24px;
    }

    .dashboard-grid,
    .small-grid {
        grid-template-columns: 1fr;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .page-card {
        padding: 18px;
    }

    .topbar {
        display: block;
    }

    .topbar-left {
        margin-bottom: 12px;
    }

    .topbar-right {
        align-items: flex-start;
    }

    .topbar-user {
        text-align: left;
    }

    .form-actions,
    .quick-actions,
    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn,
    button {
        width: 100%;
    }
}

/* ======================================================
   EXPECTED RECEIVABLES PRINT HELPERS
   ====================================================== */

.print-only-row {
    display: none;
}

@media print {
    .no-print,
    .sidebar,
    .topbar,
    .page-footer,
    .btn,
    button,
    .form-actions,
    .quick-actions {
        display: none !important;
    }

    .print-only-row {
        display: table-row;
    }

    .page-card {
        box-shadow: none;
        border: none;
        padding: 0;
        margin-bottom: 14px;
    }

    .table-wrapper {
        border: none;
        overflow: visible;
    }

    table {
        min-width: 0;
        width: 100%;
        font-size: 12px;
    }

    th,
    td {
        padding: 7px;
    }
}

/* ======================================================
   REPORT SUBTITLE SECTION
   ====================================================== */

.report-subtitle {
    color: #334155;
    font-size: 0.95rem;
    margin: 6px 0;
    padding: 8px 10px;
    background: #f8fafc;
    border-left: 4px solid #14532d;
    border-radius: 6px;
}

@media print {
    .no-print {
        display: none !important;
    }

    .report-subtitle {
        background: #ffffff;
        border-left: none;
        border-bottom: 1px solid #cccccc;
        padding: 4px 0;
        margin: 4px 0;
    }
}


/* ======================================================
   REQUEST CARD SECTION
   ====================================================== */

.request-card {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 20px;
    background: #ffffff;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.05);
}

.request-card-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.request-card-header h3 {
    margin: 0 0 8px 0;
    color: #0f172a;
    font-size: 1.25rem;
}

.request-card-header p {
    margin: 0;
    color: #475569;
}

.request-card-status {
    min-width: 180px;
    text-align: right;
}

.small-text {
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 8px;
}

@media (max-width: 700px) {
    .request-card-header {
        display: block;
    }

    .request-card-status {
        text-align: left;
        margin-top: 12px;
    }
}

/* ======================================================
   PRINT SECTION
   ====================================================== */

@media print {
    .sidebar,
    .topbar,
    .page-footer,
    .btn,
    button,
    .form-actions,
    .quick-actions {
        display: none !important;
    }

    body {
        background: #ffffff;
        color: #000000;
    }

    .main-content {
        padding: 0;
    }

    .page-card {
        box-shadow: none;
        border: none;
        padding: 0;
    }

    table {
        min-width: 0;
    }
}