/* === Общие стили === */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    background: #f4f6f8;
    color: #1e293b;
}

/* Класс для всей формы */
.custom-form {
    margin-bottom: 20px;
    display: flex;
    gap: 10px; /* расстояние между полями */
    flex-wrap: wrap; /* перенос полей при узкой ширине */
}

/* Стили для инпутов */
.custom-form input[type="text"],
.custom-form input[type="number"] {
    padding: 10px 12px; /* немного больше по высоте и ширине */
    border-radius: 8px; /* закругление углов */
    border: 1px solid #ccc; /* лёгкая рамка */
    font-size: 16px; /* чуть крупнее текст */
   /* flex: 1; /* растягиваются равномерно */
    min-width: 150px; /* минимальная ширина */
    width:250px;
    transition: border-color 0.2s;
}

.custom-form input[type="text"]:focus,
.custom-form input[type="number"]:focus {
    border-color: #007bff; /* цвет рамки при фокусе */
    outline: none;
}

/* Стили для кнопки */
.custom-form button {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    background-color: #007bff;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.custom-form button:hover {
    background-color: #0056b3;
}

a {
    text-decoration: none;
}

/* === Сайдбар === */
.sidebar {
    width: 220px;
    height: 100vh;
    background: #1e293b;
    position: fixed;
    color: white;
    padding: 20px;
    box-sizing: border-box;
    transition: 0.3s;
}

.sidebar h2 {
    margin-top: 0;
    font-size: 26px;
    margin-bottom: 20px;
    text-align: center;
}

.sidebar a {
    display: block;
    color: white;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 8px;
    transition: 0.3s;
    background: #334155;
}

.sidebar a:hover {
    background: #034c6b;
    transition: 0.3s;
}

/* === Контент === */
.content {
    margin-left: 240px;
    padding: 30px;
    box-sizing: border-box;
}

h1, h2, h3 {
    margin-top: 0;
}

/* === Таблицы === */
table {
    width: 100%;
    background: white;
    border-collapse: collapse;
    margin-top: 20px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    font-size: 15px;
}

th {
    background: #f1f5f9;
    font-weight: 600;
}

tr:hover {
    background: #f1f5f9;
}

/* === Кнопки === */
button, select {
    padding: 10px 16px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: 0.3s;
}

button {
    background: #2563eb;
    color: white;
}

button:hover {
    background: #1d4ed8;
}

.status-select {
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #cbd5e1;
    font-size: 14px;
}

/* === Форма логина === */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #1e293b, #475b7a);
}

.login-form {
    background: white;
    padding: 40px;
    border-radius: 14px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    width: 360px;
    max-width: 90%;
    box-sizing: border-box;
    transition: 0.3s;
}

.login-form:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    color: #394a67;
}

.login-form input {
    width: 100%;
    padding: 14px;
    margin: 12px 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.login-form button {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: #394a67;
    color: white;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
}

.login-form button:hover {
    background: #1d4ed8;
}

/* Сообщения об ошибках */
.error {
    color: #dc2626;
    font-weight: 500;
    margin-bottom: 10px;
    text-align: center;
}

/* === Сообщение после отправки лида === */
.message {
    padding: 14px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}
td.actions {
    white-space: nowrap;
}

td.actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    margin-right: 8px;
}


/* Просмотр */
.btn-view{
    background:#2563eb;
    color:white;
    padding:6px 12px;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.btn-view:hover{
    background:#1d4ed8;
}


/* Удалить */

.btn-delete,
.proddelet{
    background:#ef4444;
    color:white;
    padding:6px 12px;
    border-radius:6px;
    text-decoration:none;
    font-size:14px;
    transition:0.2s;
}

.btn-delete,
.proddelet:hover{
    background:#dc2626;
}

/* Сохранить */
.btn-save{
    margin-top:15px;
    background:#16a34a;
    color:white;
    padding:10px 18px;
    border:none;
    border-radius:8px;
    cursor:pointer;
    font-size:15px;
}

.btn-save:hover{
    background:#15803d;
}

/* Статусы */
.status-select{
    padding:6px;
    border-radius:6px;
    border:1px solid #ccc;
}


.status {
    padding: 4px 10px;
    border-radius: 4px;
    color: #fff;
    font-weight: bold;
    display: inline-block;
}

.status.pending { background: #f59e0b; }    /* Ожидание */
.status.completed { background: #10b981; }  /* Выполнено */
.status.cancelled { background: #ef4444; }  /* Отменено */
.status.processing { background: #3b82f6; } /* В обработке */

/* выравнивание всех ячеек таблицы */
table td, table th {
    vertical-align: middle;
}

/* ячейка с кнопками */
td.actions {
    white-space: nowrap;
}

/* кнопки как inline-flex, а не inline */
td.actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* === Адаптивность === */
@media(max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        text-align: center;
    }
    .content {
        margin-left: 0;
        padding: 20px;
    }
    table, th, td {
        font-size: 14px;
    }
    .login-form {
        padding: 30px;
    }
    .status-select {
        font-size: 13px;
    }
}

