/* style2.css - Темная тема с фиолетовыми акцентами */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Основные цвета - темная тема */
    --bg-primary: #2d2d2d;
    --bg-secondary: #3a3a3a;
    --bg-card: #424242;
    --bg-input: #4a4a4a;
    --bg-hover: #525252;
    
    /* Акценты */
    --primary: #9C27B0;
    --primary-light: #AB47BC;
    --primary-dark: #7B1FA2;
    --accent: #E91E63;
    
    /* Нейтральные */
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #525252;
    --gray-100: #616161;
    --gray-200: #757575;
    
    /* Статусы */
    --success: #4CAF50;
    --warning: #FF9800;
    --error: #F44336;
    --info: #2196F3;
    
    /* Тени */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    
    /* Радиусы */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Переходы */
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 20px 0;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 44px;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
}

.nav a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 30px;
    transition: var(--transition);
    padding: 8px 16px;
    border-radius: var(--radius-md);
}

.nav a:hover,
.nav a.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Main */
.main {
    padding: 60px 0;
    min-height: calc(100vh - 200px);
}

.page-title {
    font-size: 36px;
    color: var(--text-primary);
    margin-bottom: 40px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.product-title {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

.product-price {
    margin-bottom: 20px;
}

.price-from {
    display: block;
    font-size: 22px;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.price-bulk {
    display: block;
    font-size: 14px;
    color: var(--text-secondary);
}

.product-link {
    color: var(--primary);
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

.btn-success:hover {
    background: #43a047;
}

.btn-warning {
    background: var(--warning);
    color: var(--white);
}

.btn-danger {
    background: var(--error);
    color: var(--white);
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.card h3 {
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"], 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 15px;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
}

td {
    color: var(--text-secondary);
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
}

.status-ready {
    background: rgba(76, 175, 80, 0.2);
    color: var(--success);
}

.status-cancelled {
    background: rgba(244, 67, 54, 0.2);
    color: var(--error);
}

.status-new {
    background: rgba(156, 39, 176, 0.2);
    color: var(--primary);
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

/* Responsive */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav a {
        margin: 0 10px;
    }
}

/* Header */
.header {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 15px 0;
    box-shadow: var(--shadow-md);
}

.header .container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 40px;
}

/* Navigation Left */
.nav-left {
    display: flex;
    gap: 30px;
    flex: 1;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--bg-card);
}

/* Logo Center */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 44px;
    font-weight: bold;
    color: var(--text-primary);
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    font-size: 28px;
}

/* Header Right */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.btn-login {
    min-width: 100px;
}

/* Products Grid - Compact */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.product-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.product-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    color: var(--primary);
}

.product-icon svg {
    width: 100%;
    height: 100%;
    stroke-width: 1.5;
}

.product-title {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 600;
}

.product-desc {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 13px;
    flex-grow: 1;
}

.product-price {
    margin-bottom: 15px;
    padding: 12px;
    background: linear-gradient(135deg, rgba(156, 39, 176, 0.1) 0%, rgba(123, 31, 162, 0.15) 100%);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--primary);
}

.price-from {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.price-bulk {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Buttons - Compact */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-block {
    width: 100%;
    padding: 12px;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-left {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .header-right {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    padding: 40px 0 20px;
    margin-top: 80px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section li {
    margin-bottom: 8px;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-section p {
    margin: 5px 0;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer {
        margin-top: 40px;
        padding: 30px 0 20px;
    }
}

/* Loading Spinner */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bg-input);
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary);
  font-size: 16px;
  font-weight: 500;
}

/* ===== Top Info Bar ===== */
.top-info-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 8px 0;
  font-size: 13px;
}

.top-info-content {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--text-secondary);
}

.info-link {
  color: var(--primary);
  text-decoration: none;
  margin-left: auto;
}

.info-link:hover {
  text-decoration: underline;
}

/* ===== Header Right ===== */
.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-icons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-icon-wrapper {
  position: relative;
}

.header-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}

.header-icon:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.icon-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: var(--error);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border: 2px solid var(--bg-secondary);
}

/* ===== User Dropdown ===== */
.user-dropdown {
  position: relative;
}

.user-dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 8px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.user-dropdown-toggle:hover {
  border-color: var(--primary);
  background: var(--bg-card);
}

.dropdown-arrow {
  transition: transform 0.2s ease;
}

.user-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 1000;
  overflow: hidden;
}

.user-dropdown.open .user-dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-user-info {
  padding: 16px;
  background: var(--bg-secondary);
}

.dropdown-user-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  transition: var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.dropdown-item svg {
  flex-shrink: 0;
}

.dropdown-logout {
  color: var(--error);
}

.dropdown-logout:hover {
  background: rgba(244, 67, 54, 0.1);
  color: var(--error);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .top-info-content {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }
  
  .header-right {
    gap: 10px;
  }
  
  .user-dropdown-menu {
    right: -10px;
    min-width: 220px;
  }
}