/* ============================================================
   RentaMaq — Portal del Cliente (CSS público)
   ============================================================ */

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

.rm-widget {
    font-family: 'Inter', -apple-system, sans-serif;
    color: #2c3e50;
    max-width: 900px;
    margin: 0 auto;
}

/* ── Botones ─────────────────────────────────────────────── */
.rm-widget .rm-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: all .18s;
    font-family: inherit;
}
.rm-widget .rm-btn-primary { background: #1a3c5e; color: #fff; }
.rm-widget .rm-btn-primary:hover { background: #2c6e9e; }
.rm-widget .rm-btn-outline { background: transparent; color: #1a3c5e; border: 2px solid #1a3c5e; }
.rm-widget .rm-btn-outline:hover { background: #1a3c5e; color: #fff; }
.rm-widget .rm-btn-sm { padding: 6px 14px; font-size: 12px; }
.rm-widget .rm-btn-success { background: #27ae60; color: #fff; }
.rm-widget .rm-btn-success:hover { background: #1e8449; }

/* ── Campos de formulario ────────────────────────────────── */
.rm-widget .rm-field { margin-bottom: 14px; }
.rm-widget .rm-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #1a3c5e;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.rm-widget .rm-field input,
.rm-widget .rm-field select,
.rm-widget .rm-field textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dde3ea;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    font-family: inherit;
}
.rm-widget .rm-field input:focus,
.rm-widget .rm-field select:focus,
.rm-widget .rm-field textarea:focus {
    border-color: #2c6e9e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(44,110,158,.12);
}

.rm-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

/* ── Rastreador ──────────────────────────────────────────── */
.rm-rastreador {
    background: linear-gradient(135deg, #1a3c5e 0%, #2c6e9e 100%);
    border-radius: 12px;
    padding: 32px;
    color: #fff;
}
.rm-rastreador .rm-widget-header h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #fff;
}
.rm-rastreador .rm-widget-header p {
    color: rgba(255,255,255,.8);
    margin: 0 0 20px;
    font-size: 14px;
}
.rm-search-bar { display: flex; gap: 10px; }
.rm-search-bar input {
    flex: 1;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    font-family: 'Inter', monospace;
}
.rm-search-bar input:focus { outline: 2px solid #f0a500; }

.rm-result-box {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    margin-top: 20px;
    color: #2c3e50;
}
.rm-result-box .rm-orden-codigo {
    font-size: 28px;
    font-weight: 700;
    color: #1a3c5e;
    letter-spacing: 3px;
    margin-bottom: 6px;
}
.rm-result-box .rm-orden-estatus {
    display: inline-block;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    background: #eaf5fb;
    color: #1a5276;
    margin-bottom: 16px;
}
.rm-result-box .rm-maquina-nombre { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.rm-result-box .rm-dias-restantes {
    font-size: 32px;
    font-weight: 700;
    color: #1a3c5e;
}

/* ── Portal del cliente ──────────────────────────────────── */
.rm-portal {
    background: #f8fafc;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
}
.rm-portal-tabs-wrap { padding: 28px; }
.rm-portal .rm-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid #dde3ea;
}
.rm-portal .rm-tab {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #95a5a6;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all .15s;
}
.rm-portal .rm-tab.active, .rm-portal .rm-tab:hover {
    color: #1a3c5e;
    border-color: #2c6e9e;
}
.rm-portal-form h3 { font-size: 18px; color: #1a3c5e; margin: 0 0 18px; }
.rm-portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 28px 0;
}
.rm-portal-header h3 { font-size: 17px; color: #1a3c5e; margin: 0; }

/* ── Catálogo ────────────────────────────────────────────── */
.rm-catalogo-filtros {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.rm-catalogo-filtros select, .rm-catalogo-filtros input {
    padding: 9px 12px;
    border: 1.5px solid #dde3ea;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
}

.rm-maquinas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 20px;
}

.rm-maquina-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    overflow: hidden;
    transition: transform .18s, box-shadow .18s;
}
.rm-maquina-card:hover { transform: translateY(-4px); box-shadow: 0 6px 20px rgba(0,0,0,.12); }

.rm-maquina-img {
    height: 180px;
    object-fit: cover;
    width: 100%;
    background: linear-gradient(135deg, #e8ecf0 0%, #cfd3d7 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #95a5a6;
}
.rm-maquina-img img { width: 100%; height: 100%; object-fit: cover; }

.rm-maquina-body { padding: 16px; }
.rm-maquina-cat { font-size: 11px; font-weight: 600; color: #2c6e9e; text-transform: uppercase; letter-spacing: .5px; }
.rm-maquina-nombre { font-size: 16px; font-weight: 700; color: #1a3c5e; margin: 4px 0 2px; }
.rm-maquina-specs { font-size: 12px; color: #7f8c8d; margin-bottom: 12px; }
.rm-maquina-precio { display: flex; align-items: baseline; gap: 6px; }
.rm-maquina-precio-num { font-size: 22px; font-weight: 700; color: #1a3c5e; }
.rm-maquina-precio-ud  { font-size: 12px; color: #7f8c8d; }
.rm-maquina-footer { padding: 12px 16px; border-top: 1px solid #f0f0f0; }

/* ── Cotizador ───────────────────────────────────────────── */
.rm-cotizador {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,.08);
    padding: 28px;
}
.rm-cotizador h3 { font-size: 20px; color: #1a3c5e; margin: 0 0 20px; }
.rm-desglose-box {
    background: #f8fafc;
    border: 1.5px solid #dde3ea;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}
.rm-desglose-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 14px;
    color: #555;
    border-bottom: 1px dashed #e0e0e0;
}
.rm-desglose-row:last-child { border: none; font-weight: 700; font-size: 18px; color: #1a3c5e; padding-top: 10px; }

/* ── Mensajes ────────────────────────────────────────────── */
.rm-msg { padding: 10px 14px; border-radius: 6px; font-size: 13px; margin: 8px 0; }
.rm-msg-ok    { background: #eafaf1; color: #196f3d; border-left: 4px solid #27ae60; }
.rm-msg-error { background: #fdedec; color: #922b21; border-left: 4px solid #e74c3c; }

/* ── Loading ─────────────────────────────────────────────── */
.rm-loading { color: #95a5a6; font-style: italic; text-align: center; padding: 24px 0; }

/* ── Timeline ────────────────────────────────────────────── */
.rm-timeline-pub { list-style: none; margin: 0; padding: 0; position: relative; }
.rm-timeline-pub::before {
    content:''; position:absolute; left:12px; top:0; bottom:0;
    width:2px; background:#dde3ea;
}
.rm-timeline-pub li { display:flex; gap:14px; margin-bottom:14px; position:relative; }
.rm-tl-dot { width:14px; height:14px; border-radius:50%; background:#2c6e9e; flex-shrink:0; margin-top:2px; position:relative; z-index:1; }
.rm-tl-est  { font-weight:700; color:#1a3c5e; font-size:14px; }
.rm-tl-fecha{ font-size:12px; color:#7f8c8d; }
.rm-tl-nota { font-size:13px; color:#555; margin-top:2px; }

.rm-form-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    padding: 20px;
    margin: 16px 0;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 600px) {
    .rm-maquinas-grid { grid-template-columns: 1fr; }
    .rm-rastreador { padding: 20px; }
    .rm-search-bar { flex-direction: column; }
    .rm-form-row { grid-template-columns: 1fr; }
    .rm-cotizador { padding: 18px; }
}
/* ── Escritorio del Proveedor (Web App) ──────────────────── */
.rm-app-container {
    display: flex;
    min-height: 100vh;
    background: #f1f5f9;
    font-family: 'Inter', sans-serif;
    position: relative;
    max-width: 100% !important;
}

.rm-app-sidebar {
    width: 260px;
    background: #1e293b;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    transition: all .3s;
}

.rm-app-logo {
    padding: 24px;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.rm-app-nav {
    flex: 1;
    padding: 20px 0;
}

.rm-app-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all .2s;
}

.rm-app-nav a:hover, .rm-app-nav a.active {
    color: #fff;
    background: rgba(255,255,255,.05);
}

.rm-app-nav a.active {
    border-left: 4px solid #38bdf8;
    background: rgba(56,189,248,.1);
}

.rm-app-user {
    padding: 20px 24px;
    border-top: 1px solid rgba(255,255,255,.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rm-user-info strong { display: block; font-size: 14px; }
.rm-user-info span { font-size: 12px; color: #94a3b8; }

.rm-btn-logout {
    color: #94a3b8;
    font-size: 20px;
    text-decoration: none;
}
.rm-btn-logout:hover { color: #f87171; }

.rm-app-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.rm-app-header {
    background: #fff;
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.rm-app-header h2 { font-size: 20px; color: #1e293b; margin: 0; font-weight: 700; }

.rm-app-body {
    padding: 32px;
    flex: 1;
}

/* 📊 Widgets del Dashboard 📊 */
.rm-grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.rm-card-stat {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
    display: flex;
    flex-direction: column;
}

.rm-card-stat .label { font-size: 14px; color: #64748b; font-weight: 600; text-transform: uppercase; margin-bottom: 8px; }
.rm-card-stat .value { font-size: 32px; font-weight: 800; color: #1e293b; }

.rm-page-card {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}

/* 📦 Tabla de Gestión 📦 */
.rm-mgmt-table { width: 100%; border-collapse: collapse; }
.rm-mgmt-table th { text-align: left; padding: 12px; border-bottom: 2px solid #f1f5f9; color: #64748b; font-size: 12px; text-transform: uppercase; }
.rm-mgmt-table td { padding: 16px 12px; border-bottom: 1px solid #f1f5f9; font-size: 14px; }
.rm-mgmt-table tr:hover { background: #f8fafc; }

/* 📱 Responsive Escritorio 📱 */
@media (max-width: 1024px) {
    .rm-app-sidebar { width: 80px; }
    .rm-app-logo, .rm-user-info, .rm-app-nav a span { display: none; }
    .rm-app-nav a { justify-content: center; padding: 16px; }
}

@media (max-width: 768px) {
    .rm-app-container { flex-direction: column; }
    .rm-app-sidebar { width: 100%; height: auto; }
    .rm-app-nav { display: flex; overflow-x: auto; padding: 0; }
    .rm-app-nav a { flex-shrink: 0; }
    .rm-app-body { padding: 16px; }
}
/* ── Auth Container ────────────────────────────────────────── */
.rm-auth-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    padding: 40px;
    max-width: 450px !important;
    margin: 40px auto;
    border: 1px solid #f0f0f0;
}
.rm-auth-container h3 {
    text-align: center;
    margin-bottom: 24px;
    color: #1a3c5e;
    font-weight: 700;
}
.rm-auth-container .rm-field label {
    color: #7f8c8d;
    text-transform: none;
    letter-spacing: 0;
    font-size: 13px;
}
.rm-auth-container .rm-btn-primary {
    height: 46px;
    justify-content: center;
    font-size: 15px;
}
.rm-auth-container a {
    color: #2c6e9e;
    text-decoration: none;
    font-weight: 600;
}
.rm-auth-container a:hover {
    text-decoration: underline;
}

/* Animación simple */
#rm-auth-box > div {
    animation: rmFadeIn .3s ease;
}
@keyframes rmFadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
