/* BersolekMart role/layout foundation. Scoped structural fixes; no business logic. */

/* -----------------------------
   Frontend authentication
   ----------------------------- */
.storefront-auth-wrap{
  padding:44px 0 60px;
  min-height:640px;
  background:linear-gradient(180deg,#f4faf7 0%,#f8fbf9 100%);
}
.storefront-auth-container{display:flex;justify-content:center;align-items:flex-start}
.storefront-auth-card{
  width:min(520px,100%);
  background:#fff;
  border:1px solid var(--line);
  border-radius:22px;
  padding:28px;
  box-shadow:0 18px 50px rgba(16,35,59,.08);
}
.storefront-auth-heading h1{
  margin:7px 0 8px;
  font-size:30px;
  line-height:1.15;
  letter-spacing:-.035em;
}
.storefront-auth-heading p{margin:0;color:#6e7e8d;font-size:12px;line-height:1.65}
.storefront-auth-form{display:grid;gap:15px;margin-top:20px}
.storefront-auth-form .auth-field{display:grid;gap:7px}
.storefront-auth-form label{font-size:12px;font-weight:800;color:#24394e}
.storefront-auth-form input:not([type="checkbox"]):not([type="radio"]){
  width:100%;
  min-height:46px;
  border:1px solid #d7e3dc;
  border-radius:12px;
  background:#fff;
  color:#172b42;
  padding:0 13px;
  outline:0;
  font-size:14px;
  font-style:normal;
  font-weight:500;
  line-height:1.2;
}
.storefront-auth-form input::placeholder,
.backend-auth-form input::placeholder{font-style:normal;transform:none;opacity:.72}
.storefront-auth-form input:focus{border-color:#8fcfb0;box-shadow:0 0 0 3px #e8f7ef}
.storefront-auth-form .image-captcha-box{margin:0}
.storefront-auth-submit{min-height:46px;font-size:14px}
.captcha-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}
.captcha-head b,.captcha-head small{display:block}
.captcha-head b{font-size:12px;color:#24394e}
.captcha-head small{margin-top:3px;color:#7a8997;font-size:10px}
.captcha-context{font-size:9px;color:#7a8997;text-align:right;line-height:1.4;max-width:190px}
.storefront-google-login{width:100%;min-height:44px;justify-content:center;border:1px solid #d7e3dc;border-radius:11px;background:#fff;color:#22374c;font-weight:800}
.storefront-auth-register{display:flex;justify-content:center;gap:5px;margin-top:16px;font-size:12px;color:#6d7c8a}
.storefront-auth-register a{color:var(--green);font-weight:800}
.storefront-auth-hint{display:grid;gap:4px;margin-top:16px;padding:12px 13px;border:1px solid #e0e9e4;border-radius:12px;background:#f8fbf9;color:#5d7080}
.storefront-auth-hint b{font-size:10px;color:#294259;text-transform:uppercase;letter-spacing:.08em}
.storefront-auth-hint span{font-size:10px;line-height:1.5}
.storefront-staff-link{display:flex;justify-content:center;gap:7px;align-items:center;margin-top:16px;padding-top:13px;border-top:1px solid #edf1ee;font-size:10px;color:#8a97a3}
.storefront-staff-link a{color:#506678;font-weight:800}
.storefront-staff-link a:hover{color:var(--green)}

/* -----------------------------
   Backend authentication
   ----------------------------- */
.backend-auth-page{min-height:100vh;background:linear-gradient(135deg,#eef5f1 0%,#f7f9f8 55%,#edf3ef 100%);color:#13253a}
.backend-auth-shell{min-height:100vh;display:grid;place-items:center;padding:32px 16px}
.backend-auth-card{
  width:min(490px,100%);
  padding:30px;
  background:#fff;
  border:1px solid #dce6e0;
  border-radius:20px;
  box-shadow:0 20px 55px rgba(13,31,47,.10);
}
.backend-auth-brand{display:flex;align-items:center;gap:10px;color:#13253a;margin-bottom:24px}
.backend-auth-brand .mark{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:#0f9f66;color:#fff;font-weight:900}
.backend-auth-brand strong{display:block;font-size:16px;line-height:1.1}
.backend-auth-brand small{display:block;margin-top:3px;color:#8997a4;font-size:8px;font-weight:800;letter-spacing:.13em}
.backend-auth-title h1{margin:6px 0 7px;font-size:28px;line-height:1.15;letter-spacing:-.03em}
.backend-auth-title p{margin:0;color:#6b7c8b;font-size:12px;line-height:1.6}
.backend-auth-form{display:grid;gap:15px;margin-top:21px}
.backend-auth-field{display:grid;gap:7px}
.backend-auth-field label{font-size:12px;font-weight:800;color:#2a3e52}
.backend-auth-field input:not([type="checkbox"]):not([type="radio"]){width:100%;min-height:46px;border:1px solid #d7e2dc;border-radius:11px;background:#fff;padding:0 13px;color:#152b40;outline:0;font-size:14px;font-style:normal;line-height:1.2}
.backend-auth-field input:focus{border-color:#8fcfb0;box-shadow:0 0 0 3px #e8f7ef}
.backend-auth-form .image-captcha-box{margin:0}
.backend-auth-submit{min-height:46px;border:1px solid #0f9f66;background:#0f9f66;color:#fff;border-radius:11px;font-weight:800;font-size:14px;box-shadow:0 7px 17px rgba(15,159,102,.16)}
.backend-auth-submit:hover{background:#0c8d5a}
.backend-auth-footer{display:flex;justify-content:space-between;gap:12px;margin-top:17px;padding-top:15px;border-top:1px solid #edf1ee;font-size:10px}
.backend-auth-footer a{color:#5e7081;font-weight:800}
.backend-auth-footer a:hover{color:#0f9f66}

/* -----------------------------
   Customer/member forms
   ----------------------------- */
.member-shell .panelcard{background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 7px 24px rgba(16,35,59,.035)}
.member-shell .admin-form,
.member-shell .stack,
.member-shell .formgrid{display:grid;gap:14px}
.member-shell .admin-form label,
.member-shell .stack label,
.member-shell .formgrid label{display:grid;gap:7px;font-size:12px;font-weight:800;color:#34495d}
.member-shell .admin-form input:not([type="checkbox"]):not([type="radio"]),
.member-shell .admin-form select,
.member-shell .admin-form textarea,
.member-shell .stack input:not([type="checkbox"]):not([type="radio"]),
.member-shell .stack select,
.member-shell .stack textarea,
.member-shell .formgrid input:not([type="checkbox"]):not([type="radio"]),
.member-shell .formgrid select,
.member-shell .formgrid textarea{
  width:100%;
  min-height:43px;
  border:1px solid #d7e3dc;
  border-radius:10px;
  background:#fff;
  color:#20364b;
  padding:9px 11px;
  outline:0;
  font-size:13px;
  line-height:1.3;
}
.member-shell .admin-form textarea,
.member-shell .stack textarea,
.member-shell .formgrid textarea{min-height:105px;resize:vertical}
.member-shell .admin-form select,
.member-shell .stack select,
.member-shell .formgrid select{appearance:auto;padding-right:34px}
.member-shell .admin-form input:focus,
.member-shell .admin-form select:focus,
.member-shell .admin-form textarea:focus,
.member-shell .stack input:focus,
.member-shell .stack select:focus,
.member-shell .stack textarea:focus,
.member-shell .formgrid input:focus,
.member-shell .formgrid select:focus,
.member-shell .formgrid textarea:focus{border-color:#8fcfb0;box-shadow:0 0 0 3px #e8f7ef}
.member-shell .form-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.member-shell .check{display:flex!important;align-items:center;gap:8px!important;grid-template-columns:none!important;font-weight:700!important}
.member-shell .check input{width:16px!important;min-height:16px!important;padding:0!important;accent-color:var(--green)}
.member-shell .profile-avatar-editor{display:grid;grid-template-columns:140px 1fr;gap:16px;align-items:center}
.member-shell .profile-avatar-editor input[type="file"]{padding:8px;background:#f9fbfa}
.member-shell .profile-avatar-editor small{display:block;margin:5px 0 9px;color:#7c8b98;font-size:10px;line-height:1.5}
.member-shell .member-location-map{height:190px}
.member-shell .location-box-head .btn{flex:0 0 auto}
.member-shell .member-content .btn{font-size:12px}

/* -----------------------------
   Merchant/operator panel polish
   ----------------------------- */
.panel-shell .panelcard table{width:100%;border-collapse:collapse}
.panel-shell .panelcard table th{padding:10px 11px;text-align:left;background:#f8fbf9;color:#687989;border-bottom:1px solid var(--backend-line);font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.panel-shell .panelcard table td{padding:11px;border-bottom:1px solid #edf1ee;color:#253b50;vertical-align:middle}
.panel-shell .panelcard table tbody tr:last-child td{border-bottom:0}
.panel-shell .panelcard .inlineform{display:flex;align-items:center;gap:7px;flex-wrap:nowrap;margin:0}
.panel-shell .panelcard .inlineform select{height:36px;min-width:130px;border:1px solid var(--backend-line-strong);border-radius:9px;background:#fff;padding:0 9px;color:#31485d;font-size:12px}
.panel-shell .panelcard .line small{color:#7f8d9a}
.panel-shell .panel-label{letter-spacing:.08em}
.panel-shell .panel-nav-separate{margin-top:10px}
.panel-shell .panel-nav-separate .panel-link{display:flex}

@media (max-width:760px){
  .storefront-auth-wrap{padding:18px 0 36px;min-height:0}
  .storefront-auth-card{padding:21px;border-radius:18px}
  .storefront-auth-heading h1{font-size:25px}
  .captcha-head{display:grid;gap:5px}
  .captcha-context{text-align:left;max-width:none}
  .storefront-auth-form .captcha-row,.backend-auth-form .captcha-row{grid-template-columns:minmax(0,1fr) 70px}
  .storefront-auth-form .captcha-row img,.backend-auth-form .captcha-row img{grid-column:1/2}
  .storefront-auth-form .captcha-row .btn,.backend-auth-form .captcha-row .btn{grid-column:2/3}
  .storefront-auth-form .captcha-row input,.backend-auth-form .captcha-row input{grid-column:1/-1}
  .storefront-staff-link,.backend-auth-footer{flex-wrap:wrap;justify-content:center}
  .backend-auth-shell{padding:16px}
  .backend-auth-card{padding:22px}
  .member-shell .form-grid-2{grid-template-columns:1fr}
  .member-shell .profile-avatar-editor{grid-template-columns:1fr}
  .panel-shell .panelcard{padding:15px}
  .panel-shell .panelcard .table-scroll,.panel-shell .panelcard .data-table-shell{overflow:auto}
  .panel-shell .panelcard table{min-width:680px}
}
.customer-side-title{margin:6px 0 10px;font-size:18px;letter-spacing:-.02em}
.customer-address-card,.customer-address-empty{padding:12px;border:1px solid #e0e9e4;border-radius:12px;background:#f9fcfa;margin-bottom:10px}
.customer-address-card>b,.customer-address-card>strong,.customer-address-card>small{display:block}
.customer-address-card>b{font-size:11px;color:var(--green);margin-bottom:4px}
.customer-address-card>strong{font-size:12px;color:#263d52}
.customer-address-card>small{font-size:10px;color:#748391;margin-top:2px}
.customer-address-card p{margin:8px 0 0;color:#647585;font-size:10px;line-height:1.55}
.customer-address-empty b,.customer-address-empty span{display:block}
.customer-address-empty b{font-size:11px;color:#30465a}
.customer-address-empty span{margin-top:3px;font-size:10px;color:#7a8996;line-height:1.5}

/* -----------------------------
   Customer form system — structural, scoped
   ----------------------------- */
.member-shell .customer-form{display:grid;gap:14px;margin:0}
.member-shell .customer-field{display:grid;gap:7px;min-width:0}
.member-shell .customer-field label{display:block;margin:0;font-size:12px;line-height:1.25;font-weight:800;color:#30465a}
.member-shell .customer-field input:not([type="checkbox"]):not([type="radio"]),
.member-shell .customer-field select,
.member-shell .customer-field textarea{
  display:block;
  width:100%;
  min-width:0;
  min-height:44px;
  margin:0;
  padding:10px 12px;
  border:1px solid #d4e0d9;
  border-radius:11px;
  background:#fff;
  color:#20364b;
  font-family:inherit;
  font-size:13px;
  font-style:normal;
  font-weight:500;
  line-height:1.35;
  outline:none;
  box-shadow:none;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}
.member-shell .customer-field textarea{min-height:112px;resize:vertical}
.member-shell .customer-field input:focus,
.member-shell .customer-field select:focus,
.member-shell .customer-field textarea:focus{border-color:#8fcfb0;box-shadow:0 0 0 3px #e8f7ef}
.member-shell .customer-field input::placeholder,
.member-shell .customer-field textarea::placeholder{font-style:normal;opacity:.64;color:#71808e}
.member-shell .customer-field select{
  appearance:none;
  -webkit-appearance:none;
  background-color:#fff;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23617483' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;
  background-position:right 12px center;
  background-size:12px 12px;
  padding-right:38px;
}
.member-shell .customer-field-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;min-width:0}
.member-shell .customer-check{display:flex!important;align-items:center;gap:9px!important;margin:0;padding:2px 0;font-size:12px!important;font-weight:700!important;color:#3e5264!important}
.member-shell .customer-check input{appearance:auto!important;width:16px!important;height:16px!important;min-width:16px!important;min-height:16px!important;margin:0!important;padding:0!important;accent-color:var(--green)}
.member-shell .customer-check span{display:block}
.member-shell .customer-form-submit{width:100%;min-height:44px;margin-top:3px}
.member-shell .customer-address-form{min-width:0}
.member-shell .customer-address-layout .panelcard{min-width:0}
.member-shell .customer-location-card{margin-top:2px}
.member-shell .customer-profile-card,.member-shell .customer-security-card{max-width:900px}
.member-shell .customer-profile-editor{display:grid;grid-template-columns:150px minmax(0,1fr);gap:18px;align-items:center;padding:14px;border:1px solid #e1eae5;border-radius:14px;background:#f9fcfa}
.member-shell .customer-profile-avatar{width:150px;height:150px;border-radius:14px;overflow:hidden;background:#dff4e7;display:grid;place-items:center;color:var(--green);font-size:36px;font-weight:900}
.member-shell .customer-profile-avatar img{width:100%;height:100%;object-fit:cover}
.member-shell .customer-upload-copy b{display:block;font-size:13px;color:#2d4458}
.member-shell .customer-upload-copy small{display:block;margin:5px 0 10px;font-size:10px;line-height:1.55;color:#7b8997}
.member-shell .customer-upload-copy input[type=file]{width:100%;padding:9px;border:1px solid #d6e1db;border-radius:10px;background:#fff;font-size:11px}
.member-shell .customer-security-copy{display:grid;gap:5px;margin-bottom:16px;padding:13px 14px;border:1px solid #e1ebe5;border-radius:12px;background:#f8fbf9}
.member-shell .customer-security-copy b{font-size:13px;color:#294158}
.member-shell .customer-security-copy span{font-size:11px;line-height:1.5;color:#778694}
.member-shell .customer-split-panels{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,.75fr);gap:14px;align-items:start}
.member-shell .customer-list-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:13px 0;border-bottom:1px solid #edf1ee}
.member-shell .customer-list-row:last-child{border-bottom:0}
.member-shell .customer-list-row b,.member-shell .customer-list-row small{display:block}
.member-shell .customer-list-row b{font-size:12px;color:#294158}
.member-shell .customer-list-row small{margin-top:3px;color:#7a8996;font-size:10px}
.member-shell .customer-list-row>strong{font-size:12px;color:#34495e;white-space:nowrap}
.member-shell .customer-empty-state{margin-top:4px}

/* Backend auth reset — keep legacy auth.css from leaking into dedicated portal */
.backend-auth-page,.backend-auth-page *{box-sizing:border-box}
.backend-auth-page button,.backend-auth-page input,.backend-auth-page select,.backend-auth-page textarea{font-family:inherit}
.backend-auth-page .backend-auth-card input:not([type="checkbox"]):not([type="radio"]),
.backend-auth-page .backend-auth-card select{
  appearance:none;
  -webkit-appearance:none;
}
.backend-auth-page .backend-auth-card input::placeholder{font-style:normal!important;transform:none!important;opacity:.68}
.backend-auth-page .backend-auth-card .image-captcha-box{border:1px dashed #b9d8c7;background:#fbfefc;border-radius:13px;padding:12px}
.backend-auth-page .backend-auth-card .captcha-row{margin-top:8px}
.backend-auth-page .backend-auth-card .captcha-row input{font-style:normal!important;letter-spacing:.16em;text-transform:uppercase}
.backend-auth-page .backend-auth-card .backend-auth-submit{width:100%}
.backend-auth-role{display:inline-flex;align-items:center;min-height:24px;padding:4px 8px;border-radius:999px;background:#e9f8ef;color:#0e7b50;font-size:9px;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.backend-auth-role.admin{background:#eaf1ff;color:#416fb2}

@media (max-width:760px){
  .member-shell .customer-field-grid,.member-shell .customer-split-panels{grid-template-columns:1fr}
  .member-shell .customer-profile-editor{grid-template-columns:1fr}
  .member-shell .customer-profile-avatar{margin-inline:auto}
  .member-shell .customer-list-row{align-items:flex-start;flex-direction:column}
}
@media (max-width:760px){.driver-bottom{grid-template-columns:repeat(5,minmax(0,1fr))!important}}

/* V12.6 — mobile catalog density fix
 * Scoped to existing storefront/member product grids only.
 * No changes to product/card business markup or desktop layout.
 */
@media (max-width:760px){
  .storefront-shell .product-grid.six,
  .storefront-shell .catalog-grid,
  .member-shell .product-grid.six,
  .member-shell .catalog-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:10px !important;
    align-items:start;
  }
  .storefront-shell .product-card,
  .member-shell .product-card{
    width:100% !important;
    min-width:0 !important;
    max-width:100%;
  }
  .storefront-shell .product-media,
  .member-shell .product-media{
    width:100%;
    height:auto !important;
    min-height:0 !important;
    aspect-ratio:1/1 !important;
  }
}
