/* ==============================
   RESET
============================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --pm-primary:       #ff7a00;
    --pm-primary-hover: #d96a00;
    --pm-dark:          #0f0f0f;
    --pm-dark2:         #1e1e1e;
    --pm-dark3:         #141414;
    --pm-border:        #2a2a2a;
    --pm-text:          #e6e6e6;
    --pm-text-muted:    #888;
    --sb-width:         260px;
}

body {
    font-family: "Inter", Arial, sans-serif;
    background: var(--pm-dark);
    color: var(--pm-text);
    font-size: 15px;
    line-height: 1.6;
}

/* HEADER PÚBLICO */
.pm-header-publico {
    background: var(--pm-dark2);
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    border-bottom: 1px solid var(--pm-border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.pm-header-publico img { height: 44px; }
.pm-header-publico nav { display: flex; align-items: center; gap: 24px; }
.pm-header-publico nav a {
    color: var(--pm-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.2s;
}
.pm-header-publico nav a:hover { color: var(--pm-primary); }

/* CONTENEDORES */
.pm-container { width: 90%; max-width: 1100px; margin: 0 auto; padding: 40px 20px; }
.pm-container-sm { width: 90%; max-width: 680px; margin: 0 auto; padding: 40px 20px; }
.pm-panel-content { padding-left: var(--sb-width); }
@media (max-width: 1024px) { .pm-panel-content { padding-left: 0; } }

/* CARDS / BOXES */
.pm-box {
    background: var(--pm-dark2);
    border: 1px solid var(--pm-border);
    border-radius: 10px;
    padding: 24px;
    margin-bottom: 24px;
}
.pm-box h2 { color: var(--pm-primary); margin: 0 0 16px 0; font-size: 18px; }

/* BOTONES */
.pm-btn {
    display: inline-block;
    background: var(--pm-primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 14px;
}
.pm-btn:hover { background: var(--pm-primary-hover); color: #fff; }
.pm-btn.secondary { background: #333; }
.pm-btn.secondary:hover { background: #444; }
.pm-btn.disabled, .pm-btn[disabled] { background: #444; color: #777; cursor: not-allowed; pointer-events: none; }
.pm-btn-full { width: 100%; text-align: center; padding: 13px; font-size: 16px; }

/* FORMULARIOS */
label { display: block; font-weight: 600; color: var(--pm-primary); margin-bottom: 5px; margin-top: 14px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=email], input[type=password],
input[type=date], input[type=number], select, textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--pm-border);
    border-radius: 6px;
    background: #111;
    color: var(--pm-text);
    font-size: 14px;
    transition: border-color 0.2s;
    margin-bottom: 0;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--pm-primary); }
input[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ALERTAS */
.pm-alert { padding: 13px 16px; border-radius: 7px; margin-bottom: 18px; font-size: 14px; font-weight: 500; }
.pm-alert.success { background: #1b2e1b; border-left: 4px solid #4caf50; color: #a6d6a6; }
.pm-alert.error   { background: #2e1b1b; border-left: 4px solid #ef5350; color: #f4a0a0; }
.pm-alert.warning { background: #2e2200; border-left: 4px solid var(--pm-primary); color: #ffcc80; }
.pm-alert.info    { background: #2a1800; border-left: 4px solid var(--pm-primary); color: #ffcc80; }

/* TABLAS */
.pm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.pm-table th { background: var(--pm-primary); color: #fff; padding: 9px 12px; text-align: left; font-size: 12px; text-transform: uppercase; }
.pm-table td { padding: 9px 12px; border-bottom: 1px solid var(--pm-border); vertical-align: middle; }
.pm-table tr:last-child td { border-bottom: none; }

/* BADGES */
.pm-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.pm-badge.pendiente  { background: #332400; color: #ffaa40; border: 1px solid #664800; }
.pm-badge.confirmada { background: #1b2e1b; color: #66bb6a; border: 1px solid #2e5f2e; }
.pm-badge.cancelada  { background: #2e1b1b; color: #ef5350; border: 1px solid #5f2e2e; }
.pm-badge.cerrada    { background: #222;    color: #888;    border: 1px solid #333; }

/* GRID PRODUCTOS */
.pm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.pm-product-card {
    background: var(--pm-dark2);
    border: 1px solid var(--pm-border);
    border-radius: 10px;
    padding: 20px;
    transition: border-color 0.2s, transform 0.15s;
}
.pm-product-card:hover { border-color: var(--pm-primary); transform: translateY(-2px); }
.pm-product-card h3 { color: var(--pm-primary); margin: 0 0 10px 0; font-size: 16px; }
.pm-product-card p  { color: var(--pm-text-muted); font-size: 13px; margin: 4px 0; }
.pm-product-card .price { font-size: 18px; font-weight: 700; color: var(--pm-text); margin: 12px 0; }

/* SIDEBAR CLIENTE */
#SidebarCliente {
    position: fixed; top: 0; left: 0;
    width: var(--sb-width); height: 100vh;
    background: var(--pm-dark3);
    padding: 20px 14px;
    box-shadow: 2px 0 15px rgba(0,0,0,0.6);
    z-index: 1000; overflow-y: auto;
}
#SidebarCliente h2 { color: var(--pm-primary); font-size: 15px; text-align: center; margin: 0 0 14px 0; text-transform: uppercase; letter-spacing: 0.5px; }
.pm-sb__logo { text-align: center; margin-bottom: 14px; }
.pm-sb__logo img { max-width: 120px; max-height: 64px; object-fit: contain; }
.pm-sb__nav { display: flex; flex-direction: column; gap: 6px; }
.pm-sb__link {
    display: block; padding: 11px 14px;
    background: #1f1f1f; color: var(--pm-text);
    text-decoration: none; border-radius: 7px;
    font-weight: 600; font-size: 14px;
    border: 1px solid transparent; transition: all 0.2s;
}
.pm-sb__link:hover { background: var(--pm-primary); color: #fff; }
.pm-sb__link.is-active { background: #2a1800; color: #fff; border-color: var(--pm-primary); }
.pm-sb__label { display: inline-flex; gap: 8px; align-items: center; }
.pm-sb__emoji { width: 20px; text-align: center; }

#SidebarOverlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 900; display: none; }
#SidebarOverlay.is-visible { display: block; }
#btnSidebarToggle {
    position: fixed; top: 14px; left: 14px; z-index: 1100;
    background: var(--pm-dark2); color: var(--pm-text);
    border: 1px solid var(--pm-border); border-radius: 7px;
    padding: 8px 10px; cursor: pointer; display: none; font-size: 14px;
}
@media (max-width: 1024px) {
    #SidebarCliente { transform: translateX(-100%); transition: transform .25s ease; }
    #SidebarCliente.is-open { transform: translateX(0); }
    #btnSidebarToggle { display: inline-flex; align-items: center; gap: 8px; }
}

/* FOOTER */
.pm-footer { background: var(--pm-dark2); padding: 50px 20px 30px; margin-top: 60px; border-top: 1px solid var(--pm-border); }
.pm-footer-inner { max-width: 1100px; margin: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; }
.pm-footer h3 { color: var(--pm-primary); font-size: 15px; margin: 0 0 12px 0; }
.pm-footer p  { color: #aaa; margin: 5px 0; font-size: 14px; }
.pm-footer a  { color: var(--pm-primary); text-decoration: none; }
.pm-footer a:hover { color: var(--pm-primary-hover); }
.pm-copy { text-align: center; margin-top: 36px; padding-top: 18px; border-top: 1px solid var(--pm-border); font-size: 12px; color: #666; }

/* PORTADA HOME */
.pm-portada {
    position: relative; background-size: cover; background-position: center;
    height: 72vh; min-height: 400px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; color: #fff;
}
.pm-portada::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.6); }
.pm-portada-content { position: relative; z-index: 2; max-width: 680px; padding: 0 20px; }
.pm-portada-content h1 { font-size: 2.6rem; margin-bottom: 12px; font-weight: 700; }
.pm-portada-content p  { font-size: 1.05rem; margin-bottom: 28px; color: #ddd; }

.pm-buscador {
    background: rgba(20,20,20,0.95); border: 1px solid var(--pm-border);
    border-radius: 10px; padding: 22px; max-width: 420px; margin: 0 auto; text-align: left;
}
.pm-buscador label { color: var(--pm-text); }