/* 🌐 Общий стиль для всех страниц */
body {
    font-family: 'Segoe UI', sans-serif;
    padding: 40px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: "";
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
    margin-left: 220px; /* ширина aside */

}

h2, h3 {
    margin-top: 30px;
}

/* 🔹 Поля ввода */
input[type="text"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin: 6px 0 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
}

/* 🔹 Кнопки */
button {
    background-color: #1976d2;
    color: white;
    padding: 6px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 5px;
}

button:hover {
    background-color: #0d47a1;
}

/* 🔹 Ссылки */
a {
    color: #1976d2;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 🔹 Списки задач */
ul {
    list-style: none;
    padding-left: 0;
}

li.task-item {
    border-left: 4px solid #ccc;
    padding: 12px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

/* 🔹 Убираем старую окраску строк */
.status-новая,
.status-в\ работе,
.status-завершена,
.status-внимание {
    border-color: transparent !important;
    background: transparent !important;
}

hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 15px 0;
}

/* 🔐 Страница логина */
body.login-page {
    background: url('/assets/login-bg.jpg') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.login-form-wrapper {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 12px;
    width: 100%;
    max-width: 360px;
    margin-bottom: 50px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
}

.login-form-wrapper h2 {
    text-align: center;
    margin-bottom: 20px;
}

.login-form-wrapper input,
.login-form-wrapper button {
    width: 100%;
}

/* 🔹 Верхняя панель формы добавления задачи */
.project-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.project-form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
}

.project-form-inline input[type="text"] {
    width: 250px;
    margin: 0;
}

/* 🔹 Таблица задач */
.project-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    table-layout: auto;
}

.project-table th,
.project-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    text-align: left;
    vertical-align: top;
    word-wrap: break-word;
}

.project-table th {
    background: #f2f2f2;
    font-weight: bold;
}

.project-table tr:hover {
    background-color: #f9f9f9;
}

/* 🔹 Задачи */
.task-left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.task-info {
    display: flex;
    flex-direction: column;
}

.task-meta {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
}

.task-name {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1976d2;
    margin-bottom: 2px;
    text-decoration: none;
}

.task-name:hover {
    text-decoration: underline;
}

.task-right {
    text-align: right;
    white-space: nowrap;
}

.task-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.task-actions .time-cell {
    font-size: 13px;
    font-weight: 500;
    margin-left: 6px;
    color: #333;
}

/* 🔹 Кнопки-иконки */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 5px;
    background: #1976d2;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
    padding: 0;
}

.btn-icon:hover { background: #0d47a1; }
.btn-icon.paused { background: #6b7280; }
.btn-icon.active { background: #ef4444; }

/* 🔹 Время выполнения */
.time-cell { text-align: center; font-weight: 500; }

/* 🔹 Переключатель 🔥 */
.toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}
.toggle input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #aaa;
  border-radius: 34px;
  transition: .4s;
}
.slider:before {
  content: "☕";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  border-radius: 50%;
  text-align: center;
  font-size: 13px;
  line-height: 20px;
  transition: .4s;
}
input:checked + .slider { background-color: red; }
input:checked + .slider:before {
  transform: translateX(22px);
  content: "🔥";
}

/* 🎨 Цветные бейджи статусов */
.status-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    color: #fff;
}
.status-new        { background-color: #3b82f6; }
.status-work       { background-color: #f59e0b; }
.status-pause      { background-color: #6b7280; }
.status-done       { background-color: #22c55e; }
.status-attention  { background-color: #ef4444; }

/* ===================== */
/* 🔹 Дашборд проекты    */
/* ===================== */

.project-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.project-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    transition: background 0.2s, transform 0.1s;
}

.project-row:hover {
    background: #f9f9f9;
    transform: translateY(-1px);
}

/* Левая часть */
.project-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-info { display: flex; flex-direction: column; }
.project-left .task-name { font-weight: 600; font-size: 15px; }
.project-left .task-meta { font-size: 12px; color: #6b7280; }

/* Приоритет проекта */
.project-priority {
    position: relative;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 13px;
}

.project-priority select {
    position: absolute;
    top: 0; left: 0;
    width: 32px;  /* фиксируем размер */
    height: 32px;
    opacity: 0;
    cursor: pointer;
}

/* Цвета приоритета */
.priority-0, .priority-1 { background-color: #9ca3af; }
.priority-2, .priority-3 { background-color: #22c55e; }
.priority-4, .priority-5 { background-color: #f59e0b; }

/* Правая часть */
.project-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

.badge {
    display: inline-block;
    min-width: 24px;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    border-radius: 10px;
    background: #e5e7eb;
    color: #374151;
}

.badge-active { background: #3b82f6; color: white; }
.badge-total { background: #9ca3af; color: white; }
.badge-incomplete.alert { background: #ef4444; color: white; }
/* Кастомное меню выбора приоритета */
.priority-menu {
    position: absolute;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    overflow: hidden;
    z-index: 1000;
}

.priority-option {
    padding: 6px 12px;
    cursor: pointer;
    text-align: center;
    font-weight: 500;
}

.priority-option:hover {
    background: #f0f0f0;
}
body .page-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
.page-wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
}
body {
    margin-left: 0 !important; /* убираем двойной сдвиг */
}

.page-wrapper {
    padding: 20px 20px 20px 240px !important; 
    /* сверху / справа / снизу / слева */
    /* слева 240px, чтобы отступить контент ровно на ширину aside */
}
.task-section {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.task-title {
    margin-top: 0;
    font-size: 24px;
    font-weight: bold;
}

.task-subtitle {
    margin-top: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
