/* Основные стили */
body {
    margin: 0; 
    font-family: Inter, sans-serif; 
    background: #0f1724; 
    color: #e6eef6; 
    display: flex; 
    justify-content: center; 
    align-items: flex-start; 
    padding-top: 20px;
}

.screen {
    display: none; 
    padding: 20px; 
    border-radius: 12px; 
    background: #0b1220; 
    width: 95%; 
    max-width: 1200px; 
    box-shadow: 0 6px 18px rgba(2,6,23,0.6);
}

.active {
    display: block;
}

.password-wrapper {
  position: relative;
  display: block;
}

.password-input {
  padding-right: 2.5rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;                 
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  font-size: 16px;
}

/* Шапка предприятия */
.company-header {
  text-align: center;
  margin-bottom: 30px;
  padding: 15px;
  background: rgba(15,23,42,0.7);
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.4);
  position: relative;
}

.company-name {
  font-size: 24px;
  font-weight: bold;
  color: #e5e7eb;
  margin: 0;
}

/* Кнопка редактирования (если пригодится на других экранах) */
.company-edit-btn {
  background: transparent;
  border: 1px solid #4b5563;
  color: #e5e7eb;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  margin-top: 8px;
}

.company-edit-btn:hover {
  background: rgba(55,65,81,0.7);
}

/* Оверлей модалки */
#company-name-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.75);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

/* Внутренняя карточка модалки */
#company-name-modal > .company-name-modal-content {
  background: #020617;
  padding: 24px 28px 20px;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0,0,0,0.7);
  border: 1px solid rgba(148,163,184,0.3);
  width: 100%;
  max-width: 420px;
  color: #e5e7eb;
}

/* Поле ввода в модалке */
#company-name-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  background: #020617;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 8px 10px;
  color: #e5e7eb;
  font-size: 14px;
  margin: 4px 0 16px;
}

/* Кнопки в модалке */
.company-name-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.company-name-modal-actions .btn-cancel {
  padding: 6px 14px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #4b5563;
  background: #020617;
  color: #e5e7eb;
  cursor: pointer;
}

.company-name-modal-actions .btn-save {
  padding: 6px 16px;
  font-size: 13px;
  border-radius: 8px;
  border: none;
  background: #3b82f6;
  color: white;
  cursor: pointer;
}

.admin-panel { 
    background: #1e293b; 
    border-left: 4px solid #06b6d4; 
}

.question-item { 
    background: rgba(255,255,255,0.03); 
    padding: 12px; 
    margin: 8px 0; 
    border-radius: 8px; 
}

.results-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 15px; 
}

.results-table th { 
    background: rgba(6,182,212,0.1); 
    padding: 10px; 
    text-align: left; 
}

.results-table td { 
    padding: 10px; 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
}

input, textarea, select {
    width: 100%; 
    padding: 8px; 
    margin-bottom: 12px; 
    border-radius: 8px; 
    border: 1px solid rgba(255,255,255,0.04); 
    background: transparent; 
    color: #e6eef6;
}

button {
    padding: 10px 16px; 
    border: none; 
    border-radius: 10px; 
    background: #06b6d4; 
    color: #052026; 
    cursor: pointer; 
    margin: 4px;
}

.btn-danger {
    background: #ef4444;
}

.btn-success {
    background: #10b981;
}

.btn-secondary {
    background: #64748b;
}

.btn-warning {
    background: #f59e0b;
}

.note {
    font-size: 12px; 
    color: #94a3b8; 
    margin-bottom: 12px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.04)); 
    border-radius: 12px; 
    padding: 14px; 
    box-shadow: 0 6px 18px rgba(2,6,23,0.6); 
    margin-bottom: 12px;
}

.admin-dashboard { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
    margin-bottom: 20px; 
}

.admin-card { 
    background: rgba(255,255,255,0.03); 
    padding: 20px; 
    border-radius: 12px; 
    text-align: center; 
}

.admin-card h3 { 
    margin-top: 0; 
}

.equipment-buttons { 
    display: grid; 
    grid-template-columns: repeat(6, 1fr); 
    gap: 10px; 
    margin: 20px 0; 
}

.equipment-btn { 
    background: rgba(255,255,255,0.05); 
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px; 
    padding: 15px 8px; 
    color: #e6eef6; 
    cursor: pointer; 
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.equipment-btn:hover {
    background: rgba(6,182,212,0.2);
    border-color: #06b6d4;
    transform: translateY(-2px);
}

.dispatch-btn {
    background: rgba(245,158,11,0.15) !important;
    border: 2px solid rgba(245,158,11,0.4) !important;
    color: #fef3c7 !important;
}

.dispatch-btn:hover {
    background: rgba(245,158,11,0.25) !important;
    border-color: #f59e0b !important;
    transform: translateY(-2px);
}

.equipment-btn.active-category {
    background: rgba(6,182,212,0.2);
    border-color: #06b6d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}

.loading { 
    opacity: 0.6; 
    pointer-events: none; 
}

.category-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 20px; 
}

.equipment-item {
    padding: 12px;
    margin: 5px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255,255,255,0.05);
}

.equipment-item:hover {
    background: rgba(6,182,212,0.1);
    border-color: #06b6d4;
}

.equipment-item.selected {
    background: rgba(6,182,212,0.2);
    border-color: #06b6d4;
}

.record-item {
    padding: 15px;
    margin: 10px 0;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    border-left: 4px solid #06b6d4;
}

.operations-panel {
    flex: 0 0 250px;
}

.main-content {
    flex: 1;
}

/* Стили для категорий оборудования */
.category-section {
    margin-bottom: 15px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: rgba(6,182,212,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-header:hover {
    background: rgba(6,182,212,0.2);
}

.category-arrow {
    transition: transform 0.3s ease;
    color: #06b6d4;
}

.category-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.category-content.show {
    max-height: 500px;
}

.equipment-btn.active-category {
    background: rgba(6,182,212,0.2);
    border-color: #06b6d4;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(6,182,212,0.3);
}

/* Стили для вкладок ремонтов */
.repair-tab {
    padding: 10px 20px;
    border: none;
    border-radius: 8px 8px 0 0;
    background: rgba(255,255,255,0.05);
    color: #e6eef6;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.repair-tab:hover {
    background: rgba(6,182,212,0.2);
}

.repair-tab.active {
    background: #06b6d4;
    color: #052026;
}

/* Стили для кнопок документации в универсальной форме */
#add-equipment-universal-screen .equipment-btn {
    background: rgba(255,255,255,0.05); 
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 12px; 
    padding: 15px 12px; 
    color: #e6eef6; 
    cursor: pointer; 
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
    text-align: left; 
    min-height: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start; 
    justify-content: center;
    width: 100%;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
}

#add-equipment-universal-screen .equipment-btn:hover {
    background: rgba(6,182,212,0.2);
    border-color: #06b6d4;
    transform: translateY(-2px);
}

#add-equipment-universal-screen .card .equipment-btn {
    text-align: left;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 15px;
}

/* Стили для сотрудников */
.form-input {
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1e293b;
  color: white;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #06b6d4;
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn-danger:hover {
  background: #b91c1c;
}

.screen {
  display: none;
  padding: 20px;
}

.screen.active {
  display: block;
}

#employees-screen table {
  width: 100%;
  border-collapse: collapse;
}

#employees-screen th {
  font-weight: 600;
  color: #06b6d4;
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid #334155;
}

#employees-screen td {
  padding: 12px;
  border-bottom: 1px solid #334155;
}

#employees-screen tr:hover {
  background: rgba(6, 182, 212, 0.05);
}

.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.hidden {
    display: none;
}

.modal-content {
    background-color: #1e293b;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    border: 2px solid #06b6d4;
    width: 80%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
    z-index: 10000;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #94a3b8;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ef4444;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e2e8f0;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #334155;
    border-radius: 8px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 14px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #06b6d4;
    box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.form-input::placeholder {
    color: #64748b;
}

/* Стили для таблицы результатов*/
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.results-table th {
    background: rgba(6, 182, 212, 0.2);
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #e2e8f0;
    border-bottom: 2px solid #06b6d4;
    position: sticky;
    top: 0;
}

.results-table td {
    padding: 12px;
    border-bottom: 1px solid #334155;
    color: #cbd5e1;
}

.results-table tr:hover {
    background: rgba(6, 182, 212, 0.05);
}

/* Модалка для задания */
#create-task-modal {
  display: none;
  position: fixed; left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(30,41,59,0.60); 
  justify-content: center; align-items: center;
  z-index: 1000;
}
#create-task-modal.active {
  display: flex;
}
#create-task-modal > div {
  background: #fff; color: #222;
  box-shadow: 0 6px 36px rgba(30,41,59,0.25); border-radius: 16px;
  min-width: 320px; max-width: 400px; padding: 32px 36px 24px; margin: auto;
}

#create-task-modal input,
#create-task-modal textarea,
#create-task-modal select {
  background: #fff !important;
  color: #222 !important;
  border: 1px solid #06b6d4 !important;
  font-size: 16px;
}

#create-task-modal input[type="datetime-local"] {
  background: #fff !important;
  color: #222 !important;
  border: 1px solid #06b6d4 !important;
  font-size: 16px;
}

.input-error {
  border-color: #ef4444;
  background-color: #fef2f2;
}
.input-error-message {
  display: block;
}

#fullscreen-view {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.95);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

#fullscreen-img {
  max-width: 100vw;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 4px 32px #0008;
  display: block;
  margin: 0 auto;
}

.annotation-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid #4b5563;
}
.annotation-table th,
.annotation-table td {
  border-bottom: 1px solid #4b5563;
  border-right: 1px solid #4b5563;
  padding: 6px 8px;
  font-size: 12px;
  vertical-align: top;
}
.annotation-table th {
  text-align: left;
  color: #e5e7eb;
  font-weight: 600;           
  background: #020617;
}
.annotation-table td {
  white-space: normal;        
  word-wrap: break-word;      
  overflow-wrap: break-word;  
}

.annotation-files-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.annotation-file-card {
  border: 1px solid #4b5563;
  border-radius: 6px;
  padding: 6px;
  font-size: 11px;
  background: #020617;
}
.annotation-file-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 4px;
}

.equipment-item.equipment-square {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
  box-sizing: border-box;

}

.equipment-square-bg {
  width: 60px;
  aspect-ratio: 1 / 1;          
  border-radius: 8px;
  background-color: #e5e7eb;    
  background-size: cover;       
  background-position: center;  
  flex-shrink: 0;
}

.equipment-square-info {
  flex: 1;
  font-size: 12px;
}

.equipment-square-info strong {
  display: block;
  font-size: 13px;
}

.equipment-square-info .eq-serial {
  color: #94a3b8;
}

.equipment-square-info .eq-status {
  margin-top: 2px;
}

.settings-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

.settings-table th,
.settings-table td {
  border: 1px solid #1f2937;
  padding: 4px 6px;
  text-align: center;       
  vertical-align: middle;   
}

.settings-table th {
  background-color: #020617;
  color: #e5e7eb;
  font-weight: 600;
  white-space: normal;      
  word-wrap: break-word;
}

.settings-table td {
  background-color: #020617;
  color: #e5e7eb;
  white-space: nowrap;      
}

/* Стили для приоритета заданий */
.priority-badge {
  display: inline-block;
  padding: 2px 6px;
  margin-left: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.priority-low {
  background-color: #6c757d; /* серый */
}

.priority-medium {
  background-color: #0d6efd; /* синий */
}

.priority-high {
  background-color: #fd7e14; /* оранжевый */
}

.priority-critical {
  background-color: #dc3545; /* красный */
}

