/* Custom Registration Form v4 — Frontend CSS
   Paletă: #ffffff · #121614 · #dde8e4 */

/* ===== TABS ===== */
.crf-tabs {
    max-width: 560px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    box-shadow: 0 -2px 12px rgba(18,22,20,.06);
}

.crf-tab-btn {
    display: block;
    width: 100%;
    padding: 14px 20px;
    text-align: center;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    letter-spacing: .02em;
    background: #f0f4f2;
    color: #7a8d86;
    border: none;
    border-bottom: 2.5px solid #dde8e4;
    cursor: pointer;
    transition: background .18s, color .18s;
}

.crf-tab-btn:hover {
    background: #e4eeea;
    color: #121614;
}

.crf-tab-btn--active {
    background: #ffffff;
    color: #121614;
    border-bottom-color: #ffffff;
    cursor: default;
}

/* ===== PANELS ===== */
.crf-panel { display: none; }
.crf-panel--active { display: block; }

/* Wrap cu tabs deasupra — colțuri de sus drepte */
.crf-tabs + .crf-panel--active .crf-wrap,
.crf-tabs ~ .crf-panel .crf-wrap {
    border-radius: 0 0 10px 10px;
}

/* ===== WRAPPER FORM ===== */
.crf-wrap {
    max-width: 560px;
    margin: 0 auto;
    padding: 36px 36px 40px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(18,22,20,.07);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #121614;
    box-sizing: border-box;
}

/* ===== NOTIFICĂRI ===== */
.crf-notice {
    border-radius: 7px;
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: .9rem;
    line-height: 1.55;
}
.crf-notice--success {
    background: #dde8e4;
    border: 1.5px solid #a8c8bf;
    color: #1a3d32;
    font-weight: 500;
}
.crf-notice--error {
    background: #fff4f4;
    border: 1.5px solid #f0b0b0;
    color: #a02020;
}
.crf-notice--error ul { margin:0; padding-left:20px; }
.crf-notice--error li + li { margin-top:4px; }
.crf-logged-in { color:#555; }
.crf-logged-in a { color:#3a7a6e; }

/* ===== LAYOUT ===== */
.crf-row--half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 500px) {
    .crf-tabs { border-radius: 8px 8px 0 0; }
    .crf-wrap { padding: 24px 18px 30px; }
    .crf-row--half { grid-template-columns: 1fr; gap: 0; }
}

/* ===== CÂMPURI ===== */
.crf-field { margin-bottom: 20px; }
.crf-field:last-child { margin-bottom: 0; }

.crf-field > label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #121614;
    margin-bottom: 6px;
    letter-spacing: .01em;
}
.crf-req { color: #c0392b; margin-left: 2px; }
.crf-optional { font-weight:400; color:#7a8d86; font-size:.8rem; margin-left:4px; }

.crf-field input[type="text"],
.crf-field input[type="email"],
.crf-field input[type="password"],
.crf-field input[type="tel"],
.crf-field select,
.crf-field textarea {
    display: block;
    width: 100%;
    padding: 10px 13px;
    font-size: .95rem;
    font-family: inherit;
    color: #121614;
    background: #fafafa;
    border: 1.5px solid #cdd8d3;
    border-radius: 6px;
    box-sizing: border-box;
    outline: none;
    transition: border-color .18s, box-shadow .18s, background .18s;
    -webkit-appearance: none;
    appearance: none;
}
.crf-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23121614' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 36px;
    cursor: pointer;
}
.crf-field textarea { resize:vertical; min-height:80px; }
.crf-field input:focus,
.crf-field select:focus,
.crf-field textarea:focus {
    border-color: #7ab8ae;
    box-shadow: 0 0 0 3px rgba(122,184,174,.18);
    background: #fff;
}
.crf-field input::placeholder,
.crf-field textarea::placeholder { color:#b0bdb8; font-size:.88rem; }
.crf-field small { display:block; margin-top:5px; font-size:.78rem; color:#7a8d86; line-height:1.4; }
.crf-notice-text { color:#4a7a72 !important; font-style:italic; }
.crf-field-notice { margin:6px 0 0; font-size:.88rem; color:#a02020; }

/* ===== TOGGLE PAROLĂ ===== */
.crf-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.crf-pw-wrap input {
    padding-right: 44px !important;
    flex: 1;
}
.crf-pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #9ab5ae;
    display: flex;
    align-items: center;
    line-height: 1;
    transition: color .15s;
}
.crf-pw-toggle:hover { color: #121614; }
.crf-pw-toggle:focus-visible { outline: 2px solid #7ab8ae; border-radius: 3px; }

/* Stare implicită: parola ascunsă → arată ochiul deschis */
.crf-pw-toggle .crf-eye-off   { display: none; }
.crf-pw-toggle .crf-eye-open  { display: block; }

/* Stare vizibilă: parola vizibilă → arată ochiul tăiat */
.crf-pw-toggle.crf-pw-visible .crf-eye-open { display: none; }
.crf-pw-toggle.crf-pw-visible .crf-eye-off  { display: block; }

/* ===== DATA NAȘTERII ===== */
.crf-dob-group {
    display: grid;
    grid-template-columns: 80px 1fr 100px;
    gap: 10px;
}
.crf-dob-select { width:100% !important; }
@media (max-width:400px) {
    .crf-dob-group { grid-template-columns:1fr 1fr; }
    .crf-dob-group .crf-dob-select:last-child { grid-column:1 / -1; }
}

/* ===== ADRESĂ LIVRARE (toggle) ===== */
.crf-delivery-hidden { display:none; }
.crf-delivery-visible { display:block; }

/* ===== CHECKBOX ===== */
.crf-field--check { padding:4px 0; }
.crf-check-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: .88rem;
    line-height: 1.55;
    color: #2e3d38;
}
.crf-check-label input[type="checkbox"] {
    width:17px; height:17px; min-width:17px;
    margin-top:2px; accent-color:#4a9a8e; cursor:pointer;
}
.crf-check-label a { color:#2e7a6e; text-decoration:underline; text-underline-offset:2px; }
.crf-check-label a:hover { color:#121614; }

/* ===== BUTOANE ===== */
.crf-field--submit { margin-top:28px; }
.crf-btn {
    display: inline-block;
    padding: 13px 24px;
    background: #121614;
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .025em;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    text-decoration: none;
    transition: background .18s, transform .1s;
}
.crf-field--submit .crf-btn { display:block; width:100%; text-align:center; }
.crf-btn:hover { background:#2a3630; color:#fff; }
.crf-btn:active { transform:scale(.985); }
.crf-btn:focus-visible { outline:3px solid #7ab8ae; outline-offset:2px; }

/* ===== FORGOT PASSWORD ===== */
.crf-forgot-link {
    text-align: center;
    margin-top: 16px;
    font-size: .85rem;
}
.crf-forgot-link a { color:#3a7a6e; text-decoration:underline; }

/* ===== TITLU FORMULAR ===== */
.crf-form-title {
    margin: 0 0 20px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #121614;
}

/* ===== CÂMP CAPTCHA ===== */
#crf_captcha {
    max-width: 120px;
}

/* ===== NOTIFICARE SUCCESS ===== */
.crf-notice--success {
    background: #dde8e4;
    border: 1.5px solid #a8c8bf;
    color: #1a3d32;
    font-weight: 500;
}

/* ===== DASHBOARD ===== */
.crf-dashboard {
    max-width: 680px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #121614;
}

.crf-dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 28px;
    background: #121614;
    border-radius: 10px 10px 0 0;
    gap: 16px;
}

.crf-dashboard-greeting {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
}

.crf-btn--order {
    background: #dde8e4;
    color: #121614;
    font-size: .9rem;
    padding: 10px 20px;
    white-space: nowrap;
}
.crf-btn--order:hover { background: #c8dcd7; color: #121614; }

.crf-dashboard-section {
    background: #ffffff;
    border-left: 1px solid #e8efec;
    border-right: 1px solid #e8efec;
    border-bottom: 1px solid #e8efec;
    padding: 24px 28px;
}

.crf-dashboard-section h4 {
    margin: 0 0 16px;
    font-size: .9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #7a8d86;
}

/* Definition list — datele contului */
.crf-details {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 10px 16px;
    margin: 0;
    font-size: .92rem;
}
.crf-details dt {
    font-weight: 600;
    color: #7a8d86;
    align-self: start;
}
.crf-details dd {
    margin: 0;
    color: #121614;
    word-break: break-word;
}
@media (max-width:480px) {
    .crf-details { grid-template-columns: 1fr; gap: 4px 0; }
    .crf-details dt { margin-top: 10px; }
    .crf-details dt:first-child { margin-top: 0; }
}

/* Tabel comenzi */
.crf-table-wrap { overflow-x: auto; }
.crf-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.crf-orders-table th {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 2px solid #dde8e4;
    color: #7a8d86;
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
}
.crf-orders-table td {
    padding: 10px 10px;
    border-bottom: 1px solid #f0f4f2;
    vertical-align: middle;
}
.crf-orders-table tr:last-child td { border-bottom: none; }

/* Badge status */
.crf-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}
.crf-status--completed  { background:#d4edda; color:#1a6629; }
.crf-status--processing { background:#d1ecf1; color:#0c5460; }
.crf-status--pending    { background:#fff3cd; color:#856404; }
.crf-status--on-hold    { background:#fff3cd; color:#856404; }
.crf-status--cancelled  { background:#f8d7da; color:#721c24; }
.crf-status--refunded   { background:#e2e3e5; color:#383d41; }
.crf-status--failed     { background:#f8d7da; color:#721c24; }

.crf-link { color:#2e7a6e; text-decoration:underline; font-size:.85rem; }
.crf-no-data { color:#7a8d86; font-size:.9rem; margin:0; }

/* Footer dashboard */
.crf-dashboard-footer {
    background: #f7faf9;
    border: 1px solid #e8efec;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 14px 28px;
    text-align: right;
}
.crf-logout-link {
    font-size: .85rem;
    color: #a02020;
    text-decoration: underline;
}
.crf-logout-link:hover { color: #7a1515; }
