/* ========== Auth (login) + Account (ЛК) — стили ========== */

.auth-main, .account-main {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem 1rem 3rem;
}

.auth-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    margin: 1.5rem auto 0;
}
.auth-card h1 {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-size: 1.6rem;
}
.auth-subtitle {
    color: #475569;
    margin: 0 0 1.5rem;
    line-height: 1.5;
}

.auth-form { margin-bottom: 1rem; }
.auth-label {
    display: block;
    margin-bottom: 0.4rem;
    font-weight: 500;
    color: #1e293b;
    font-size: 0.95rem;
}
.auth-input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    background: #fff;
}
.auth-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}
.auth-input:invalid:not(:placeholder-shown) {
    border-color: #ef4444;
}

.auth-submit {
    margin-top: 1rem;
    width: 100%;
    padding: 0.85rem 1rem;
    background: #e74c3c;
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.auth-submit:hover:not(:disabled) { background: #c0392b; }
.auth-submit:disabled { background: #94a3b8; cursor: wait; }

.auth-consent {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #475569;
    line-height: 1.4;
    cursor: pointer;
}
.auth-consent input[type="checkbox"] {
    margin-top: 0.2rem;
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}
.auth-consent a {
    color: #3b82f6;
    text-decoration: underline;
}
.auth-consent a:hover { color: #1e40af; }

.auth-result {
    padding: 0.85rem 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
}
.auth-result.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #10b981;
}
.auth-result.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #ef4444;
}

.auth-info {
    margin-top: 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #475569;
}
.auth-info h3 {
    margin: 0 0 0.5rem;
    color: #1e293b;
    font-size: 0.95rem;
}
.auth-info ol {
    margin: 0 0 0.5rem;
    padding-left: 1.25rem;
    line-height: 1.6;
}
.auth-info-fine {
    margin: 0.75rem 0 0;
    color: #94a3b8;
    font-size: 0.85rem;
}

/* ========== Account (ЛК) ========== */
.account-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}
.account-header h1 {
    margin: 0;
    color: #1e293b;
    font-size: 1.8rem;
}
.account-email {
    color: #64748b;
    font-size: 0.95rem;
    margin-top: 0.25rem;
}
.account-actions {
    display: flex;
    gap: 0.5rem;
}
.btn-secondary, .btn-primary {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: 0;
    text-decoration: none;
    display: inline-block;
}
.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
}
.btn-secondary:hover { background: #e2e8f0; color: #1e293b; }
.btn-primary {
    background: #e74c3c;
    color: #fff;
}
.btn-primary:hover { background: #c0392b; color: #fff; }

.account-empty {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
}
.account-empty h2 { color: #1e293b; margin: 0 0 0.5rem; }
.account-empty a { color: #e74c3c; }

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.order-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.order-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}
.order-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    cursor: pointer;
}
.order-card-num {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.05rem;
}
.order-card-date {
    color: #64748b;
    font-size: 0.85rem;
    margin-left: 0.5rem;
}
.order-card-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.status-new { background: #e0e7ff; color: #3730a3; }
.status-processing { background: #dbeafe; color: #1e40af; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #fee2e2; color: #991b1b; }
.order-card-total {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}
.order-card-body {
    padding: 1rem;
    display: none;
}
.order-card.expanded .order-card-body { display: block; }
.order-card-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: #475569;
}
.order-card-meta b { color: #1e293b; }
.order-items-list {
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    margin-bottom: 0.75rem;
}
.order-item-row {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: #475569;
}
.order-card-actions {
    display: flex;
    gap: 0.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 0.75rem;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .auth-card { padding: 1.5rem 1rem; }
    .account-header h1 { font-size: 1.4rem; }
    .order-card-head { padding: 0.75rem; }
}