﻿:root {
  --primary: #1e3a8a; /* Строительный синий */
  --primary-hover: #2563eb;
  --primary-light: #dbeafe;
  --accent: #d97706; /* Оранжевый - цвет техники, предупреждений */
  --accent-hover: #f59e0b;
  --accent-light: #fef3c7;
  --secondary: #065f46; /* Зеленый - цвет безопасности */
  --secondary-hover: #059669;
  --text: #1f2937;
  --text-light: #6b7280;
  --text-dark: #111827;
  --border: #d1d5db;
  --border-dark: #9ca3af;
  --white: #ffffff;
  --bg-light: #f9fafb;
  --bg-card: #ffffff;
  --bg-concrete: #f3f4f6;
  --bg-metal: #e5e7eb;
  --shadow: rgba(30, 58, 138, 0.1);
  --shadow-hover: rgba(30, 58, 138, 0.2);
}

font, th, td, p {
  font: normal 16px 'Arial', 'Helvetica', sans-serif;
  color: var(--text);
}

body {
  font: normal 16px 'Arial', 'Helvetica', sans-serif;
  background-color: var(--bg-concrete); /* Цвет бетона */
  margin-bottom: 0px;
  max-width: 76%;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
}

/* SVG background с строительной тематикой */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("data:image/svg+xml,%3Csvg width='400' height='300' viewBox='0 0 400 300' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='grid' width='40' height='40' patternUnits='userSpaceOnUse'%3E%3Cpath d='M 40 0 L 0 0 0 40' fill='none' stroke='%231e3a8a' stroke-width='0.5' stroke-opacity='0.08'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='100%25' height='100%25' fill='url(%23grid)'/%3E%3Cg fill='none' stroke='%23d97706' stroke-width='1' stroke-opacity='0.05'%3E%3Cpath d='M50,50 L100,100 L150,50'/%3E%3Cpath d='M250,100 L300,150 L350,100'/%3E%3Cpath d='M150,200 L200,250 L250,200'/%3E%3C/g%3E%3Cg fill='%231e3a8a' fill-opacity='0.03'%3E%3Crect x='100' y='100' width='50' height='30' rx='3'/%3E%3Ccircle cx='300' cy='200' r='20'/%3E%3Crect x='200' y='50' width='40' height='40' rx='2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 800px 600px;
  z-index: -1;
  pointer-events: none;
  opacity: 0.4;
}

.background {
  padding: 20px 5px;
  background-color: var(--bg-card);
  border-left: 3px solid var(--primary);
  border-right: 3px solid var(--primary);
  box-shadow: 0 4px 6px -1px var(--shadow);
  margin-top: 20px;
  border-radius: 8px;
}

ul#nav {
  margin: 0px;
  padding: 0px;
  list-style: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 20px;
}

#nav li a {
  width: 150px;
  text-decoration: none;
  padding-left: 15px;
  line-height: 40px;
  display: block;
  color: var(--white);
  list-style: none;
  font-size: 15px;
  font-weight: 600;
  border-left: 30px solid var(--primary);
  border-right: 10px solid var(--primary);
  transition: all 0.3s ease;
  position: relative;
}

#nav li a::before {
  content: '🏗️';
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
}

#nav li a:hover {
  border-left: 30px solid var(--accent);
  border-right: 10px solid var(--accent);
  background-color: var(--accent);
  color: var(--white);
  text-decoration: none;
  transform: translateX(5px);
}

ul#admin {
  margin: 0px;
  padding: 0px;
  list-style: none;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  border-radius: 6px;
  overflow: hidden;
  margin-top: 20px;
}

#admin li a {
  width: 160px;
  text-decoration: none;
  padding-left: 12px;
  line-height: 30px;
  display: block;
  color: var(--white);
  list-style: none;
  font-size: 14px;
  font-weight: 600;
  border-left: 20px solid var(--secondary);
  border-right: 8px solid var(--secondary);
  transition: all 0.3s ease;
}

#admin li a:hover {
  border-left: 20px solid var(--accent);
  border-right: 8px solid var(--accent);
  background-color: var(--accent);
  color: var(--white);
  text-decoration: none;
  transform: translateX(5px);
}

/* Main table cell colours and backgrounds */
td.row1 {
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

td.row2 {
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s ease;
}

td.row3 {
  background-color: var(--bg-concrete);
  border-bottom: 1px solid var(--border);
}

td.row1:hover, td.row2:hover {
  background-color: var(--primary-light);
}

td.rowpic {
  background-color: var(--primary-light);
  border-right: 3px solid var(--primary);
  position: relative;
}

td.rowpic::before {
  content: '⚒️';
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
}

th {
  color: var(--white);
  font-size: 16px;
  font-weight: bold;
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  height: 35px;
  padding: 0 15px;
  border-bottom: 3px solid var(--accent);
  position: relative;
}

th::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(to right, 
    transparent 0%, 
    var(--accent) 50%, 
    transparent 100%);
}

td.cat, td.catHead, td.catSides, td.catLeft, td.catRight, td.catBottom {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  height: 32px;
  padding: 0 15px;
  font-weight: 600;
  border-bottom: 2px solid var(--accent);
  position: relative;
}

td.cat::before {
  content: '📋';
  margin-right: 10px;
}

/* Main content text */
.maintitle, h1, h2, h3 {
  font-weight: bold;
  font-size: 26px;
  font-family: 'Trebuchet MS', 'Arial', 'Helvetica', sans-serif;
  text-decoration: none;
  line-height: 130%;
  color: var(--primary);
  margin: 1.5em 0 1em 0;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--accent);
  position: relative;
}

.maintitle::after, h1::after, h2::after {
  content: '🏗️';
  position: absolute;
  right: 0;
  color: var(--accent);
  font-size: 24px;
}

h2 {
  font-size: 22px;
  border-left: 4px solid var(--primary);
  padding-left: 15px;
  border-bottom: none;
}

h3 {
  font-size: 20px;
  color: var(--accent);
  border-bottom: 2px solid var(--border);
}

/* Ссылки */
a:link, a:visited, a:active {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted var(--primary);
  padding-bottom: 1px;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--accent);
  border-bottom: 2px solid var(--accent);
}

/* Формы и кнопки */
input, textarea, select {
  color: var(--text);
  font: normal 16px 'Arial', 'Helvetica', sans-serif;
  background-color: var(--white);
  border: 2px solid var(--border);
  border-radius: 4px;
  padding: 8px 12px;
  transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

input.button, input[type="submit"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: var(--white);
  font-size: 16px;
  font-weight: bold;
  border: none;
  border-radius: 4px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.3s ease;
}

input.button:hover, input[type="submit"]:hover {
  background: linear-gradient(135deg, var(--primary-hover), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 4px 12px var(--shadow-hover);
}

/* Код и цитаты */
.code {
  background-color: var(--bg-concrete);
  border: 2px solid var(--border);
  border-left: 4px solid var(--primary);
  color: var(--text-dark);
  font: 14px 'Courier New', monospace;
  padding: 15px;
  margin: 15px 0;
  border-radius: 4px;
  overflow-x: auto;
}

.code::before {
  content: '📐 Чертеж';
  display: block;
  font: bold 12px 'Arial', sans-serif;
  color: var(--primary);
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px dotted var(--border);
}

.quote {
  background: linear-gradient(135deg, var(--accent-light), var(--white));
  border: 2px solid var(--accent);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  padding: 20px;
  margin: 20px 0;
  border-radius: 4px;
  position: relative;
  border-left: 5px solid var(--accent);
}

.quote::before {
  content: '💬';
  position: absolute;
  left: -15px;
  top: -15px;
  background: var(--white);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 2px solid var(--accent);
  box-shadow: 0 2px 8px var(--shadow);
}

/* Строительные бейджи */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 8px;
}

.badge-architect {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: white;
}
.badge-architect::before { content: '📐'; }

.badge-engineer {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  color: white;
}
.badge-engineer::before { content: '⚙️'; }

.badge-contractor {
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  color: white;
}
.badge-contractor::before { content: '👷'; }

.badge-electrician {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: black;
}
.badge-electrician::before { content: '⚡'; }

.badge-plumber {
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  color: white;
}
.badge-plumber::before { content: '🔧'; }

/* Иконки для разделов */
[class*="foundation"]::before { content: '🧱 '; }
[class*="framing"]::before { content: '🏗️ '; }
[class*="roofing"]::before { content: '🏠 '; }
[class*="electrical"]::before { content: '⚡ '; }
[class*="plumbing"]::before { content: '🔧 '; }
[class*="drywall"]::before { content: '📋 '; }
[class*="finishing"]::before { content: '🎨 '; }
[class*="tools"]::before { content: '⚒️ '; }

/* Адаптивность */
@media (max-width: 768px) {
  body {
    max-width: 95%;
    padding: 10px;
  }
  
  .maintitle, h1, h2, h3 {
    font-size: 20px;
  }
  
  #nav li a, #admin li a {
    width: 100%;
    border-left: 20px solid var(--primary);
    border-right: 5px solid var(--primary);
  }
  
  #nav li a:hover, #admin li a:hover {
    border-left: 20px solid var(--accent);
    border-right: 5px solid var(--accent);
  }
  
  .background {
    padding: 15px 10px;
    margin: 10px 0;
  }
}

/* Эффект строительной площадки */
@keyframes construction-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.highlight {
  animation: construction-pulse 2s ease-in-out infinite;
  background: linear-gradient(135deg, var(--accent-light), transparent);
  padding: 5px 10px;
  border-radius: 4px;
}

/* Границы таблиц с эффектом строительной ленты */
table {
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px var(--shadow);
}

table:hover {
  box-shadow: 0 6px 10px -2px var(--shadow-hover);
}

/* Копирайт */
.copyright {
  font-size: 12px;
  color: var(--text-light);
  text-align: center;
  padding: 20px;
  margin-top: 30px;
  border-top: 1px solid var(--border);
}

.copyright::before {
  content: '🏗️';
  margin-right: 5px;
}

/* Панель навигации */
.navbar {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  padding: 10px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  display: flex;
  gap: 20px;
  align-items: center;
  box-shadow: 0 4px 6px -1px var(--shadow);
}

.navbar a {
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.navbar a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* Статусы строительных проектов */
.status-planned { color: #3b82f6; background: #dbeafe; padding: 3px 8px; border-radius: 4px; }
.status-in-progress { color: #f59e0b; background: #fef3c7; padding: 3px 8px; border-radius: 4px; }
.status-completed { color: #10b981; background: #d1fae5; padding: 3px 8px; border-radius: 4px; }
.status-delayed { color: #ef4444; background: #fee2e2; padding: 3px 8px; border-radius: 4px; }