/* ═══════════════════════════════════════════════════════
   styleadmin.css — panoul de administrare cauta-imobiliare.ro
   ═══════════════════════════════════════════════════════ */

/* ── Reset ──────────────────────────────────────────── */
*, *:before, *:after { box-sizing: border-box; }
body {
    margin: 0; padding: 0;
    background: #fff url('/img/bgr-imobiliar.png') no-repeat center bottom fixed;
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #3A4A5C;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 10px; }
h1 { font-size: 20px; color: #2C3A4A; }
h2 { font-size: 17px; color: #2C3A4A; }
h3 { font-size: 14px; color: #3A4A5C; font-weight: bold; }
img { border: 0; padding: 0; max-width: 100%; }
p, ul, li { margin: 0; padding: 0; list-style: none; }
a { color: #36A7AD; text-decoration: none; }
a:hover { color: #2A8A8F; }
.clr { clear: both; }
.nomobile {}
.nodesktop { display: none; }

/* ── Header ─────────────────────────────────────────── */
#header-container { background: #4A5064; box-shadow: 0 -3px 2px rgba(0,0,0,.1) inset; }
#header { max-width: 1000px; width: 100%; height: 54px; margin: 0 auto; padding: 0 10px; box-sizing: border-box; display: block; }
#header a { text-decoration: none; }
#admin-logo {
    width: 36px; height: 36px;
    margin: 9px 8px 9px 6px;
    background: #fff url('/img/logo.png') no-repeat 8px center;
    background-size: auto 22px;
    border-radius: 4px;
    float: left; display: block;
    overflow: hidden;
}
a.link-header {
    color: #fff; font-size: 13px; font-weight: bold;
    padding: 0 20px; display: flex; align-items: center; line-height: 14px;
    transition: background .2s; border-right: 1px solid #6C7283;
    position: relative;
}
a.link-header:link, a.link-header:visited { color: #fff; }
a.link-header:hover, a.link-header.link-header-sel { background: #36A7AD; }
a.link-header.link-header-sel:link, a.link-header.link-header-sel:visited, a.link-header.link-header-sel:hover { color: #fff; }

/* Dropdown nav */
#header ul { position: relative; display: flex; align-items: stretch; width: 100%; }
#header ul li { float: none; position: relative; cursor: pointer; transition: all .2s; display: flex; align-items: stretch; }
#header ul li ul {
    position: absolute; top: 54px; left: -10px; z-index: 10;
    width: 300px; display: none; padding: 0;
    border-radius: 0 0 10px 10px;
    border-top: 3px solid #36A7AD;
    background: #3d4356;
    box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
/* titluri secțiuni în dropdown */
#header ul li ul b,
#header ul li ul .admin-sep {
    display: block; color: #8FE3E8;
    font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px;
    padding: 12px 16px 6px; margin: 4px 0 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
#header ul li ul b:first-child,
#header ul li ul .admin-sep:first-child { border-top: none; margin-top: 0; }

/* rând = flex cu link + cnt + + */
#header ul li ul li {
    display: flex; align-items: center;
    width: 300px; border-bottom: 1px solid rgba(255,255,255,.06);
}
#header ul li ul li:hover { background: rgba(255,255,255,.07); }
#header ul li ul li:last-child { border-bottom: none; border-radius: 0 0 10px 10px; }

/* link principal flex:1 */
#header ul li ul li > a:first-child {
    flex: 1; display: flex; align-items: center;
    color: #fff; font-size: 14px; padding: 10px 14px;
}
#header ul li ul li > a:first-child:link,
#header ul li ul li > a:first-child:visited { color: #fff; }
#header ul li ul li > a:first-child:hover   { color: #8FE3E8; }

#header ul li:hover ul { display: block; }

/* nr oferte — împins la dreapta, în interiorul link-ului */
.admin-cnt {
    display: inline-block;
    background: rgba(255,255,255,.2); color: #fff;
    font-size: 11px; padding: 3px 8px; border-radius: 3px;
    min-width: 22px; text-align: center;
    margin-left: auto; flex-shrink: 0;
}

/* + adaugă — pătrat galben */
.admin-add {
    flex: 0 0 26px;
    display: flex; align-items: center; justify-content: center;
    width: 26px; height: 26px;
    background: #FFCC66; color: #3A4A5C !important;
    border-radius: 3px; margin: 0 10px 0 10px;
    font-size: 18px; font-weight: bold; line-height: 1;
    text-decoration: none !important; flex-shrink: 0;
}
.admin-add:hover { background: #FFD966; color: #000 !important; }

/* Mobile header icons */
a.link-header-mobil {
    width: 40px; height: 40px; background-color: #fff; border-radius: 20px;
    float: right; margin: 7px 0 0 5px;
    background-repeat: no-repeat; background-size: 300px 1500px;
}
a.link-header-mobil:hover { background-color: #8FE3E8; }
.i_admin   { background-image: url('/admin/imagini/icon-admin.svg');  background-size: 30px; }
.i_mesaje2 { background-image: url('/admin/imagini/icon-mesaje.svg'); background-size: 30px; }
.i_logout  { background-image: url('/admin/imagini/icon-logout.svg'); background-size: 30px; }

/* Mesaje badge */
.admin-badge {
    display: inline-block; background: #E07F3C; color: #fff;
    font-size: 9px; font-weight: bold; min-width: 14px; height: 14px;
    line-height: 14px; text-align: center; border-radius: 7px; padding: 0 3px;
}
a.link-header { position: relative; }
a.link-header .admin-badge { position: absolute; top: 12px; margin-left: 2px; }
a.admin-logout-btn { display: flex; align-items: center; justify-content: center; width: 44px; height: 54px; opacity: .7; transition: opacity .2s; }
a.admin-logout-btn:hover { opacity: 1; }
.admin-msg-badge { position: absolute; top: 0; left: 50%; transform: translateX(-50%); background: #FFCC66; color: #3A4A5C; font-size: 9px; font-weight: bold; padding: 1px 6px; border-radius: 0 0 4px 4px; line-height: 13px; white-space: nowrap; }
.mob-badge-wrap { position: relative; float: right; margin: 7px 0 0 5px; }
.mob-badge-wrap .link-header-mobil { float: none; margin: 0; }
.mob-badge-wrap .admin-badge { position: absolute; top: 0; right: 0; }

/* Mobile nav expandabil */
#admin-mob-toggle { display: none; }
#admin-mob-nav { display: none; background: #3d4356; padding: 8px 0; }
#admin-mob-toggle:checked ~ #admin-mob-nav { display: block; }
.admin-mob-section { padding: 14px 16px 8px; color: #8FE3E8; font-size: 11px; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.admin-mob-link {
    display: flex; align-items: center;
    padding: 10px 20px; color: #fff; font-size: 14px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.admin-mob-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-mob-link .admin-cnt { margin-left: auto; }
.admin-mob-link-cnt { margin-left: auto; }
.admin-ham { display: none; float: left; width: 40px; height: 40px; margin: 7px 6px 0 0; cursor: pointer; background: rgba(255,255,255,.15); border-radius: 4px; border: none; padding: 0; }
.admin-ham span { display: block; width: 20px; height: 2px; background: #fff; margin: 4px auto; border-radius: 1px; transition: .2s; }

/* ── Subheader ───────────────────────────────────────── */
#subheader-container {
    width: 100%; background: #F4F9FD; padding: 8px 0 5px;
    position: sticky; top: 0; z-index: 5;
    box-shadow: 3px 2px 0 rgba(0,0,0,.08);
}
#subheader { width: 1000px; margin: 0 auto; overflow: hidden; }
#subheader h1 { font-size: 17px; margin: 0; }
a.inapoi {
    float: left; color: #fff; font-size: 12px;
    background: #FFCC66 url('/img/sprite.png') no-repeat 0 -654px;
    background-size: 150px 750px; padding: 5px 10px 5px 20px;
    border-radius: 4px; margin: 0 5px 5px 0;
}
a.inapoi:hover { background-color: #8FE3E8; }

/* ── Paginare ────────────────────────────────────────── */
.paginatie { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 3px; font-size: 12px; }
.pag_sel, a.pag_sel:link, a.pag_sel:visited, a.pag_sel:hover {
    color: #fff; background: #C2C5D1; padding: 4px 7px;
    border: 1px solid #C2C5D1; border-radius: 4px; text-decoration: none; }
.pagina  { color: #555; padding: 4px 7px; border: 1px solid #EDEDF1; border-radius: 4px; }
a.pag:link, a.pag:visited { color: #000; background: #fff; padding: 4px 7px; border: 1px solid #EDEDF1; border-radius: 4px; text-decoration: none; }
a.pag:hover { color: #fff; background: #36A7AD; border-color: #36A7AD; }
.puncte { color: #aaa; padding: 0 2px; }

/* ── Layout principal ────────────────────────────────── */
.admin-content { max-width: 1000px; margin: 0 auto; padding: 0px 10px 20px; }

/* ═══════════════════════════════════════════════════════
   FORMULARE — stilul unic pentru inputs, selects,
   textareas și butoane
   ═══════════════════════════════════════════════════════ */

/* Câmpuri text — toate clasele mapate la același stil */
input[type=text], input[type=password], input[type=email],
input[type=number], input[type=tel], input[type=date],
select, textarea,
.input1, .input, .input2 {
    font-family: Arial, sans-serif;
    font-size: 14px;
    color: #3A4A5C;
    padding: 9px 12px;
    border: 1px solid #C2CDD8;
    border-radius: 6px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,.06) inset;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
input[type=text]:focus, input[type=password]:focus, input[type=email]:focus,
input[type=number]:focus, input[type=tel]:focus, input[type=date]:focus,
select:focus, textarea:focus,
.input1:focus, .input:focus, .input2:focus {
    border-color: #36A7AD;
    box-shadow: 0 0 0 3px rgba(54,167,173,.15);
    outline: none;
}
input[type=file]     { padding: 6px 8px; }
input[type=checkbox],
input[type=radio]    { width: auto; height: auto; padding: 0; box-shadow: none; border-radius: 2px; }
textarea             { resize: vertical; min-height: 80px; line-height: 1.5; }
select               { cursor: pointer; }

/* Câmpuri obligatorii */
.bgr-galben, input.bgr-galben, select.bgr-galben, textarea.bgr-galben {
    background: #FFFDE7 !important; border-color: #FFB300 !important;
}
.bgr-galben:focus, input.bgr-galben:focus, select.bgr-galben:focus {
    border-color: #E07F3C !important;
}

/* Butoane — 3 variante + alias-uri */
.button, .buton3 {                          /* primar: submit ofertă / acțiune principală */
    font-family: Arial, sans-serif; font-weight: bold; cursor: pointer;
    border: none; border-radius: 6px; transition: background .15s;
    display: inline-block; text-align: center;
}
.button  { font-size: 15px; padding: 10px 36px; background: #36A7AD; color: #fff; }
.button:hover  { background: #2A8A8F; }
.buton3  { font-size: 13px; padding: 8px 18px;  background: #E07F3C; color: #fff; }
.buton3:hover  { background: #C66520; color: #fff; }

.buton2, .buton { /* secundar / acțiune neutrală-negativă */
    font-family: Arial, sans-serif; font-size: 13px; font-weight: normal;
    cursor: pointer; border: none; border-radius: 6px; transition: background .15s;
    display: inline-block; padding: 8px 16px;
}
.buton2 { background: #4A5064; color: #fff; }
.buton2:hover { background: #36A7AD; }
.buton  { background: #A84633; color: #fff; }
.buton:hover  { background: #8E3320; }

/* ── Liste ───────────────────────────────────────────── */
.list-view   { width: 100%; border-radius: 4px; overflow: hidden; margin-bottom: 8px; }
.list-header { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #4A5064; color: #fff; font-size: 12px; font-weight: bold; }
.list-row    { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #F0F0F0; font-size: 13px; color: #495256; }
.list-row:hover { background: #F9EEDE; }
.list-col         { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-col-sm      { flex: 0 0 60px; text-align: right; }
.list-col-md      { flex: 0 0 120px; }
.list-col-actions { flex: 0 0 auto; display: flex; gap: 6px; }

/* ── Rânduri oferte ─────────────────────────────────── */
.of-col-loc  { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; font-size: 10px; }
.of-col-cam  { flex: none; width: 30px; min-width: 30px; max-width: 30px; font-size: 13px; color: #495256; white-space: nowrap; text-align: right; overflow: hidden; }
.of-col-sup  { flex: 0 0 68px; font-size: 13px; color: #495256; white-space: nowrap; text-align: right; }
.of-col-d    { flex: 0 0 30px; font-size: 13px; color: #596880; text-align: center; }
.of-et       { flex: 0 0 70px; font-size: 13px; color: #596880; white-space: nowrap; overflow: hidden; text-align: left; }
.of-col-pret { flex: 0 0 115px; white-space: nowrap; text-align: right; padding-right: 8px; }
.of-col-ag   { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.of-col-cod  { flex: 0 0 65px; white-space: nowrap; font-weight: bold; color: #3A4A5C; }
.of-col-viz  { flex: 0 0 36px; white-space: nowrap; }
.of-col-rel  { flex: 0 0 52px; white-space: nowrap; }
.of-col-tip  { flex: 0 0 88px; font-size: 12px; color: #596880; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.of-vt-dim   { flex: 0 0 75px; font-size: 13px; color: #495256; white-space: nowrap; text-align: right; }

.of-row { position: relative; background: #EAF0F7; border-radius: 6px; margin: 0 0 5px; border: 1px solid #C8D8E8; cursor: pointer; transition: background .12s; }
.of-row:hover { background: #D0DFF0; }
.of-row.dezact { border-left: 4px solid #E25C61; background: #FFF0F0; }
.of-row.dezact:hover { background: #FFE2E2; }
.of-cb  { position: absolute; left:  -14px; top: 50%; transform: translateY(-50%); z-index: 2;
          background: #C8D8E8; padding: 3px; border-radius: 4px;
          display: inline-flex; align-items: center; justify-content: center; }
.of-del { position: absolute; right: -14px; top: 50%; transform: translateY(-50%); z-index: 2;
          background: #C8D8E8; padding: 5px; border-radius: 4px;
          display: inline-flex; align-items: center; justify-content: center; }

/* ── Formulare structurate ───────────────────────────── */
.form-section {
    background: #EAF0F7;
    border-radius: 10px;
    padding: 20px 22px;
    margin: 0 0 16px;
}
.form-section h3 {
    margin: 0 0 14px; color: #3A4A5C; font-size: 15px; font-weight: bold;
    border-bottom: 2px solid rgba(255,255,255,.6); padding-bottom: 8px;
}
.form-row   { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin-bottom: 8px; }
.form-row label { min-width: 110px; font-size: 14px; color: #596880; flex: 0 0 auto; }
.form-cols  { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.form-field { display: flex; align-items: center; gap: 4px; font-size: 13px; }
.form-field label { white-space: nowrap; min-width: 0; padding-right: 0; }
.form-label-top { display: block; font-size: 13px; color: #596880; padding-bottom: 7px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(175px,1fr)); background: #D5E2EF; border-radius: 6px; overflow: hidden; }
.check-item { display: flex; align-items: center; gap: 6px; padding: 7px 8px; font-size: 13px; border-bottom: 1px solid rgba(0,0,0,.07); cursor: pointer; }
/* Detalii clădire — alinierea labelurilor la lățimea celui mai lung */
.detalii-cladire .form-field label { min-width: 160px; }

/* ── Mesaje status ───────────────────────────────────── */
.msg-succes, .msg-eroare, .msg-alerta {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 16px; border-radius: 8px; margin: 8px 0; font-size: 13px;
}
.msg-succes::before { content: '✓'; font-size: 18px; font-weight: bold; flex-shrink: 0; }
.msg-eroare::before { content: '✕'; font-size: 18px; font-weight: bold; flex-shrink: 0; }
.msg-alerta::before { content: '⚠'; font-size: 18px; flex-shrink: 0; }

.msg-succes { background: #EDF7F0; border: 1px solid #A8D5B5; color: #1E5C35; }
.msg-succes::before { color: #2A8A4A; }
.msg-eroare { background: #FDECEA; border: 1px solid #F5C6CB; color: #8B1A1A; }
.msg-eroare::before { color: #CC3300; }
.msg-alerta { background: #FFF3CD; border: 1px solid #F0C040; color: #7A5800; }
.msg-alerta::before { color: #C07800; }

#div_succes, #succes            { background: #EDF7F0; border: 1px solid #A8D5B5; color: #1E5C35; padding: 10px 16px; border-radius: 8px; margin: 8px 0; font-size: 13px; display:flex; align-items:center; gap:10px; }
#div_succes::before, #succes::before { content: '✓'; font-size: 18px; font-weight: bold; flex-shrink: 0; color: #2A8A4A; }
#div_eroare, #eroare, #div_err { background: #FDECEA; border: 1px solid #F5C6CB; color: #8B1A1A; padding: 10px 16px; border-radius: 8px; margin: 8px 0; font-size: 13px; display:flex; align-items:center; gap:10px; }
#div_eroare::before, #eroare::before, #div_err::before { content: '✕'; font-size: 18px; font-weight: bold; flex-shrink: 0; color: #CC3300; }
#div_block { background: #FDECEA; border: 1px solid #F5C6CB; color: #8B1A1A; padding: 16px 18px; border-radius: 8px; margin: 8px 0; font-size: 13px; }
#div_update    { background: #FFF8E1; border-left: 3px solid #E07F3C; padding: 8px 12px; margin: 4px 0; font-size: 12px; color: #495256; }
#div_atentionare { background: #FFF3CD; border: 1px solid #FFEEBA; color: #856404; padding: 10px 14px; border-radius: 6px; margin: 8px 0; }

/* ── Linkuri admin ───────────────────────────────────── */
a.link0:link, a.link0:visited  { color: #495256; text-decoration: none; }
a.link0:hover                  { color: #E07F3C; }
a.link2:link, a.link2:visited  { color: #CC3300; text-decoration: underline; font-size: 11px; }
a.link3:link, a.link3:visited  { color: #36A7AD; text-decoration: none; font-size: 11px; }
a.link3:hover                  { color: #E07F3C; }
a.link4:link, a.link4:visited  { background: #E07F3C; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 3px; display: inline-block; }
a.link4:hover                  { background: #C66520; }

/* ── Clase moștenite (legacy) ────────────────────────── */
.alert   { vertical-align: top; padding: 0; }
.style0  { color: #fff; }
.style2  { color: #E07F3C; }
.style3  { color: #CC3300; font-weight: bold; }
.style4  { font-size: 11px; color: #888; }
.style6  { font-size: 11px; }
.style7  { font-size: 14px; color: #E07F3C; font-weight: bold; }
.style8  { font-size: 12px; }
.style9  { font-size: 11px; color: #495256; }
.style10 { font-size: 13px; font-weight: bold; color: #495256; }
.style11 { font-size: 18px; }
td.td-border0 { border-bottom: 1px solid #E8E8E8; padding: 3px 4px; font-size: 12px; color: #495256; }
td.td-border1 { border-bottom: 1px solid #E0D5D5; padding: 3px 4px; font-size: 12px; color: #495256; }
td.td-border2 { background: #F5F0F0; border-bottom: 1px solid #E0D5D5; padding: 3px 4px; }
.tab_of_lista { width: 100%; }
.cauta_bd { }
#cauti_l_content {
    position: absolute; top: 28px; left: 0; width: 380px;
    padding: 4px; background: #fff; border: 1px solid #FF3300;
    z-index: 50; border-radius: 0 0 4px 4px;
}
#cauti_l_content a { display: block; padding: 5px 8px; color: #000; border-bottom: 1px solid #EAF3FB; font-size: 13px; }
#cauti_l_content a:hover { color: #36A7AD; background: #F4F9FD; }

/* ── Responsive ──────────────────────────────────────── */
@media only screen and (max-width: 600px) {
    .of-et { flex: 0 1 0; min-width: 0; }
    a.link-header { padding: 20px 12px !important; }
}

/* Meniu desktop mereu vizibil — fără adaptări mobile pe header */
#admin-mob-nav { display: none !important; }
.admin-ham     { display: none !important; }
#admin-logo    { margin-left: 10px; }
a.link-header  { padding: 20px 30px; }

@media only screen and (max-width: 959px) {
    .admin-content { padding: 10px; }
    #subheader { width: 90%; margin: 0 5%; }
    .form-section { padding: 14px 14px; }
    .form-row label { min-width: 100px; }
    .form-cols .form-field { flex: 0 0 100%; }
    /* Fără min-width pe labeluri în form-cols și form-row > form-field — gap natural ca pe desktop */
    .form-cols .form-field label,
    .form-row .form-field label { min-width: 0; }
    /* Detalii clădire — păstrează alinierea labelurilor pe mobil */
    .detalii-cladire .form-field label { min-width: 160px; }
    .of-col-sup  { flex: 0 0 50px; }
    .of-vt-dim   { display: none; }
    .of-col-d    { flex: 0 0 24px; }
    .of-col-pret { flex: 0 0 90px; }
    .of-col-ag   { flex: 1; }
    .of-col-viz  { flex: 0 0 38px; }
    /* Agent: ascunde label, select+cod intern pe o linie */
    .nomobile { display: none; }
    .agent-row { flex-wrap: nowrap; }
    .agent-row select { flex: 1; min-width: 0 !important; width: auto !important; }
    .agent-row .cod-intern { width: 75px !important; }
    /* Adresă / Repere: label deasupra, input 100% */
    .loc-addr-row { flex-direction: column; align-items: stretch; gap: 4px; }
    .loc-addr-row label { min-width: 0; }
    /* Checkboxuri mai mari și padding mai generos pe mobil */
    .check-item { padding: 9px 10px; }
    .check-item input[type="checkbox"] {
        width: 18px; height: 18px; flex-shrink: 0;
        -webkit-appearance: checkbox; appearance: checkbox;
    }
}
