body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f9f9f9;
    margin: 0;
    padding: 0;  /* убираем отступы */
    color: #333;
}

h2 {
    color: #444;
}

/* Контейнер для растянутой таблицы */
main {
    width: 100%;
    max-width: {% if fullwidth %} 100% {% else %} 1000px {% endif %};
    margin: 2rem auto;
    padding: 2rem;
    background-color: {% if fullwidth %} transparent {% else %} #fff {% endif %};
    border-radius: {% if fullwidth %} 0 {% else %} 8px {% endif %};
    box-shadow: {% if fullwidth %} none {% else %} 0 2px 6px rgba(0, 0, 0, 0.04) {% endif %};
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background-color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    border-radius: 6px;
    overflow: hidden;
}


table th {
    background-color: #f6f8fa;
    color: #333;
    text-align: left;
    font-weight: 600;
    padding: 12px 16px;
}

table td {
    padding: 12px 16px;
    border-top: 1px solid #eee;
}

.movement-status {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.movement-status--overdue {
    background: #fee2e2;
    color: #b91c1c;
}

.movement-status--active {
    background: #fef9c3;
    color: #854d0e;
}

.movement-status--free {
    background: #dcfce7;
    color: #15803d;
}

.movement-status--closed {
    background: #e0e7ff;
    color: #3730a3;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
}

.status-dot--active {
    background: #22c55e;
}

.status-dot--excluded {
    background: #ef4444;
}

.status-dot--double {
    background: #f59e0b;
}

.movement-row--overdue td {
    background-color: #fee2e2;
}

.movement-row--active td {
    background-color: #dcfce7;
}

.movement-row--free td {
    background-color: #fef3c7;
}

/* Кнопки */
button {
    background: #007aff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #005fcc;
}

a {
    color: #007aff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

form.search-form input[type="text"] {
    padding: 0.5rem;
    width: 250px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

form.search-form button {
    padding: 0.5rem 1rem;
    margin-left: 8px;
    background-color: #007aff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

form.search-form button:hover {
    background-color: #005fcc;
}

nav a {
    margin: 0 10px;
    font-weight: 500;
}

.order {
    border: 1px solid #ccc;
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 6px;
    background-color: #f9f9f9;
}

.order.work {
    border-left: 6px solid #4CAF50; /* зеленый */
}

.order.old {
    border-left: 6px solid #f44336; /* красный */
}

.order.new {
    border-left: 6px solid #FFC107; /* желтый */
}

.order.archived {
    background-color: #eee;
    border-left: 6px solid #999;
    opacity: 0.7;
}

.rental-specialist-row .rental-mask {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 1.75rem;
    overflow: hidden;
    border-radius: 0.35rem;
}

.rental-specialist-row .rental-mask::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(229, 231, 235, 0.85), rgba(209, 213, 219, 0.7));
    filter: blur(8px);
    opacity: 0.9;
}

.rental-specialist-row .rental-placeholder {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
    font-weight: 600;
    color: #1f2937;
    text-transform: none;
}

.rental-specialist-row .rental-mask--muted .rental-placeholder {
    font-size: 0.85rem;
    font-weight: 500;
    color: #4b5563;
}

.user-summary {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.user-info p {
    margin: 0.2rem 0;
}

.logout-btn {
    background: #d9534f;
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.company-tabs {
    margin-bottom: 1rem;
}

.company-tabs table {
    width: 100%;
    border-collapse: collapse;
}

.company-tabs td {
    padding-right: 0.5rem;
}

.company-tabs form {
    margin: 0;
}

.company-tab {
    padding: 0.4rem 1rem;
    background: #f0f0f0;
    color: #007aff;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

.company-tab.active {
    background: #ffd600;
    color: #000;
}

.pagination {
    margin-top: 0.5rem;
}
.pagination a {
    margin-right: 1rem;
}

.specialist-btn {
    background: #f0f0f0;
    color: #007aff;
    border: none;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin: 2px;
    cursor: default;
}

.sro-name-cell {
    position: relative;
}

.sro-gear {
    background: #007aff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 2px 6px;
    margin-left: 4px;
    cursor: pointer;
}

.sro-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
}

.sro-menu button {
    background: #fff;
    border: none;
    padding: 6px 12px;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.sro-menu button:hover {
    background: #f0f0f0;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: var(--layer-overlay, 10000);
}

.modal-content {
    background: #fff;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    text-align: center;
}
.sgs-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    margin: 1rem 0;
}

.sgs-inline-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    flex: 1 1 220px;
    min-width: 220px;
}

.sgs-inline-field > label {
    font-weight: 500;
}

.sgs-inline-field > input,
.sgs-inline-field > select,
.sgs-inline-field > textarea {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font: inherit;
}

.sgs-inline-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 1.5rem;
    flex: 0 0 auto;
}

.sgs-inline-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 1.5rem;
    flex: 0 0 auto;
}

.sgs-inline-actions > button {
    white-space: nowrap;
}
