/* ── Variables (InPick brand colors from inpick.net) ── */
:root {
    --blue:      #0da3e2;
    --blue-dark: #0095d4;
    --blue-pale: #e8f5fc;
    --green:     #35aa47;
    --text:      #333;
    --muted:     #888;
    --border:    #e0e0e0;
    --bg:        #f4f4f4;
    --white:     #fff;
    --radius:    6px;
}

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

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    color: var(--text);
    background: var(--bg);
}

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');

a { color: var(--green); text-decoration: none; }
a:hover { color: #2d9040; }

/* ── Top bar (language + auth links) ── */
.topbar {
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
    height: 34px;
    display: flex;
    align-items: center;
}
.topbar .container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 16px;
}
.topbar a { color: #666; font-size: 12px; }
.topbar a:hover { color: var(--green); }
.topbar .sep { color: #ccc; font-size: 12px; }
.topbar__lang { display: flex; gap: 6px; }
.topbar__lang a { color: #888; font-size: 12px; font-weight: 600; text-transform: uppercase; }
.topbar__lang a.active,
.topbar__lang a:hover { color: var(--green); }
.topbar__auth { display: flex; align-items: center; gap: 8px; font-size: 12px; }

/* ── Header / Navbar ── */
.header {
    background: var(--white);
    border-bottom: 2px solid var(--border);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.header .container {
    display: flex;
    align-items: center;
    height: 56px;
}
.header__logo {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    flex-shrink: 0;
}
.header__logo img { height: 22px; }
.header__nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.header__nav a {
    padding: 6px 12px;
    color: var(--text);
    font-size: 13px;
    border-radius: var(--radius);
    transition: background .15s, color .15s;
}
.header__nav a:hover { background: #eaf7ec; color: var(--green); }

/* ── Buttons ── */
.btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .15s;
    line-height: 1.4;
}
.btn--primary { background: var(--green); color: var(--white); }
.btn--primary:hover { background: #2d9040; color: var(--white); }
.btn--green { background: var(--green); color: var(--white); }
.btn--green:hover { background: #2d9040; color: var(--white); }
.btn--outline { border: 1px solid var(--green); color: var(--green); background: var(--white); }
.btn--outline:hover { background: #eaf7ec; }
.btn--sm { padding: 4px 12px; font-size: 12px; }

/* ── Layout ── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.page-content { padding: 28px 0; }

/* ── Hero ── */
.hero { padding: 36px 0 24px; text-align: center; }
.hero h1 { font-size: 28px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.hero p { font-size: 15px; color: var(--muted); }

/* ── Project cards ── */
.projects { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; margin-bottom: 28px; }
.project-card {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid var(--border);
    border-top: 3px solid var(--green);
}
.project-card__title { font-size: 17px; font-weight: 700; margin-bottom: 8px; color: var(--text); }
.project-card__title .badge-soon {
    font-size: 10px; font-weight: 600; color: var(--muted);
    background: #f0f0f0; border-radius: 10px; padding: 2px 7px;
    vertical-align: middle; margin-left: 6px;
}
.project-card__desc { font-size: 13px; color: var(--muted); margin-bottom: 16px; line-height: 1.5; }

/* ── Brands section ── */
.brands-section {
    background: var(--white);
    border-radius: 8px;
    padding: 24px;
    border: 1px solid var(--border);
    margin-bottom: 28px;
}
.brands-section h2 { font-size: 17px; font-weight: 700; margin-bottom: 16px; color: var(--text); }
.brands-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    margin-bottom: 18px;
}
.brands-tab {
    padding: 8px 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color .15s;
}
.brands-tab:hover { color: var(--green); }
.brands-tab.active { color: var(--green); border-bottom-color: var(--green); }
.brands-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.brands-grid a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 8px 8px;
    width: 90px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 11px;
    color: var(--text);
    background: #fafafa;
    text-align: center;
    transition: all .15s;
}
.brands-grid a img { width: 60px; height: 60px; object-fit: contain; }
.brands-grid a span { line-height: 1.2; }
.brands-grid a:hover { border-color: var(--green); color: var(--green); background: #eaf7ec; }

/* ── Auth modals ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--white);
    border-radius: 10px;
    padding: 32px 28px;
    width: 400px;
    max-width: 95vw;
    position: relative;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
}
.modal__close {
    position: absolute;
    top: 14px; right: 16px;
    background: none; border: none;
    font-size: 22px; cursor: pointer; color: #aaa; line-height: 1;
}
.modal__close:hover { color: #555; }
.modal__tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}
.modal__tab {
    flex: 1; text-align: center;
    padding: 10px 0; cursor: pointer;
    font-size: 14px; font-weight: 600; color: var(--muted);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.modal__tab.active { color: var(--green); border-bottom-color: var(--green); }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 20px; }
.modal .field { margin-bottom: 14px; }
.modal .field input {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d0d0d0;
    border-radius: var(--radius);
    font-size: 14px;
    outline: none;
    font-family: inherit;
    transition: border-color .15s;
}
.modal .field input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(53,170,71,.12); }
.modal .form-footer { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 16px; font-size: 12px; }
.modal .form-footer a { color: var(--green); }
.modal .form-footer label { display: flex; align-items: center; gap: 5px; color: var(--muted); cursor: pointer; }
.error-msg { color: #e03c3c; font-size: 12px; margin-top: 8px; display: none; }
.success-msg { color: var(--green); font-size: 12px; margin-top: 8px; display: none; }

/* ── Toasts ── */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(0,0,0,.15);
    animation: toast-in .25s ease;
    color: #fff;
}
@keyframes toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.toast--warning  { background: #f39c12; }
.toast--success  { background: var(--green); }
.toast--error    { background: #e03c3c; }
.toast--info     { background: #0da3e2; }
.toast__icon     { font-size: 16px; flex-shrink: 0; }
.toast__close    { margin-left: auto; background: none; border: none; color: #fff; font-size: 18px; cursor: pointer; opacity: .7; line-height: 1; padding: 0; }
.toast__close:hover { opacity: 1; }

/* ── Cabinet ── */
.cabinet-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; max-width: 900px; margin: 0 auto; }
.cabinet-sidebar { background: var(--white); border-radius: 8px; border: 1px solid var(--border); overflow: hidden; align-self: start; }
.cabinet-sidebar__user { padding: 20px; border-bottom: 1px solid var(--border); text-align: center; }
.cabinet-sidebar__user .name { font-weight: 700; font-size: 15px; margin-top: 4px; }
.cabinet-sidebar__user .email { font-size: 12px; color: var(--muted); }
.cabinet-nav a {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px;
    color: var(--text); font-size: 13px; font-weight: 600;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.cabinet-nav a:hover { background: #eaf7ec; color: var(--green); }
.cabinet-nav a.active { background: #eaf7ec; color: var(--green); border-left-color: var(--green); }
.cabinet-nav a svg { flex-shrink: 0; }

.cabinet-main {}
.portlet {
    background: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    overflow: hidden;
}
.portlet__title {
    padding: 12px 20px;
    background: var(--green);
    color: var(--white);
    font-weight: 700;
    font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.portlet__body { padding: 24px; }

.form-row { display: grid; grid-template-columns: 140px 1fr 100px; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.form-row:last-child { border-bottom: none; }
.form-row label { font-size: 13px; color: var(--muted); font-weight: 600; }
.form-row input, .form-row select {
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-family: inherit;
    outline: none;
    width: 100%;
    transition: border-color .15s;
}
.form-row input:focus, .form-row select:focus { border-color: var(--green); }
.form-row input[readonly] { background: #f8f8f8; color: var(--muted); cursor: default; }
.form-row .actions { display: flex; gap: 6px; visibility: hidden; }
.form-row.changed .actions { visibility: visible; }
.form-msg { font-size: 12px; margin-top: 12px; display: none; padding: 8px 12px; border-radius: var(--radius); }
.form-msg.success-msg { background: #edfae1; color: #3a7d1e; display: block; }
.form-msg.error-msg { background: #fdecea; color: #c0392b; display: block; }

/* ── Footer ── */
.footer { background: var(--white); border-top: 1px solid var(--border); margin-top: 40px; padding: 16px 0; }
.footer .copyright { font-size: 12px; color: var(--muted); text-align: center; }

/* ── Responsive ── */
@media (max-width: 768px) {
    .cabinet-layout { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row .actions { visibility: visible; }
    .topbar__auth .btn-text { display: none; }
}
