/* QRPrice - Дизайн на основе концепции 2026 */

:root {
    /* Основные цвета из концепции */
    --qr-black: #000000;
    --qr-white: #FFFFFF;
    --qr-yellow: #ff8d00;
    --qr-yellow-dark: #ff6003;
    --qr-yellow-light: #ffe4c3;
    --qr-gray-dark: #505050;
    --qr-gray-light: #F5F7F9;
    --qr-gray-border: #E0E0E0;
    --qr-success: #2E7D32;
    --qr-warning: #ff5c04;
    --qr-danger: #C62828;
    
    /* Совместимость со старыми переменными */
    --primary: #ff8d00;
    --primary-dark: ##ff6003;
    --secondary: #505050;
    --accent: #FEE159;
    --success: #2E7D32;
    --warning: #E65100;
    --danger: #C62828;
    --dark: #000000;
    --light: #F5F7F9;
    --gray: #505050;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--qr-black);
    background: var(--qr-white);
    min-height: 100vh;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6, .heading {
    font-family: 'Comfortaa', sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
    border-bottom: 1px solid var(--qr-gray-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: var(--qr-yellow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text {
    font-family: 'Comfortaa', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--qr-black);
}

.logo-text-accent {
    color: var(--qr-yellow);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
    background: transparent;
    color: white;
    animation: fadeIn 1s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    text-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.hero .lead {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.95;
    font-weight: 300;
}

.cta-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    text-align: center;
}

.btn:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-primary {
    background: var(--qr-yellow);
    color: var(--qr-black);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: none;
}

.btn-primary:hover {
    background: var(--qr-yellow-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: var(--qr-black);
}

.btn-secondary {
    background: var(--qr-white);
    color: var(--qr-black);
    border: 2px solid var(--qr-gray-border);
}

.btn-secondary:hover {
    border-color: var(--qr-yellow);
    transform: translateY(-2px);
    color: var(--qr-black);
}

/* Features Section */
.features {
    padding: 5rem 0;
    background: white;
    border-radius: 30px 30px 0 0;
    margin-top: -30px;
}

.features h2 {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 4rem;
    color: var(--qr-black);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: var(--qr-gray-light);
    padding: 3rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--qr-yellow-light);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

.feature-card:hover::before {
    opacity: 0.3;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    border-color: var(--qr-yellow);
}

.feature-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--qr-yellow-dark);
    position: relative;
    z-index: 1;
}

.feature-card p {
    color: var(--gray);
    font-size: 1.1rem;
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Footer */
footer {
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    text-align: center;
    padding: 3rem 0;
    margin-top: 3rem;
}

footer p {
    opacity: 0.8;
    font-size: 1rem;
}

/* Forms */
.form-container {
    max-width: 500px;
    margin: 3rem auto;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--qr-black);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Messages */
.message {
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.success {
    background: rgba(46, 125, 50, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success);
}

.message.error {
    background: rgba(198, 40, 40, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.message.info {
    background: rgba(255, 141, 0, 0.1);
    color: #1e40af;
    border-left: 4px solid var(--qr-yellow-dark);
}

/* Cards */
.card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark);
    font-weight: 700;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero .lead {
        font-size: 1.2rem;
    }
    
    .nav-menu {
        gap: 1rem;
    }
    
    .features h2 {
        font-size: 2rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Auth Pages */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.auth-card {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 100%;
    animation: fadeIn 0.5s ease-out;
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 800;
    color: var(--qr-black);
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray);
}

.auth-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
}

.btn-block {
    width: 100%;
    margin-top: 1rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-error {
    background: rgba(198, 40, 40, 0.1);
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-success {
    background: rgba(46, 125, 50, 0.1);
    color: #065f46;
    border-left: 4px solid var(--success);
}

/* Dashboard */
.dashboard-container {
    padding: 3rem 0;
}

.dashboard-header {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--qr-black);
    margin-bottom: 0.5rem;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--qr-yellow);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(99, 102, 241, 0.3);
}

.stat-card h3 {
    font-size: 0.9rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--qr-yellow-dark);
    margin-bottom: 0.5rem;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Tables */
.table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow: visible;
}

.table-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--qr-gray-light);
}

thead th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(99, 102, 241, 0.02);
}

tbody td {
    padding: 1.25rem 1.5rem;
    color: var(--dark);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-warning {
    background: var(--warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    background-color: blanchedalmond;
    margin-bottom: 1em;
}

.badge-primary {
    background: rgba(255, 141, 0, 0.1);
    color: var(--qr-yellow-dark);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--gray);
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.empty-state p {
    margin-bottom: 2rem;
}

/* Validation Styles */
.validation-message {
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 600;
    min-height: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.validation-message.error {
    color: var(--danger);
    animation: shake 0.3s ease-in-out;
}

.validation-message.success {
    color: var(--success);
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.validation-hint {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Password Requirements */
.password-requirements {
    margin-top: 0.75rem;
    padding: 1rem;
    background: rgba(255, 141, 0, 0.05);
    border-radius: 10px;
    border: 2px solid rgba(255, 141, 0, 0.15);
}

.requirement {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.requirement:last-child {
    margin-bottom: 0;
}

.requirement.valid {
    color: var(--success);
    font-weight: 600;
}

.req-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.requirement.valid .req-icon {
    color: var(--success);
    transform: scale(1.2);
}

/* Form Input States */
.form-group input.valid {
    border-color: var(--success);
    border-width: 2px;
    background-color: rgba(16, 185, 129, 0.02);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group input.invalid {
    border-color: var(--danger);
    border-width: 2px;
    background-color: rgba(239, 68, 68, 0.02);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group input.valid:focus {
    border-color: var(--success);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15);
}

.form-group input.invalid:focus {
    border-color: var(--danger);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

.form-group input:disabled {
    background-color: #f1f5f9;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

/* Button Disabled State */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1) !important;
}

/* User Menu Dropdown */
.user-menu-container {
    position: relative;
}

.user-menu-button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--dark);
}

.user-menu-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--qr-yellow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 141, 0, 0.3);
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-name {
    font-size: 0.95rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    color: var(--qr-yellow-dark);
}

.user-menu-arrow.rotate {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 240px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s ease;
    z-index: 1000;
    border: 2px solid rgba(255, 141, 0, 0.1);
    pointer-events: none;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    font-size: 0.95rem;
}

.dropdown-item:first-child {
    border-radius: 14px 14px 0 0;
}

.dropdown-item:last-child {
    border-radius: 0 0 14px 14px;
}

.dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--qr-yellow-dark);
    font-size: 1rem;
}

.dropdown-item:hover {
    background: rgba(255, 141, 0, 0.08);
    padding-left: 1.5rem;
}

.dropdown-item.admin-item i {
    color: var(--warning);
}

.dropdown-item.admin-item:hover {
    background: rgba(245, 158, 11, 0.08);
}

.dropdown-item.logout-item i {
    color: var(--danger);
}

.dropdown-item.logout-item:hover {
    background: rgba(239, 68, 68, 0.08);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 141, 0, 0.2);
    margin: 0.5rem 0;
}

/* Responsive User Menu */
@media (max-width: 768px) {
    .user-name {
        display: none;
    }
    
    .user-menu-button {
        padding: 0.5rem;
    }
    
    .user-dropdown {
        right: -10px;
        min-width: 200px;
    }
}
.btn-info { background: #3b82f6; color: white; } .btn-info:hover { background: #2563eb; transform: translateY(-2px); }

/* Hover-эффекты для кнопок на главной странице из концепции дизайна */
/* Желтые кнопки - меняют цвет на темно-желтый при наведении */
a[style*="background: var(--qr-yellow)"] {
    transition: all 0.3s ease;
}

a[style*="background: var(--qr-yellow)"]:hover {
    background: var(--qr-yellow-dark) !important;
}

/* Кнопки с границей - меняют цвет границы на желтый при наведении */
a[style*="border-color: var(--qr-gray-border)"] {
    transition: all 0.3s ease;
}

a[style*="border-color: var(--qr-gray-border)"]:hover {
    border-color: var(--qr-yellow) !important;
}

/* Кастомный скроллбар из концепции */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--qr-gray-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--qr-yellow);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--qr-yellow-dark);
}

/* Стили для позиций на модерации уже определены в price_edit.html */
