html, body { height: auto; min-height: 100%; margin: 0; }
body {
    font-family: Arial, sans-serif;
    background-image: url('wallpaper.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    min-height: 100vh;
    width: 100%;
    padding-bottom: 56px;
    box-sizing: border-box;
}
#wrapper {
    width: 100%;
}
#wrapper > .container-fluid,
body > .container-fluid {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.container-fluid > .row {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}

footer {
    background-color: rgba(255,255,255,0.92);
    width: 100%;
    padding: 12px 10px;
    text-align: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    border-top: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}
footer p { margin: 0; }
.password {
    width: 80%;
    height: 34px;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    color: #555;
    background-color: #fff;
    background-image: none;
    border: 1px solid #ccc;
    border-radius: 4px;
}
h1 {
  text-align: center;
  font-family: Tahoma, Arial, sans-serif;
  color: #06D85F;
  margin: 80px 0;
}

.box {
  width: 40%;
  margin: 0 auto;
  background: rgba(255,255,255,0.2);
  padding: 35px;
  border: 2px solid #fff;
  border-radius: 20px/50px;
  background-clip: padding-box;
  text-align: center;
}

.button {
  font-size: 1em;
  padding: 10px;
  color: #fff;
  border: 2px solid #06D85F;
  border-radius: 20px/50px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.3s ease-out;
}
.button:hover {
  background: #06D85F;
}

.overlay {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  transition: opacity 500ms;
  visibility: hidden;
  opacity: 0;
}
.overlay:target {
  visibility: visible;
  opacity: 1;
}

.popup {
  margin: 70px auto;
  padding: 20px;
  background: #fff;
  border-radius: 5px;
  width: 30%;
  position: relative;
  transition: all 5s ease-in-out;
}

.popup h2 {
  margin-top: 0;
  color: #333;
  font-family: Tahoma, Arial, sans-serif;
}
.popup .close {
  position: absolute;
  top: 20px;
  right: 30px;
  transition: all 200ms;
  font-size: 30px;
  font-weight: bold;
  text-decoration: none;
  color: #333;
}
.popup .close:hover {
  color: #06D85F;
}
.popup .content {
  max-height: 30%;
  overflow: auto;
}
.aui {
            max-width: 100%;
            width: auto\9;
            height: auto;
            vertical-align: middle;
            border: 0;
            -ms-interpolation-mode: bicubic;
        }
    .system-grid-container {
        display: grid;
        grid-template-columns: auto auto auto auto;
        padding: 10px;
        grid-gap: 20px 5px;
        justify-content: center;
    }
    .system-hub-container {
        background: #022903;
        width: auto;
        height: 100%;
        margin: 0 0 0 5%;
    }
    .system-hub-container-text {
        padding: 5% 5% 5% 5%;
    }
    .system-hub-content p {
        color: #ffffff;
        font-size: 15px;
        text-align: justify;
    }
    .system-hub-content h1 {
        color: #18425E;
        font-size: 19px;
        line-height: 1;
    }
    .system-hub-subtitle {
        color: #ffdb2c;
        font-size: 16px;
    }
    .system-hub-subtitle span {
        color: #ffdb2c;
    }
    .system-grid-title-container h1 {
        color: #26749B;
        font-size: 45px;
        line-height: 1.2;
    }
    .system-grid-title-container span {
        font-family: 'Poppins-Regular';
    }
    .system-grid-title-container {
        text-align: center;
        padding: 0 0 0 0;
    }
@media screen and (max-width: 700px){

  .box{
    width: 70%;
  }
  .popup{
    width: 70%;
  }
  .system-grid-title-container h1 {
            font-size: 25px;
        }
        .system-hub-container {
            margin: 0;
        }
        .system-grid-container {
            display: grid;
            grid-template-columns: auto ;
            display: grid;
            padding: 2% 1% 5% 1%;
            grid-gap: 20px 5px;
            justify-content: center;
        }
}

.container-enlarge {
    display: inline-block;
    position: relative;
    margin: 15px;
}
.container-enlarge > img {
    height: auto;
    max-width: 100%;
    width: 100%;
    border-radius: 5px;
}
.container-enlarge span {
    position: absolute;
    top: -9999em;
    left: -9999em;
}
.container-enlarge:hover span {
    top: -320px;
    left: -675px;
    width: 300px;
}

/* ============================================================
 * Utilidades para reemplazar estilos inline (Fase 6)
 * ============================================================ */
.is-hidden { display: none; }
.is-clickable { cursor: pointer; }
.v-mid { vertical-align: middle; }
.v-bottom { vertical-align: bottom; }
.cell-bordered { border: 1px solid black; }
.img-fluid { width: 100%; height: auto; }
.fs-8 { font-size: 8px; }
.fs-20 { font-size: 20px; }
.text-white-x { color: #FFFFFF; }
.text-blue-1 { color: #052678; }
.text-green-1 { color: #015712; }
.text-cyan-1 { color: #1b809e; }
.text-red-1 { color: #D00303; }

.bg-w50 { background-color: rgba(255,255,255,0.5); }
.bg-w80 { background-color: rgba(255,255,255,0.8); }
.bg-w90 { background-color: rgba(255,255,255,0.9); }
.bg-w90-pad { background-color: rgba(255,255,255,0.9); padding: 10px 20px; }
.bg-orange50-pad { background-color: rgba(255,190,108,0.5); padding: 10px 20px; }
.bg-darkgreen { background-color: rgba(0,51,0,1); padding: 10px 20px; }

.section-title {
    font-style: italic;
    font-size: 20px;
    text-align: center;
    margin-top: 5px;
}

.banner-darkgreen,
.banner-darkgreen--lg,
.banner-darkgreen--xl {
    border: 1px solid #003300;
    border-left-width: 5px;
    border-radius: 3px;
    background: #003300;
    color: #FFFFFF;
}
.banner-darkgreen    { padding: 5px 10px;  margin: 10px 0; }
.banner-darkgreen--lg{ padding: 5px 10px;  margin: 20px 0; }
.banner-darkgreen--xl{ padding: 10px 20px; margin: 20px 0; }

.panel-card {
    vertical-align: middle;
    background-color: white;
    border: 4px solid darkred;
    border-radius: 22px;
    padding: 9px;
    margin: 5px;
}
.panel-card--green       { border-color: green; }
.panel-card--blue        { border-color: darkblue; }
.panel-card--orange      { border-color: orange; }
.panel-card--red         { border-color: red; }
.panel-card--purple      { border-color: purple; }
.panel-card--solid-blue  { border-color: blue; }
.panel-card--soft-orange { background-color: #FFFDFB; border-color: orange; }

.summary-box        { border-radius: 25px; padding: 4px 10px; }
.summary-box--yellow{ background-color: #F7FE2E; }
.summary-box--pink  { background-color: #F6CECE; }
.summary-box--green { background-color: #BCF5A9; vertical-align: middle; }

.btn-fullwide { vertical-align: middle; width: 100%; }
.btn-text-lg  { font-size: 20px; border-radius: 15px; }
.chart-frame  { position: relative; height: 360px; width: 80%; }
.input-large  { font-size: 20px; }

/* ============================================================
 * Tarjetas de Terreno (Administrar tus terrenos)
 * ============================================================ */
.terrain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    padding: 10px 4px 24px;
}
.terrain-card {
    background: #ffffff;
    border: 1px solid #d8e6cf;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
}
.terrain-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.14);
    border-color: #1b809e;
}
.terrain-card__header {
    position: relative;
    height: 110px;
    background: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    color: #fff;
}
.terrain-card__header img.terrain-card__hero {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.45;
}
.terrain-card__id {
    position: relative;
    z-index: 1;
    background: rgba(0,0,0,0.45);
    border-radius: 999px;
    padding: 6px 14px;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0.5px;
}
.terrain-card__badge {
    position: relative;
    z-index: 1;
    background: #ffffff;
    color: #1f6f3a;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.terrain-card__badge--rented { color: #b8860b; }
.terrain-card__progress { padding: 14px 16px 6px; }
.terrain-card__progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #555;
    margin-bottom: 6px;
}
.terrain-card__progress-info b { color: #1b809e; }
.terrain-card__bar {
    background: #ececec;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.terrain-card__bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width .4s ease;
}
.terrain-card__bar-fill--over {
    background: linear-gradient(90deg, #e53935, #ff7043);
}
.terrain-card__warn {
    margin-top: 6px;
    font-size: 12px;
    color: #c62828;
    font-weight: 600;
}
.terrain-card__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
    padding: 12px 16px 18px;
    border-top: 1px dashed #e6e6e6;
    margin-top: 8px;
}
.terrain-card__detail {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.terrain-card__detail img {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
}
.terrain-card__detail-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.terrain-card__detail-value {
    font-size: 14px;
    color: #1b809e;
    font-weight: 600;
    word-break: break-word;
    line-height: 1.2;
}
.terrain-card__detail--full { grid-column: 1 / -1; }

@media (max-width: 480px) {
    .terrain-grid { grid-template-columns: 1fr; }
    .terrain-card__details { grid-template-columns: 1fr; }
}

/* ============================================================
 * Panel "DATOS GENERALES" del detalle de terreno
 * ============================================================ */
.terrain-info-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #d8e6cf;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0 20px 20px;
    margin: 10px auto 18px;
    overflow: hidden;
    text-align: left;
}
.terrain-info-card__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    color: #ffffff;
    padding: 14px 22px;
    margin: 0 -20px 16px;
}
.terrain-info-card__id-wrap {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.terrain-info-card__id-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.92;
    font-weight: 600;
}
.terrain-info-card__id-value {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: 0.5px;
}
.terrain-info-card__badge {
    background: #ffffff;
    color: #1f6f3a;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.terrain-info-card__badge--rented { color: #b8860b; }

.terrain-info-card__progress {
    padding: 0 4px 14px;
    border-bottom: 1px dashed #e6e6e6;
    margin-bottom: 14px;
}
.terrain-info-card__progress-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 6px 12px;
    font-size: 14px;
    color: #555;
    margin-bottom: 8px;
}
.terrain-info-card__progress-info b { color: #1b809e; }
.terrain-info-card__bar {
    display: block;
    width: 100%;
    background: #ececec;
    border-radius: 999px;
    height: 14px;
    overflow: hidden;
    text-align: left;
}
.terrain-info-card__bar-fill {
    display: block;
    height: 100%;
    margin: 0;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    border-radius: 999px;
    transition: width .4s ease;
}
.terrain-info-card__bar-fill--over {
    background: linear-gradient(90deg, #e53935, #ff7043);
}
.terrain-info-card__warn {
    margin-top: 8px;
    font-size: 13px;
    color: #c62828;
    font-weight: 600;
    text-align: left;
}

.terrain-info-card__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}
.terrain-info-card__grid .terrain-stat {
    display: grid;
    grid-template-columns: 38px 1fr;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
    row-gap: 0;
    text-align: left;
    padding: 10px 14px;
}
.terrain-info-card__grid .terrain-stat:hover { transform: none; }
.terrain-info-card__grid .terrain-stat img {
    grid-row: 1 / span 2;
    grid-column: 1;
    width: 38px;
    height: 38px;
    margin: 0;
}
.terrain-info-card__grid .terrain-stat__label {
    grid-column: 2;
    grid-row: 1;
    margin-bottom: 0;
    font-size: 11px;
}
.terrain-info-card__grid .terrain-stat__value {
    grid-column: 2;
    grid-row: 2;
    font-size: 15px;
}
.terrain-stat {
    text-align: center;
    padding: 14px 10px;
    background: #fafdf7;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.terrain-stat:hover {
    background: #f1f8e9;
    border-color: #c8e6c9;
    transform: translateY(-2px);
}
.terrain-stat img {
    width: 48px;
    height: 48px;
    margin-bottom: 8px;
}
.terrain-stat__label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: #888;
    margin-bottom: 4px;
}
.terrain-stat__value {
    font-size: 16px;
    font-weight: 700;
    color: #1b809e;
    word-break: break-word;
    line-height: 1.25;
}
.terrain-stat__value--alert { color: #c62828; }

@media (max-width: 480px) {
    .terrain-info-card__grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
 * Cabecera de usuario logueado y barra de acciones de admin
 * ============================================================ */
.user-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 14px;
}
.user-banner__welcome { flex: 1 1 auto; min-width: 0; }
.user-banner__welcome h4 {
    margin: 0;
    color: #ffffff;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-banner__welcome label { margin: 0; color: #ffffff; font-weight: 700; }
.user-banner__actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.user-banner__actions .btn { font-weight: 600; }
.user-banner__actions .btn i { margin-right: 4px; }

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px !important;
}
.admin-toolbar__title {
    flex: 1 1 auto;
    text-align: center;
    min-width: 0;
}
.admin-toolbar__title h4 { margin: 0; color: #ffffff; }
.admin-toolbar__actions { flex: 0 0 auto; }
.btn.admin-cta,
button.admin-cta,
.admin-cta {
    background: linear-gradient(135deg, #ff8a00 0%, #ffb74d 100%);
    background-image: linear-gradient(135deg, #ff8a00 0%, #ffb74d 100%);
    background-color: #ff8a00;
    border: none;
    color: #ffffff;
    font-weight: 700;
    padding: 10px 22px;
    font-size: 15px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(255, 138, 0, 0.45);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.btn.admin-cta:hover, .btn.admin-cta:focus, .btn.admin-cta:active,
button.admin-cta:hover, button.admin-cta:focus, button.admin-cta:active,
.admin-cta:hover, .admin-cta:focus, .admin-cta:active {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    background-image: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    background-color: #f57c00;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 138, 0, 0.6);
    outline: none;
}
.admin-cta i { margin-right: 6px; font-size: 18px; vertical-align: middle; }

@media (max-width: 600px) {
    .user-banner { justify-content: center; text-align: center; }
    .admin-toolbar { justify-content: center; }
    .admin-toolbar__title { text-align: center; }
}

/* ============================================================
 * Tarjetas de Cultivo/Crianza (Mis cultivos/crianzas)
 * ============================================================ */
.cultivo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    padding: 8px 4px 18px;
}
.cultivo-card {
    background: #ffffff;
    border: 1px solid #d8e6cf;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    display: flex;
    flex-direction: column;
}
.cultivo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.14);
    border-color: #4caf50;
}
.cultivo-card__header {
    position: relative;
    height: 150px;
    overflow: hidden;
    background: #f1f8e9;
}
.cultivo-card__header img.cultivo-card__hero {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cultivo-card__id {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 999px;
    padding: 5px 12px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.4px;
}
.cultivo-card__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffffff;
    color: #1f6f3a;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    max-width: 60%;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cultivo-card__body { padding: 14px 16px 16px; }
.cultivo-card__name {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1b809e;
    line-height: 1.2;
}
.cultivo-card__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 12px;
}
.cultivo-card__detail {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.cultivo-card__detail img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.cultivo-card__detail-label {
    font-size: 10.5px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.cultivo-card__detail-value {
    font-size: 13.5px;
    color: #1b809e;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
}

@media (max-width: 480px) {
    .cultivo-grid { grid-template-columns: 1fr; }
    .cultivo-card__details { grid-template-columns: 1fr; }
}

/* ============================================================
 * Seccion Mis Cultivos / Crianzas dentro del detalle de terreno
 * ============================================================ */
.cultivos-section { margin-top: 18px; }
.cultivos-section__header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.08), rgba(31, 111, 58, 0.04));
    border: 1px solid #d8e6cf;
    border-left: 4px solid #1f6f3a;
    border-radius: 12px;
    margin-bottom: 16px;
}
.cultivos-section__heading { flex: 1 1 auto; min-width: 0; }
.cultivos-section__title {
    margin: 0;
    color: #1f6f3a;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-align: left;
}
.cultivos-section__title i { margin-right: 6px; }
.cultivos-section__subtitle {
    margin: 4px 0 0;
    font-size: 13px;
    color: #666;
}
.cultivos-section__subtitle b { color: #1b809e; }

.cultivos-empty {
    text-align: center;
    padding: 28px 18px;
    background: #fafdf7;
    border: 1px dashed #c8e6c9;
    border-radius: 14px;
    color: #555;
}
.cultivos-empty img {
    width: 110px;
    height: 110px;
    opacity: 0.85;
    margin-bottom: 10px;
}
.cultivos-empty p { margin: 4px 0; font-size: 15px; }
.cultivos-empty__hint { color: #1f6f3a; }

@media (max-width: 600px) {
    .cultivos-section__header { justify-content: center; text-align: center; }
    .cultivos-section__title { text-align: center; flex: 1 1 100%; }
}

/* === Metro cards: grilla consistente para paneles de info === */
.metro-section {
    background: #fff;
    border: 3px solid #052678;
    border-radius: 18px;
    padding: 14px 18px;
    margin: 10px 0;
}
.metro-section--purple { border-color: #6f42c1; }
.metro-section--red    { border-color: darkred; }
.metro-section--blue   { border-color: #1b54b8; }
.metro-section--orange { border-color: orange; background: #FFFDFB; }
.metro-section__title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 700;
    color: #1b809e;
    border-bottom: 1px solid #e7e7e7;
    padding-bottom: 6px;
}

.metro-grid { display: grid; gap: 10px; }
.metro-grid--2 { grid-template-columns: repeat(2, 1fr); }
.metro-grid--3 { grid-template-columns: repeat(3, 1fr); }
.metro-grid--auto { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.metro-tech-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.metro-tech-header__text { flex: 1 1 220px; min-width: 0; }
.metro-techimg {
    display: block;
    width: 180px;
    height: 130px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    flex-shrink: 0;
}
@media (max-width: 600px) {
    .metro-tech-header { justify-content: center; }
    .metro-tech-header__text { text-align: center; }
    .metro-techimg { width: 100%; max-width: 240px; height: 160px; }
}
.metro-grid--11   { grid-template-columns: repeat(11, 1fr); gap: 6px; }
.metro-grid--11 .metro-card { padding: 8px 4px; min-height: 96px; }
.metro-grid--11 .metro-card__icon { width: 32px; height: 32px; margin-bottom: 4px; }
.metro-grid--11 .metro-card__label { font-size: 9px; letter-spacing: .2px; margin-bottom: 2px; }
.metro-grid--11 .metro-card__value { font-size: 13px; }
@media (max-width: 1100px) {
    .metro-grid--11 { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 768px) {
    .metro-grid--3  { grid-template-columns: repeat(2, 1fr); }
    .metro-grid--11 { grid-template-columns: repeat(3, 1fr); }
}

.metro-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    padding: 12px 8px;
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 10px;
    min-height: 118px;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.metro-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-color: #1b809e;
}
.metro-card--slim { min-height: 0; padding: 8px 10px; }
.metro-card--slim .metro-card__label { font-size: 11px; margin-bottom: 2px; }
.metro-card--slim .metro-card__value { font-size: 14px; }

.metro-card--row {
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding: 10px 14px;
}
.metro-card--row .metro-card__label {
    font-size: 11px;
    margin: 0;
    flex: 0 0 auto;
    min-width: 130px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.metro-card--row .metro-card__value {
    flex: 1 1 auto;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.35;
}

/* === Estado actual + info rows + foto === */
.metro-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f3f8fb;
    border: 1px solid #d6e4ec;
    border-left: 4px solid #015712;
    border-radius: 10px;
    margin-bottom: 12px;
}
.metro-status__icon { width: 36px; height: 36px; object-fit: contain; }
.metro-status__body { flex: 1; }
.metro-status__label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.metro-status__pill {
    display: inline-block;
    margin-top: 2px;
    padding: 4px 12px;
    background: linear-gradient(90deg, #015712 0%, #1b809e 100%);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 999px;
    letter-spacing: .3px;
}

.metro-info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: #fafafa;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    margin-bottom: 8px;
}
.metro-info-row__icon { width: 28px; height: 28px; object-fit: contain; flex: 0 0 28px; }
.metro-info-row__label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .3px;
    flex: 1;
}
.metro-info-row__value {
    font-size: 14px;
    font-weight: 700;
    color: #052678;
    text-align: right;
}

.metro-stat__unit {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #777;
    margin-top: 2px;
    text-transform: lowercase;
}
.metro-stat__big { font-size: 24px !important; }

.metro-photo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #fafafa;
    border: 1px dashed #c0c0c0;
    border-radius: 10px;
    margin-top: 10px;
}
.metro-photo__btn {
    border: none;
    background: #fff;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    cursor: not-allowed;
    opacity: .6;
}
.metro-photo__btn img { width: 36px; height: 36px; }
.metro-photo__text strong { display: block; color: #052678; }
.metro-photo__text small { color: #777; }
.metro-card__icon {
    width: 42px; height: 42px;
    margin-bottom: 6px;
    object-fit: contain;
}
.metro-card__label {
    font-size: 11px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .3px;
    line-height: 1.2;
    margin-bottom: 4px;
}
.metro-card__value {
    font-size: 15px;
    font-weight: 700;
    color: #052678;
    line-height: 1.2;
    word-break: break-word;
}

/* === Hero header del cultivo === */
.metro-hero {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 20px;
    background: linear-gradient(90deg, #015712 0%, #1b809e 100%);
    color: #fff;
    border-radius: 14px;
    margin: 10px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.metro-hero__id {
    background: rgba(255,255,255,.2);
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .5px;
}
.metro-hero__title {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
    flex: 1;
    min-width: 200px;
}
.metro-hero__chip {
    background: rgba(255,255,255,.2);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
}

/* === Progress bar (reemplazo del donut de CanvasJS) === */
.metro-progress { margin: 14px 4px; }
.metro-progress__title {
    text-align: center;
    font-weight: 700;
    color: #015712;
    margin: 0 0 10px;
    font-size: 16px;
}
.metro-progress__bar {
    position: relative;
    width: 100%;
    height: 30px;
    background: #e7e7e7;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,.08);
    text-align: left;
}
.metro-progress__fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    height: 100%;
    width: 0;
    margin: 0;
    background: linear-gradient(90deg, #057821 0%, #1b809e 100%);
    transition: width .9s cubic-bezier(.4,0,.2,1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    box-sizing: border-box;
    border-radius: 15px 0 0 15px;
}
.metro-progress__legend {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 13px;
    color: #555;
}
.metro-progress__legend strong { color: #015712; }
.metro-progress__legend .right strong { color: #780505; }

/* ============================================================
 * Tarjeta de Direccion de entrega (Shipping)
 * ============================================================ */
.shipping-card {
    background: #ffffff;
    border: 1px solid #f0d5a8;
    border-left: 4px solid #ff8a00;
    border-radius: 14px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 18px 22px;
    margin: 16px 5px;
}
.shipping-card__header {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px dashed #f3e6cc;
    padding-bottom: 12px;
    margin-bottom: 16px;
}
.shipping-card__icon {
    width: 52px;
    height: 52px;
    flex-shrink: 0;
}
.shipping-card__title {
    margin: 0;
    color: #b15a00;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.3px;
}
.shipping-card__hint {
    margin: 2px 0 0;
    font-size: 13px;
    color: #888;
}
.shipping-form__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}
.shipping-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.shipping-field--wide { grid-column: 1 / -1; }
.shipping-field label {
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.shipping-field label i {
    color: #ff8a00;
    font-size: 13px;
}
.shipping-field .form-control {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px 12px;
    height: 40px;
    background: #ffffff;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.shipping-field .form-control:focus {
    border-color: #ff8a00;
    box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.18);
    outline: none;
}
.shipping-form__actions {
    margin-top: 18px;
    text-align: center;
}
.btn.shipping-submit,
button.shipping-submit {
    background: linear-gradient(135deg, #ff8a00 0%, #ffb74d 100%);
    background-image: linear-gradient(135deg, #ff8a00 0%, #ffb74d 100%);
    background-color: #ff8a00;
    color: #ffffff;
    font-weight: 700;
    border: none;
    border-radius: 999px;
    padding: 11px 28px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(255, 138, 0, 0.4);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.btn.shipping-submit:hover, .btn.shipping-submit:focus, .btn.shipping-submit:active,
button.shipping-submit:hover, button.shipping-submit:focus, button.shipping-submit:active {
    background: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    background-image: linear-gradient(135deg, #f57c00 0%, #ff9800 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(255, 138, 0, 0.55);
    outline: none;
}
.btn.shipping-submit i { margin-right: 6px; font-size: 16px; vertical-align: middle; }
.shipping-form__feedback { margin-top: 12px; text-align: center; font-size: 13px; color: #555; }

@media (max-width: 600px) {
    .shipping-card { padding: 14px; }
    .shipping-card__header { flex-direction: column; text-align: center; }
}

/* ============================================================
 * Paneles de pasos del formulario "Agregar nuevo Cultivo/Crianza"
 * ============================================================ */
.step-panel {
    background: #ffffff;
    border: 1px solid #e1e1e1;
    border-radius: 14px;
    padding: 16px 18px 18px;
    margin: 8px 0;
}
.step-panel--green   { border-left: 4px solid #1f6f3a; }
.step-panel--blue    { border-left: 4px solid #052678; }
.step-panel--orange  { border-left: 4px solid #f57c00; }
.step-panel--purple  { border-left: 4px solid #6a1b9a; }
.step-panel__title {
    margin: 0 0 6px;
    color: #555;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-align: center;
}
.step-panel__hint {
    text-align: center;
    margin: 0 0 14px;
    color: #1b809e;
    font-weight: 600;
    font-size: 14px;
}

.objective-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}
.objective-card__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}
.objective-card {
    position: relative;
    cursor: pointer;
    border: 2px solid #d8e6cf;
    border-radius: 14px;
    padding: 18px 14px 16px;
    background: #ffffff;
    text-align: center;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease, background .2s ease;
    margin: 0;
    font-weight: normal;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.objective-card:hover {
    border-color: #4caf50;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.objective-card img {
    width: 130px;
    height: 130px;
    object-fit: contain;
    transition: transform .2s ease;
}
.objective-card:hover img { transform: scale(1.04); }
.objective-card__title {
    font-size: 22px;
    font-weight: 700;
    color: #1f6f3a;
    margin: 0;
}
.objective-card__desc {
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    max-width: 340px;
}
.objective-card__check {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #d8e6cf;
    background: #ffffff;
    transition: background .2s ease, border-color .2s ease;
}
.objective-card__input:checked + .objective-card {
    border-color: #1f6f3a;
    background: linear-gradient(135deg, #f1f8e9, #ffffff);
    box-shadow: 0 6px 18px rgba(31,111,58,0.22);
}
.objective-card__input:checked + .objective-card .objective-card__check {
    background: #1f6f3a url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='M6 11L2.5 7.5l1.4-1.4L6 8.2l6.1-6.1 1.4 1.4z' fill='%23fff'/></svg>") center/14px no-repeat;
    border-color: #1f6f3a;
}
.objective-card__input:focus + .objective-card {
    box-shadow: 0 0 0 3px rgba(31,111,58,0.22);
}

@media (max-width: 480px) {
    .objective-cards { grid-template-columns: 1fr; }
    .objective-card img { width: 110px; height: 110px; }
}

.step-panel__select {
    max-width: 480px;
    margin: 0 auto 14px;
    height: 42px;
    border-radius: 10px;
    border: 1px solid #d8e6cf;
    padding: 6px 12px;
    font-size: 14px;
    background: #ffffff;
}
.step-panel__select:focus {
    border-color: #1f6f3a;
    box-shadow: 0 0 0 3px rgba(31,111,58,0.18);
    outline: none;
}

.step-panel__quantity {
    background: #fff7ee;
    border: 1px solid #f5d3a8;
    border-left: 4px solid #f57c00;
    border-radius: 12px;
    padding: 14px 18px;
    margin: 0 auto 16px;
    max-width: 540px;
    text-align: center;
}
.step-panel__quantity label {
    display: block;
    color: #b15a00;
    font-size: 14px;
    margin-bottom: 8px;
}
.step-panel__quantity input[type="number"] {
    max-width: 220px;
    margin: 0 auto;
    height: 46px;
    border-radius: 10px;
    border: 1px solid #f5d3a8;
    background: #ffffff;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    color: #b15a00;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.step-panel__quantity input[type="number"]:focus {
    border-color: #f57c00;
    box-shadow: 0 0 0 3px rgba(245,124,0,0.2);
    outline: none;
}

.cultivo-preview {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 16px;
    align-items: start;
    background: #fafdf7;
    border: 1px solid #d8e6cf;
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
}
.cultivo-preview__media {
    display: flex;
    align-items: center;
    justify-content: center;
}
.cultivo-preview__img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: block;
    max-width: 100%;
}
.cultivo-preview__info {
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    min-width: 0;
}
.cultivo-preview__info h3, .cultivo-preview__info h4, .cultivo-preview__info h5 {
    margin-top: 0;
}

@media (max-width: 600px) {
    .cultivo-preview { grid-template-columns: 1fr; text-align: center; }
    .cultivo-preview__img { width: 100%; max-width: 240px; height: 160px; margin: 0 auto; }
    .cultivo-preview__info { text-align: left; }
}

.cost-summary {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 16px;
    align-items: start;
    background: #fafdf7;
    border: 1px solid #d8e6cf;
    border-radius: 12px;
    padding: 14px;
    margin-top: 8px;
}
.cost-summary__img {
    width: 180px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    display: block;
    max-width: 100%;
}
.cost-summary__list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #333;
}
.cost-summary__list li { padding: 3px 0; border-bottom: 1px dashed #e6efde; }
.cost-summary__list li:last-child { border-bottom: none; }
.cost-summary__list b { color: #1b809e; }

@media (max-width: 600px) {
    .cost-summary { grid-template-columns: 1fr; text-align: center; }
    .cost-summary__img { width: 100%; max-width: 240px; height: 160px; margin: 0 auto; }
    .cost-summary__list { text-align: left; }
}

.cost-receipt {
    background: #ffffff;
    border: 1px solid #d8e6cf;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin: 0 5px;
}
.cost-receipt__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    gap: 10px;
}
.cost-receipt__row:last-child { border-bottom: none; }
.cost-receipt__label {
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-size: 12px;
}
.cost-receipt__pct {
    background: #ffe082;
    color: #a06600;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    margin-left: 4px;
    font-weight: 700;
}
.cost-receipt__value {
    font-weight: 700;
    color: #1b809e;
    font-size: 15px;
    text-align: right;
    white-space: nowrap;
}
.cost-receipt__row--discount { background: #fff5f5; }
.cost-receipt__row--discount .cost-receipt__value { color: #c62828; }
.cost-receipt__row--total {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    padding: 14px 16px;
}
.cost-receipt__row--total .cost-receipt__label {
    color: #1f6f3a;
    font-size: 14px;
}
.cost-receipt__row--total .cost-receipt__value {
    color: #1f6f3a;
    font-size: 18px;
    line-height: 1.2;
}
.cost-receipt__row--total .cost-receipt__value small {
    display: block;
    font-size: 11px;
    color: #777;
    font-weight: 500;
    margin-top: 2px;
}

@media (max-width: 480px) {
    .cost-receipt__row { padding: 10px 12px; }
    .cost-receipt__value { font-size: 14px; }
    .cost-receipt__row--total .cost-receipt__value { font-size: 17px; }
}

/* ============================================================
 * Pantalla "Adquirir terreno" (#shop)
 * ============================================================ */
.shop-form {
    display: block;
    width: 100%;
    padding: 14px 12px 24px;
    box-sizing: border-box;
}
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
    width: 100%;
    box-sizing: border-box;
}
.shop-card {
    background: #ffffff;
    border: 1px solid #d8e6cf;
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    min-height: 200px;
    box-sizing: border-box;
}
.shop-card--info { background: linear-gradient(135deg, #fafdf7, #f1f8e9); border-left: 4px solid #1f6f3a; }
.shop-card--form { background: #fff8ef; border-left: 4px solid #f57c00; }
.shop-card--climate { background: #f5fafd; border-left: 4px solid #1b809e; }

.shop-card__title {
    margin: 0 0 6px;
    color: #1f6f3a;
    font-weight: 700;
    font-size: 15px;
}
.shop-card__hint {
    margin: 0 0 10px;
    font-size: 13px;
    color: #555;
    line-height: 1.45;
}
.shop-card__img {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 8px auto 0;
    align-self: center;
    border-radius: 10px;
}
.shop-card__price {
    margin: 4px 0 0;
    font-size: 14px;
    font-weight: 700;
    color: #b15a00;
    text-align: center;
}
.shop-card__price-sub {
    margin: 0 0 8px;
    font-size: 12px;
    color: #888;
    text-align: center;
}
.shop-card__condtext {
    margin: 6px 0 8px;
    font-size: 13px;
    color: #1b809e;
    line-height: 1.45;
    font-style: italic;
}
.shop-card__terms { margin-top: auto; padding-top: 8px; border-top: 1px dashed #d8e6cf; }
.shop-card__terms p { margin: 0 0 8px; font-size: 12px; color: #555; line-height: 1.4; }
.shop-card__check { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; color: #555; cursor: pointer; line-height: 1.4; font-weight: normal; }
.shop-card__check input { margin-top: 2px; flex-shrink: 0; }
.shop-card__check a { color: #1f6f3a; font-weight: 600; }

.shop-field { margin-bottom: 12px; }
.shop-field label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
    line-height: 1.4;
}
.shop-field label i {
    color: #f57c00;
    font-size: 13px;
    margin-right: 4px;
    vertical-align: middle;
}
.shop-field label abbr {
    text-decoration: none;
    border-bottom: 1px dotted #888;
    cursor: help;
}
.shop-card--climate .shop-field label i { color: #1b809e; }
.shop-card--info .shop-field label i { color: #1f6f3a; }
.shop-field .form-control {
    width: 100%;
    border: 1px solid #d8e6cf;
    border-radius: 10px;
    height: 42px;
    padding: 6px 12px;
    background: #ffffff;
    box-shadow: none;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.shop-card--form .shop-field .form-control:focus {
    border-color: #f57c00;
    box-shadow: 0 0 0 3px rgba(245,124,0,0.18);
    outline: none;
}
.shop-card--climate .shop-field .form-control:focus {
    border-color: #1b809e;
    box-shadow: 0 0 0 3px rgba(27,128,158,0.18);
    outline: none;
}
.shop-field__big {
    height: 50px !important;
    font-size: 22px !important;
    font-weight: 700;
    color: #b15a00;
    text-align: center;
}

.shop-receipt { max-width: 600px; margin: 0 auto 16px; }

.shop-form__actions { max-width: 600px; margin: 0 auto; }
.btn.shop-submit, button.shop-submit {
    background: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    background-image: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    background-color: #1f6f3a;
    color: #ffffff;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 4px 12px rgba(31,111,58,0.4);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.btn.shop-submit:hover, .btn.shop-submit:focus, .btn.shop-submit:active,
button.shop-submit:hover, button.shop-submit:focus, button.shop-submit:active {
    background: linear-gradient(135deg, #155727 0%, #2e7d32 100%);
    background-image: linear-gradient(135deg, #155727 0%, #2e7d32 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31,111,58,0.55);
    outline: none;
}
.btn.shop-submit i { margin-right: 8px; font-size: 18px; vertical-align: middle; }

/* ============================================================
 * Historial de compras
 * ============================================================ */
.history-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    padding: 14px 12px 24px;
}
.history-card {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-left: 4px solid #1f6f3a;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .15s ease, box-shadow .15s ease;
}
.history-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.history-card--buy     { border-left-color: #1f6f3a; }
.history-card--rent    { border-left-color: #f57c00; }
.history-card--project { border-left-color: #1b54b8; }

.history-card__header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: linear-gradient(135deg, #fafdf7, #f1f8e9);
    border-bottom: 1px solid #eaeaea;
}
.history-card--rent .history-card__header    { background: linear-gradient(135deg, #fff8ef, #ffe9c8); }
.history-card--project .history-card__header { background: linear-gradient(135deg, #f5fafd, #e3f2fd); }

.history-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    padding: 6px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.history-card__heading {
    flex: 1 1 auto;
    min-width: 0;
}
.history-card__type {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #777;
    font-weight: 600;
}
.history-card__title {
    margin: 1px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: #1f6f3a;
}
.history-card--rent .history-card__title    { color: #b15a00; }
.history-card--project .history-card__title { color: #1b54b8; }
.history-card__date {
    flex-shrink: 0;
    font-size: 12px;
    color: #555;
    font-weight: 600;
    background: #ffffff;
    border-radius: 999px;
    padding: 4px 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    white-space: nowrap;
}
.history-card__date i { margin-right: 4px; color: #888; }

.history-card__body {
    padding: 12px 14px;
    flex: 1 1 auto;
}
.history-card__detail {
    display: block;
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
    font-size: 13px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.history-card__detail:last-child { border-bottom: none; }
.history-card__label {
    display: block;
    color: #777;
    text-transform: uppercase;
    font-size: 10.5px;
    letter-spacing: 0.4px;
    font-weight: 600;
    margin-bottom: 2px;
}
.history-card__value {
    display: block;
    color: #1b809e;
    font-weight: 600;
    text-align: left;
    line-height: 1.4;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    word-break: break-word;
    max-width: 100%;
}

.history-card__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 14px 12px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.history-card__chip {
    background: #ffffff;
    border: 1px solid #e3e3e3;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11.5px;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.history-card__chip i { color: #888; font-size: 12px; }
.history-card__chip--total {
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
    border-color: #c8e6c9;
    color: #1f6f3a;
}
.history-card__chip--total b { color: #155727; }

.history-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 36px 18px;
    background: #fafafa;
    border: 1px dashed #ddd;
    border-radius: 14px;
    color: #777;
}
.history-empty i { font-size: 36px; opacity: 0.6; display: block; margin-bottom: 8px; }
.history-empty p { margin: 0; font-size: 15px; }

@media (max-width: 600px) {
    .history-card__header { flex-wrap: wrap; }
    .history-card__date { width: 100%; text-align: center; }
}

/* ============================================================
 * Pantalla de Login
 * ============================================================ */
.login-stage {
    width: 100%;
    margin: 0;
    padding: 18px 28px 48px;
    box-sizing: border-box;
    position: relative;
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand__btn {
    background: rgba(255,255,255,0.55);
    border: none;
    padding: 10px 22px;
    cursor: pointer;
    display: inline-flex;
    align-items: flex-end;
    gap: 14px;
    border-radius: 16px;
    transition: background .15s ease, transform .15s ease;
}
.login-brand__btn:hover { background: rgba(255,255,255,0.75); transform: translateY(-1px); }
.login-brand__logo {
    width: 130px;
    height: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.12));
}
.login-brand__flag {
    width: 56px;
    height: auto;
    margin-bottom: 6px;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.1));
}

.login-stats {
    background: linear-gradient(135deg, rgba(0,51,0,0.94), rgba(31,111,58,0.94));
    border-radius: 14px;
    padding: 14px 18px 16px;
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(0,0,0,0.18);
    margin-bottom: 22px;
    overflow: hidden;
}
.login-stats__taglineWrap {
    text-align: center;
    margin: 0 0 12px;
    width: 100%;
    padding: 0 8px;
    box-sizing: border-box;
}
.login-stats__tagline {
    font-size: 13px;
    line-height: 1.45;
    opacity: 0.92;
    margin: 0;
    text-align: center;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.login-stats__taglineWrap[data-expanded="1"] .login-stats__tagline {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
}
.login-stats__more {
    background: transparent;
    border: none;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 6px;
    text-decoration: underline;
    opacity: 0.9;
    transition: opacity .15s ease, background .15s ease;
}
.login-stats__more:hover, .login-stats__more:focus {
    opacity: 1;
    background: rgba(255,255,255,0.1);
    outline: none;
}
.login-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.login-stat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 6px 4px;
}
.login-stat img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.2));
}
.login-stat > div { line-height: 1.1; text-align: left; }
.login-stat__num {
    display: block;
    font-size: 22px;
    font-weight: 800;
}
.login-stat__lbl {
    display: block;
    font-size: 11px;
    opacity: 0.92;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.login-card {
    background: rgba(255,255,255,0.97);
    border-radius: 18px;
    padding: 28px 28px 22px;
    max-width: 420px;
    margin: 0 auto;
    box-shadow: 0 14px 36px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,51,0,0.08);
}
.login-card__title {
    text-align: center;
    margin: 0 0 20px;
    color: #003300;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: 0.3px;
}
.login-field { margin-bottom: 14px; }
.login-field label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.login-field label i { color: #1f6f3a; font-size: 13px; }
.login-field .form-control {
    width: 100%;
    border: 1px solid #d8e6cf;
    border-radius: 10px;
    height: 44px;
    padding: 8px 14px;
    background: #f7faf3;
    box-shadow: none;
    font-size: 15px;
    color: #333;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.login-field .form-control:focus {
    border-color: #1f6f3a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(31,111,58,0.18);
    outline: none;
}

.login-password { display: flex; gap: 8px; }
.login-password .form-control { flex: 1 1 auto; min-width: 0; }
.login-password__toggle {
    width: 44px;
    height: 44px;
    border: 1px solid #d8e6cf;
    border-radius: 10px;
    background: #f7faf3;
    color: #555;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
    flex-shrink: 0;
}
.login-password__toggle:hover {
    background: #1f6f3a;
    color: #ffffff;
    border-color: #1f6f3a;
}

.login-card__actions { margin-top: 18px; }
.btn.login-submit, button.login-submit {
    background: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    background-image: linear-gradient(135deg, #1f6f3a 0%, #4caf50 100%);
    background-color: #1f6f3a;
    color: #ffffff;
    width: 100%;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 4px 12px rgba(31,111,58,0.4);
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    text-shadow: 0 1px 1px rgba(0,0,0,0.15);
}
.btn.login-submit:hover, .btn.login-submit:focus, .btn.login-submit:active,
button.login-submit:hover, button.login-submit:focus, button.login-submit:active {
    background: linear-gradient(135deg, #155727 0%, #2e7d32 100%);
    background-image: linear-gradient(135deg, #155727 0%, #2e7d32 100%);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31,111,58,0.55);
    outline: none;
}
.btn.login-submit i { margin-left: 8px; }

.login-links {
    margin-top: 14px;
    text-align: center;
    font-size: 13px;
}
.login-links a {
    color: #1f6f3a;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}
.login-links a:hover { text-decoration: underline; color: #155727; }
.login-links__sep { margin: 0 8px; color: #aaa; }

.datos_ajax_login > .alert { max-width: 420px; margin: 12px auto 0; }

@media (max-width: 600px) {
    .login-stage { padding: 10px 12px 32px; }
    .login-brand { margin-bottom: 10px; }
    .login-brand__btn { padding: 6px 14px; gap: 10px; }
    .login-brand__logo { width: 90px; }
    .login-brand__flag { width: 40px; margin-bottom: 4px; }

    .login-stats { padding: 10px 12px 12px; margin-bottom: 14px; border-radius: 12px; }
    .login-stats__tagline {
        font-size: 11.5px;
        line-height: 1.35;
        margin-bottom: 10px;
        display: -webkit-box;
        -webkit-line-clamp: 4;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .login-stats__grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .login-stat { padding: 4px 2px; gap: 8px; }
    .login-stat img { width: 34px; height: 34px; }
    .login-stat__num { font-size: 18px; }
    .login-stat__lbl { font-size: 10px; }

    .login-card { padding: 18px 16px 16px; border-radius: 14px; }
    .login-card__title { font-size: 19px; margin-bottom: 14px; }
    .login-field { margin-bottom: 11px; }
    .login-field .form-control { height: 40px; font-size: 14px; }
    .login-password__toggle { width: 40px; height: 40px; }
    .btn.login-submit { padding: 10px 20px; font-size: 14px; }
}
