:root {
  --bg-main: #f5f5f7;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.8);
  --text-main: #1d1d1f;
  --text-muted: #86868b;
  --accent-blue: #0071e3;
  --accent-blue-hover: #0077ed;
  --radius-lg: 22px;
  --radius-sm: 12px;
}

/* --- ПОДКЛЮЧЕНИЕ ЛОКАЛЬНЫХ ШРИФТОВ LATO --- */
@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Italic.ttf') format('truetype');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Lato';
  src: url('../fonts/Lato-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
}

/* Применяем Lato к body */
body {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}
/* --- ЦВЕТОВЫЕ ПЯТНА НА ФОНЕ (APPLE STYLE BLOBS) --- */
.ambient-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}

.blob-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, #ff9a9e 0%, #fecfef 100%);
}

.blob-2 {
  top: 20%;
  right: -15%;
  width: 55vw;
  height: 55vw;
  background: radial-gradient(circle, #a1c4fd 0%, #c2e9fb 100%);
}

.blob-3 {
  bottom: -20%;
  left: 20%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, #e0c3fc 0%, #8ec5fc 100%);
}

/* --- ШАПКА В СТИЛЕ СТЕКЛА --- */
header {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(210, 210, 215, 0.4);
  padding: 12px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- ЛОГОТИП В ШАПКЕ --- */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.brand-logo:hover {
  opacity: 0.85;
}

.brand-img {
  height: 38px;
  width: auto;
  object-fit: contain;
  display: block;
}

.brand-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
  border-left: 1px solid rgba(0, 0, 0, 0.15);
  padding-left: 12px;
  line-height: 1.2;
}

/* --- КРУПНЫЙ ПОИСК В ШАПКЕ --- */
.search-container {
  flex: 1;
  max-width: 520px;
  margin: 0 32px;
}

.search-input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  font-size: 1.05rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.75) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2386868b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") no-repeat 16px center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  outline: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  color: var(--text-main);
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.search-input:focus {
  background-color: #ffffff;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.18), 0 8px 20px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.search-input::placeholder {
  color: #a1a1a6;
  font-weight: 400;
}

/* --- ОСНОВНОЙ КОНТЕЙНЕР --- */
.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 40px 20px;
}

.dashboard-title {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 30px;
}

.category-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 40px 0 16px 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* --- КАРТОЧКИ СЕРВИСОВ (GLASSMORPHISM) --- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.08);
  border-color: rgba(255, 255, 255, 1);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.card-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  background: #ffffff;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card h4 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0 0 20px 0;
  line-height: 1.45;
  flex-grow: 1;
}

/* КНОПКИ ДЕЙСТВИЙ В КАРТОЧКЕ */
.card-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: 980px;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: var(--accent-blue);
  color: #ffffff;
  flex-grow: 1;
}

.btn-primary:hover {
  background: var(--accent-blue-hover);
}

.btn-secondary {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-main);
  border: 1px solid rgba(0,0,0,0.05);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.1);
}