/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif; font-size: 14px; color: #333; }

/* Login Page (Energen Lux style) */
.login-page { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-height: 100vh; background: #ffffff; padding-top: 80px; }
.login-logo { text-align: center; margin-bottom: 40px; }
.login-logo img { max-width: 220px; height: auto; }
.login-logo-text { font-size: 26px; font-weight: 700; color: #003da5; }
.login-container { width: 100%; max-width: 430px; padding: 0 20px 40px; }
.login-box { background: #ffffff; padding: 32px 36px 28px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid #e1e5eb; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #d0d7e2; border-radius: 4px; font-size: 14px; background:#f7f8fa; }
.form-group input:focus { outline: none; border-color: #003da5; background:#ffffff; }

/* Login-specific form tweaks */
.password-group .password-input-wrapper { position: relative; display: flex; align-items: center; }
.password-group input { padding-right: 40px; }
.password-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border: none; background: transparent center center no-repeat; background-size: 18px 18px; cursor: pointer; padding: 0; }
/* Ochi închis (parolă ascunsă) */
.password-toggle { 
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 12C4.8 8.5 8.1 6 12 6C15.9 6 19.2 8.5 21 12C19.2 15.5 15.9 18 12 18C8.1 18 4.8 15.5 3 12Z' stroke='%23607D8B' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cline x1='5' y1='5' x2='19' y2='19' stroke='%23607D8B' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
}
/* Ochi deschis (parolă vizibilă) */
.password-toggle.visible {
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 12C4.8 8.5 8.1 6 12 6C15.9 6 19.2 8.5 21 12C19.2 15.5 15.9 18 12 18C8.1 18 4.8 15.5 3 12Z' stroke='%23003DA5' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='12' cy='12' r='2.8' stroke='%23003DA5' stroke-width='1.6'/%3E%3C/svg%3E");
}
.remember-row { display:flex; align-items:center; justify-content:flex-start; margin-top: 4px; }
.remember-label { font-weight: 400; cursor:pointer; font-size: 13px; display:inline-flex; align-items:center; gap:6px; }
.remember-label input { margin: 0; width: auto; height: auto; }
.login-lang-inline {
    margin-left: auto;
    position: relative;
    display: inline-block;
}

.login-lang-display {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    color: #333;
    pointer-events: none;
    white-space: nowrap;
}

.header-lang-select {
    min-width: 80px;              /* suficient pentru RO/EN/RU scurt și label complet */
    height: 24px;
    padding: 0; /* textul este randat în span-ul de deasupra, nu în select */
    font-size: 12px;
    color: transparent;      /* ascundem textul intern al selectului */
    background-color: #ffffff;
}
.login-submit { margin-top: 10px; font-size: 15px; font-weight: 500; }

/* Forgot password spacing */
.login-forgot { text-align:center; margin-top: 14px; margin-bottom: 14px; font-size: 13px; }
.login-forgot a { color:#003da5; text-decoration: underline; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
    gap: 6px;
    margin-right: 8px;
    margin-bottom: 6px;
}
.btn:last-child {
    margin-right: 0;
}
.btn-primary { background: #003da5; color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.12); }
.btn-primary:hover { background: #002b73; }
.btn-warning { background: #ffeb3b; color: #333; }
.btn-warning:hover { background: #fdd835; }
.btn-danger { background: #d32f2f; color: #fff; }
.btn-danger:hover { background: #b71c1c; }
.btn-block { display: flex; width: 100%; }
.qty-btn { padding: 5px 10px; border: 1px solid #ccc; background: #f0f0f0; border-radius: 3px; cursor: pointer; font-size: 14px; }
.qty-btn:hover { background: #e0e0e0; }
.remove-btn { background: #fbe9e7; color: #d84315; border-color: #fbe9e7; }

/* Alerts */
.alert { padding: 12px; margin-bottom: 15px; border-radius: 4px; }
.alert-error { background: #ffebee; color: #c62828; border: 1px solid #ef5350; }
.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #66bb6a; }

/* E-Order Layout */
.eorder-layout { display: flex; gap: 20px; padding: 20px; max-width: 1400px; margin: 0 auto; }
.eorder-cart-sidebar { flex: 0 0 300px; background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
.eorder-main { flex: 1; }

/* Cart */
#cart-items { margin-bottom: 20px; }
.cart-item { display: flex; flex-direction: column; gap: 8px; padding: 10px; border-bottom: 1px solid #eee; font-size: 12px; }
.cart-item-code { font-weight: 600; }
.cart-item-controls { display: flex; align-items: center; gap: 8px; }
.qty-display { width: 40px; text-align: center; padding: 4px; border: 1px solid #ddd; border-radius: 3px; }
.cart-item-price { display: flex; flex-direction: column; gap: 4px; }
.cart-item-price small { color: #666; font-size: 10px; }
.cart-total { padding: 15px 10px; border-top: 2px solid #ddd; margin-top: 10px; text-align: right; }
.cart-actions { display: flex; flex-direction: column; gap: 10px; }
.cart-actions a { margin: 0; }

/* Shared quantity controls (Products table + View Cart / Checkout + Quick Cart) */
.quantity-cell,
.cart-qty,
.cart-item-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.quantity-cell .qty-input,
.cart-qty-input,
.qty-input-cart {
    width: 50px;
    text-align: center;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.quantity-cell .qty-input::-webkit-inner-spin-button,
.quantity-cell .qty-input::-webkit-outer-spin-button,
.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button,
.qty-input-cart::-webkit-inner-spin-button,
.qty-input-cart::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-cell .qty-input[type=number],
.cart-qty-input[type=number],
.qty-input-cart[type=number] {
    -moz-appearance: textfield;
}

/* Header */
.eorder-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding: 15px 20px; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.eorder-header h1 { font-size: 20px; color: #1976d2; }
.user-menu { display: flex; gap: 15px; align-items: center; font-size: 13px; }
.user-menu a { color: #1976d2; text-decoration: none; }

/* Categories */
.eorder-categories { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
.category-btn { padding: 10px 15px; background: #f5f5f5; border: 1px solid #ddd; border-radius: 4px; text-decoration: none; color: #333; font-size: 13px; }
.category-btn.active { background: #1976d2; color: #fff; border-color: #1976d2; }

/* Search */
.eorder-search { margin-bottom: 15px; }
.eorder-search form { display: flex; gap: 10px; }
.eorder-search input { flex: 1; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
.eorder-search button { padding: 10px 20px; background: #1976d2; color: #fff; border: none; border-radius: 4px; cursor: pointer; }

/* Subcategories */
.eorder-subcategories { margin-bottom: 15px; padding: 15px; background: #fafafa; border: 1px solid #ddd; border-radius: 4px; display: flex; justify-content: space-between; align-items: center; }
.subcategory-dropdown { position: relative; }
.dropdown-toggle { padding: 8px 15px; background: #fff; border: 1px solid #ccc; border-radius: 4px; cursor: pointer; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background: #fff; border: 1px solid #ccc; border-radius: 4px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); min-width: 250px; z-index: 1000; margin-top: 5px; }
.dropdown-menu.show { display: block; }
.dropdown-menu a { display: block; padding: 10px 15px; color: #333; text-decoration: none; border-bottom: 1px solid #eee; }
.dropdown-menu a:hover { background: #f5f5f5; }

/* Products Table */
.products-table-wrapper { background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); overflow-x: auto; }
.products-table { width: 100%; border-collapse: collapse; }
.products-table th { background: #f5f5f5; padding: 12px 10px; text-align: left; font-weight: 600; border-bottom: 2px solid #ddd; font-size: 13px; }
.products-table td { padding: 10px; border-bottom: 1px solid #eee; }
.products-table tbody tr:hover { background: #fafafa; }

/* Responsive */
@media (max-width: 768px) {
    .eorder-layout { flex-direction: column; }
    .eorder-cart-sidebar { position: static; max-height: none; }
}

/* Utilities */
.text-center { text-align: center; }
.text-danger { color: #d32f2f; }
.mt-3 { margin-top: 15px; }
