﻿body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #f5f6fa;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f5f6fa;
    position: relative;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #fff;
    border-right: 1px solid #e0e0e0;
    padding: 24px 16px;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
    z-index: 120;
}

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

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    color: #2c3e50;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s ease;
}

.sidebar-nav a:hover {
    background: #f0f4ff;
}

.sidebar-footer {
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
}

.sidebar-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #111827;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.15);
}

.sidebar-logout:hover,
.sidebar-logout:focus-visible {
    background: #e0e7ff;
}

.menu-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #2563eb;
    margin-bottom: 16px;
}

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 0;
    width: 100%;
}

.top-bar.enhanced {
    position: sticky;
    top: 0;
    z-index: 20;
    padding: 12px 32px;
    background: linear-gradient(135deg, #111827 0%, #1d4ed8 60%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.45);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    flex-wrap: nowrap;
}

.top-bar__left {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.top-bar__right {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
    margin-left: auto;
}

.top-title {
    font-weight: 700;
    font-size: 1.45rem;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .top-bar.enhanced {
        padding: 12px 18px;
    }
}

@media (max-width: 340px) {
    .top-bar__inner {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    .top-bar__right {
        width: 100%;
        justify-content: flex-end;
    }
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.35);
    padding: 6px 12px;
    border-radius: 999px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
}

.user-card__avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #4c1d95;
    display: grid;
    place-items: center;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.user-card__info {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

.user-card__info small {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.75);
}

.logout-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827, #1f2937);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logout-button:hover,
.logout-button:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.45);
}

.logout-button .dx-icon {
    font-size: 1rem;
}

.menu-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    min-width: 44px;
    min-height: 20px;
    border-radius: 12px;
    box-shadow: none;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.content-area {
    padding: 10px;
    flex: 1;
    background: linear-gradient(180deg, #f5f6fa 0%, #fff 20%);
}

.app-loader {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    background: rgba(255, 255, 255, 0.65);
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.app-loader.active {
    display: flex;
}

.loader-wrapper {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.loader-label {
    margin-top: 12px;
    font-weight: 600;
}

.dx-button {
    border-radius: 999px;
    min-width: 30px;
}

.panel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.panel-card {
    background: #fff;
    padding: 18px;
    border-radius: 12px;
    box-shadow: 0 20px 35px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-card__title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #5f6d7a;
}

.panel-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
}

.panel-card__caption {
    font-size: 0.85rem;
    color: #6b7280;
}

.panel-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.sale-card {
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 30px 45px rgba(15, 23, 42, 0.08);
}


.sale-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sale-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sale-form label {
    font-weight: 600;
    color: #1f2937;
}

.total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

.total-label {
    font-size: 0.75rem;
    color: #64748b;
}

.total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.filter-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-group label {
    font-weight: 600;
    color: #0f172a;
}

input,
select,
textarea {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 5px 5px;
    font: inherit;
    color: #0f172a;
    box-shadow: inset 0 1px 6px rgba(15, 23, 42, 0.08);
    transition: border 0.2s ease, box-shadow 0.2s ease;
    min-height: 22px;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
    outline: none;
}

.dx-texteditor input,
.dx-texteditor textarea,
.dx-texteditor-input,
.dx-texteditor-textarea {
    background: transparent;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: linear-gradient(145deg, rgba(249, 115, 22, 0.9), rgba(251, 191, 36, 0.9)),
        url("https://images.unsplash.com/photo-1473093295043-cdd812d0e601?auto=format&fit=crop&w=1200&q=80") center/cover fixed;
    min-height: 100vh;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 28px;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 35px 45px rgba(15, 23, 42, 0.12);
}

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

.login-subtitle {
    color: #475569;
    margin-bottom: 24px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-field label {
    font-weight: 600;
    color: #0f172a;
}

.form-actions {
    margin-top: 8px;
}
