body {
background: #f5f6f8;
color: #222;
}

body.modal-open {
    overflow: hidden;
}

.container {
width: 100%;
max-width: 1400px;
margin: 0 auto;
padding: 0 20px;
}

/* =========================
HEADER
========================= */

.header {
width: 100%;
height: 64px;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
background: #ffffff;
border-bottom: 1px solid #e5e5e5;
}

.header_container {
    max-width: 1400px;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.logo {
font-size: 24px;
font-weight: 700;
margin-right: 40px;
display: flex;
align-items: center;
}

.logo img {
    width: 60px;
    height: 60px;
}


/* =========================
MAIN
========================= */

.main {
padding: 0;
margin-top: 80px;
}

.main h1 {
margin-bottom: 10px;
font-size: 32px;
}

.main p {
color: #666;
}

.main_container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.stats_grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.start_card {
    padding: 20px;
    border: 1px solid #007bff;
    background-color: white;
    border-radius: 10px;
}

.stat_title {
    margin: 10px 0 0;
    font-size: 32px;
    font-weight: 700;
}

.stat_value {
    margin: 10px 0 0;
    font-size: 32px;
    font-weight: 700;
}

.orders {
    margin-top: 40px;
}

.section_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.section_title {
    margin: 0;
    font-size: 22px;
}

.section_link {
    color: #555;
    font-size: 14px;
}

.section_link:hover {
    color: #0B4085;
    transition: 0.5s ease;
}

.orders_list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #fff;
    border: 1px solid #007bff;
    border-radius: 8px;
}

.order_info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order_details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.order_number {
    font-weight: 600;
}

.order_customer {
    font-size: 14px;
    color: #666;
}

.order_price {
    font-weight: 600;
}

.order_status {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* orders_status */
.order_status_new {
    background-color: #dbeafe;
    color: #1e40af;
}
.order_status_processing {
    background-color: #fff3cd;
    color: #856404
}
.order_status_completed {
    background-color: #d4edda;
    color: #155724;
}

/* =========================
NAVIGATION
========================= */
.navigation {
    display: flex;
    justify-content: space-between;
    width: 100%;
}

.navigation_list{
    display: flex;
    gap: 10px;
}

.navigation_link {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: #555;
    text-decoration: none;
    
}

.navigation_link:hover {
    border-radius: 4px;
    color: #0B4085;
    transition: all 0.5s ease;
}

.navigation_link.active {
    font-weight: 600;
    position: relative;
}

.navigation_link.active::after {
    content: "";
    position: absolute;
    left: 15px;
    right: 15px;
    bottom: 0;
    height: 1px;
    background: #222;
}

.header_user {
    margin-left: auto;
}

.user_link {
    padding: 10px 15px;
    color: #555;
    transition: 0.2s ease;
}
.user_link:hover {
    color: #0B4085;
    transition: 0.5s ease;
}

.menu_button {
    display: none;
}

/* ==========
PAGE HEADER 
=============*/

.page_header {
    margin-bottom: 30px;

}

.page_title {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
}

.page_description {
    margin: 8px 0 0;
    color: #666;
}

.header_user {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-left: auto;
    position: static;
    width: auto;
    padding: 0;
    border: none;
    background: transparent;
    box-sizing: border-box;
}

.header_user_info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.header_username {
    font-size: 14px;
    font-weight: 600;
}

.header_user_role {
    font-size: 12px;
    opacity: 0.6;
}

.header_login,
.header_logout {
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    transition: all .5s;
}

.header_login:hover,
.header_logout:hover {
    color:#0B4085;
}


/* =========================================================
   СТАТУС СДЕЛКИ
========================================================= */

#dealDetailsModal .deal_details_status {

    display: inline-flex;

    align-items: center;

    width: fit-content;


    padding: 6px 11px;

    border-radius: 999px;

    font-size: 13px;

    font-weight: 600;

    line-height: 1;

    border: 1px solid transparent;
}


/* Новая */

#dealDetailsModal .deal_details_status.status-new {

    background: #eff6ff;

    color: #2563eb;

    border-color: #bfdbfe;
}


/* Подтверждена */

#dealDetailsModal .deal_details_status.status-confirmed {

    background: #ecfdf5;

    color: #059669;

    border-color: #a7f3d0;
}


/* На сборке */

#dealDetailsModal .deal_details_status.status-assembling {

    background: #fff7ed;

    color: #ea580c;

    border-color: #fed7aa;
}


/* Собрана */

#dealDetailsModal .deal_details_status.status-ready {

    background: #f5f3ff;

    color: #7c3aed;

    border-color: #ddd6fe;
}


/* В доставке */

#dealDetailsModal .deal_details_status.status-delivering {

    background: #f0fdfa;

    color: #0f766e;

    border-color: #99f6e4;
}


/* Доставлена */

#dealDetailsModal .deal_details_status.status-completed {

    background: #f0fdf4;

    color: #16a34a;

    border-color: #bbf7d0;
}


/* Удалена */

#dealDetailsModal .deal_details_status.status-deleted {

    background: #fef2f2;

    color: #dc2626;

    border-color: #fecaca;
}


/* Неизвестный статус */

#dealDetailsModal .deal_details_status.status-default {

    background: #f3f4f6;

    color: #4b5563;

    border-color: #e5e7eb;
}

/* =========================================================
   СТАТУСЫ В ТАБЛИЦЕ СДЕЛОК
========================================================= */

.deal_status_badge {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: fit-content;

    padding: 6px 10px;

    border-radius: 999px;

    font-size: 12px;

    font-weight: 600;

    line-height: 1;

    white-space: nowrap;

    border: 1px solid transparent;
}


/* Новая */

.deal_status_badge.status-new {

    background: #eff6ff;

    color: #2563eb;

    border-color: #bfdbfe;
}


/* Подтверждена */

.deal_status_badge.status-confirmed {

    background: #ecfdf5;

    color: #059669;

    border-color: #a7f3d0;
}


/* На сборке */

.deal_status_badge.status-assembling {

    background: #fff7ed;

    color: #ea580c;

    border-color: #fed7aa;
}


/* Собрана */

.deal_status_badge.status-ready {

    background: #f5f3ff;

    color: #7c3aed;

    border-color: #ddd6fe;
}


/* В доставке */

.deal_status_badge.status-delivering {

    background: #f0fdfa;

    color: #0f766e;

    border-color: #99f6e4;
}


/* Доставлена */

.deal_status_badge.status-completed {

    background: #f0fdf4;

    color: #16a34a;

    border-color: #bbf7d0;
}


/* Удалена */

.deal_status_badge.status-deleted {

    background: #fef2f2;

    color: #dc2626;

    border-color: #fecaca;
}


.deal_timeline {
    margin-top: 28px;
}

.deal_timeline_list {
    margin-top: 20px;
}

.deal_timeline_item {
    display: grid;
    grid-template-columns: 32px 1fr;
    column-gap: 14px;
    min-height: 64px;
}

.deal_timeline_line {
    position: relative;
    display: flex;
    justify-content: center;
}

.deal_timeline_line::after {
    content: "";
    position: absolute;
    top: 32px;
    bottom: -1px;
    width: 2px;
    background: #e5e7eb;
}

.deal_timeline_item:last-child
.deal_timeline_line::after {
    display: none;
}

.deal_timeline_marker {
    position: relative;
    z-index: 2;

    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fff;

    border: 2px solid #d1d5db;

    font-size: 13px;
    font-weight: 600;
}

.deal_timeline_marker.status {
    border-color: #3b82f6;
    color: #3b82f6;
}

.deal_timeline_marker.create {
    border-color: #22c55e;
    color: #22c55e;
}

.deal_timeline_marker.product {
    border-color: #f59e0b;
    color: #f59e0b;
}

.deal_timeline_content {
    padding-bottom: 24px;
}

.deal_timeline_title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

.deal_timeline_date {
    margin-top: 4px;

    font-size: 12px;

    color: #9ca3af;
}

.deal_timeline_empty {
    padding: 20px;

    text-align: center;

    color: #9ca3af;

    font-size: 14px;
}


.toast {
    position: fixed;

    top: 50%;
    left: 50%;

    transform: translate(-50%, -50%);

    width: 360px;
    max-width: calc(100vw - 48px);

    display: flex;
    align-items: flex-start;
    gap: 12px;

    padding: 16px;

    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.18);

    z-index: 10000;

    opacity: 0;
    visibility: hidden;

    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

.toast.active {
    opacity: 1;
    visibility: visible;
}

.toast_icon {
    width: 32px;
    height: 32px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: #fee2e2;
    color: #dc2626;

    font-size: 18px;
}

.toast_content {
    flex: 1;
    min-width: 0;
}

.toast_title {
    font-size: 14px;
    font-weight: 600;

    color: #111827;

    margin-bottom: 4px;
}

.toast_message {
    font-size: 13px;
    line-height: 1.4;

    color: #6b7280;
}

.toast_close {
    border: none;
    background: transparent;

    color: #9ca3af;

    font-size: 22px;
    line-height: 1;

    cursor: pointer;

    padding: 0;
}

.toast_close:hover {
    color: #374151;
}




