* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}

:root {
    --bg-main: #070910;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.10);
    --border-strong: rgba(255, 255, 255, 0.16);
    --text-main: #ffffff;
    --text-soft: #b5bed3;
    --text-muted: #8f99b0;
    --accent-1: #ff2d6f;
    --accent-2: #ff7a00;
    --success: #00d26a;
    --danger: #ff4b5f;
    --warning: #ffb340;
    --shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
    --radius: 20px;
    --sidebar-width: 270px;
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

a:visited,
a:hover,
a:active {
    text-decoration: none;
}

.app-bg {
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(255, 0, 102, 0.18), transparent 28%),
        radial-gradient(circle at bottom right, rgba(0, 110, 255, 0.14), transparent 30%),
        linear-gradient(135deg, #05060c 0%, #090c16 45%, #05070c 100%);
    z-index: -1;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

/* SIDEBAR */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: rgba(10, 12, 20, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding: 28px 18px;
    position: sticky;
    top: 0;
    backdrop-filter: blur(14px);
}

.sidebar-top {
    margin-bottom: 26px;
}

.logo-block {
    padding: 8px 8px 18px 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo-title {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .3px;
    line-height: 1;
}

.logo-title span {
    color: var(--accent-1);
}

.logo-subtitle {
    margin-top: 8px;
    color: var(--text-soft);
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    padding: 0 16px;
    border-radius: 16px;
    color: #e8edf9;
    background: transparent;
    border: 1px solid transparent;
    transition: .22s ease;
    font-weight: 600;
}

.menu-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
    transform: translateX(3px);
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(255,45,111,0.18), rgba(255,122,0,0.10));
    border-color: rgba(255,255,255,0.10);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}

.menu-item.danger:hover {
    background: rgba(255, 75, 95, 0.12);
    border-color: rgba(255, 75, 95, 0.18);
}

.menu-icon {
    color: var(--accent-1);
    font-size: 10px;
    width: 12px;
    flex: 0 0 12px;
}

.menu-label {
    font-size: 15px;
}

/* MAIN */
.main-content {
    flex: 1;
    padding: 28px;
    min-width: 0;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 34px;
    line-height: 1.1;
    margin-bottom: 6px;
    font-weight: 800;
}

.page-subtitle {
    color: var(--text-soft);
    font-size: 15px;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 14px;
    font-weight: 700;
    transition: .22s ease;
    border: 1px solid transparent;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    color: #fff;
    box-shadow: 0 10px 24px rgba(255, 90, 40, 0.20);
}

.btn-secondary {
    background: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.10);
    color: #fff;
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.10);
}

.small-btn {
    min-width: 145px;
}

/* CARDS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.stat-card {
    min-width: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    transition: .22s ease;
}

.stat-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

.stat-email {
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* ACTION CARDS */
.actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.action-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 26px;
    box-shadow: var(--shadow);
    transition: .25s ease;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,45,111,0.06), rgba(255,122,0,0.02));
    opacity: 0;
    transition: .25s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,0.16);
    background: rgba(255,255,255,0.07);
}

.action-card:hover::before {
    opacity: 1;
}

.action-number,
.action-card h3,
.action-card p,
.action-button {
    position: relative;
    z-index: 1;
}

.action-number {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
    box-shadow: 0 8px 22px rgba(255, 90, 40, 0.20);
}

.action-card h3 {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
}

.action-card p {
    color: var(--text-soft);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

/* WELCOME */
.welcome-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 26px;
    box-shadow: var(--shadow);
}

.welcome-panel h2 {
    font-size: 34px;
    font-weight: 800;
    margin-bottom: 12px;
}

.welcome-panel p {
    color: var(--text-soft);
    line-height: 1.8;
    font-size: 15px;
}

/* BADGES */
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.badge-success {
    background: rgba(0, 210, 106, 0.12);
    border: 1px solid rgba(0, 210, 106, 0.20);
    color: #97f1bd;
}

.badge-danger {
    background: rgba(255, 75, 95, 0.12);
    border: 1px solid rgba(255, 75, 95, 0.20);
    color: #ffb0b8;
}

.badge-warning {
    background: rgba(255, 179, 64, 0.12);
    border: 1px solid rgba(255, 179, 64, 0.20);
    color: #ffd391;
}

/* FORM LEGACY */
.card {
    width: 100%;
    max-width: 460px;
    margin: 60px auto;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 35px rgba(0,0,0,.35);
    backdrop-filter: blur(10px);
}

.card h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.card p.sub {
    color: #b9b9c9;
    margin-bottom: 22px;
}

label {
    display: block;
    margin-bottom: 8px;
    margin-top: 14px;
    font-size: 14px;
    color: #d9d9e3;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.10);
    outline: none;
    background: rgba(255,255,255,0.06);
    color: #fff;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent-1);
    box-shadow: 0 0 0 3px rgba(255,45,111,0.15);
}

button {
    display: inline-block;
    width: 100%;
    margin-top: 18px;
    padding: 13px 14px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
    color: #fff;
    font-weight: bold;
    cursor: pointer;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert.error {
    background: rgba(255, 59, 92, 0.13);
    border: 1px solid rgba(255, 59, 92, 0.25);
    color: #ff9fb1;
}

.alert.success {
    background: rgba(0, 210, 110, 0.13);
    border: 1px solid rgba(0, 210, 110, 0.25);
    color: #9ff0c3;
}

.link {
    text-align: center;
    margin-top: 16px;
    color: #b9b9c9;
}

.link a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }

    .sidebar-menu {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .main-content {
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        flex-direction: column;
    }

    .small-btn {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-menu {
        grid-template-columns: 1fr;
    }

    .page-title {
        font-size: 28px;
    }

    .welcome-panel h2 {
        font-size: 28px;
    }

    .stat-value {
        font-size: 22px;
    }
}

.orders-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.order-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 24px;
    box-shadow: var(--shadow);
    transition: .22s ease;
}

.order-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.order-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.order-id {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 8px;
    font-weight: 600;
}

.order-service {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
}

.order-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.order-info-item {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 16px;
    min-width: 0;
}

.info-label {
    display: block;
    font-size: 13px;
    color: var(--text-soft);
    margin-bottom: 8px;
    font-weight: 600;
}

.info-value {
    display: block;
    font-size: 16px;
    color: #fff;
    font-weight: 700;
    line-height: 1.5;
}

.break-text {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.order-result-box {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 18px;
    padding: 18px;
}

.order-result-title {
    font-size: 14px;
    color: var(--text-soft);
    margin-bottom: 10px;
    font-weight: 700;
}

.order-result-text {
    color: #fff;
    line-height: 1.7;
    font-size: 15px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.empty-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 320px;
}

.empty-state-card {
    width: 100%;
    max-width: 640px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 32px;
    box-shadow: var(--shadow);
    text-align: center;
}

.empty-state-card h2 {
    font-size: 32px;
    margin-bottom: 12px;
    font-weight: 800;
}

.empty-state-card p {
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .order-service {
        font-size: 22px;
    }

    .order-info-grid {
        grid-template-columns: 1fr;
    }
}

.services-grid {
    display: grid;
    /* 👈 Antes estaba en "repeat(2...)" forzando cuadros gigantes. Ahora se ajustarán solos */
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); 
    gap: 16px; /* 👈 Espacio entre cuadros (antes 20px) */
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px; 
    padding: 16px; /* 👈 RELLENO DEL CUADRO: Esto lo hace más chico (antes 24px) */
    box-shadow: var(--shadow);
    transition: .22s ease;
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.service-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.service-id {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 700;
}

.service-price {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px; /* 👈 ALTURA DEL PRECIO (antes 42px) */
    padding: 0 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    color: #fff;
    font-size: 14px; /* 👈 TAMAÑO LETRA DEL PRECIO (antes 20px) */
    font-weight: 800;
}

.service-name {
    font-size: 16px; /* 👈 TAMAÑO TÍTULO DEL SERVICIO (antes era un gigante 28px) */
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 8px; /* 👈 Margen hacia abajo */
    overflow-wrap: anywhere;
    word-break: break-word;
}

.service-desc {
    color: var(--text-soft);
    font-size: 12px; /* 👈 TAMAÑO DESCRIPCIÓN (antes 15px) */
    line-height: 1.5;
    min-height: 40px; /* 👈 ALTURA MÍNIMA DEL TEXTO (antes forzaba 70px de espacio vacío) */
    margin-bottom: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.service-actions {
    display: flex;
    justify-content: flex-start;
}

.buy-btn {
    min-width: 80px !important;  /* 👈 ANCHO DEL BOTÓN (antes 150px) */
    min-height: 32px !important; /* 👈 ALTURA DEL BOTÓN (le ponemos !important para forzarlo) */
    padding: 0 12px !important;  /* 👈 ESPACIO A LOS LADOS DEL TEXTO */
    font-size: 12px !important;  /* 👈 TAMAÑO DE LA PALABRA "COMPRAR" */
}

.balance-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}
.dhru-menu-bar {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    background: #0c1530;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    overflow: visible;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
}

.dhru-menu-link,
.dhru-dropbtn {
    min-height: 58px;
    padding: 0 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: #ffffff;
    border: 0;
    border-right: 1px solid rgba(255,255,255,0.06);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: .2s ease;
}

.dhru-menu-link:hover,
.dhru-dropbtn:hover {
    background: rgba(255,255,255,0.06);
}

.dhru-dropdown {
    position: relative;
}

.dhru-dropbtn {
    background: #7278ff;
    color: #111;
    font-weight: 700;
}

.dhru-arrow {
    margin-left: 10px;
    font-size: 16px;
    line-height: 1;
}

.dhru-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 425px;
    background: #1e2a49;
    border-radius: 0 0 16px 16px;
    box-shadow: 0 16px 35px rgba(0,0,0,.35);
    z-index: 50;
    padding: 12px 0;
}

.dhru-dropdown-content a {
    display: block;
    padding: 14px 28px;
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    transition: .2s ease;
}

.dhru-dropdown-content a:hover {
    background: rgba(255,255,255,0.06);
}

.dhru-dropdown:hover .dhru-dropdown-content {
    display: block;
}

.dhru-section-wrap {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.category-block {
    scroll-margin-top: 20px;
}

.category-head {
    margin-bottom: 14px;
}

.category-head h2 {
    font-size: 26px;
    font-weight: 800;
    color: #fff;
}

.category-empty {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px;
    color: var(--text-soft);
    font-size: 15px;
}

@media (max-width: 900px) {
    .dhru-menu-bar {
        flex-direction: column;
    }

    .dhru-menu-link,
    .dhru-dropbtn {
        width: 100%;
        justify-content: space-between;
        border-right: 0;
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }

    .dhru-dropdown {
        width: 100%;
    }

    .dhru-dropdown-content {
        position: static;
        display: block;
        min-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}

.main-content {
    margin-left: 260px;
    width: calc(100% - 260px);
    display: flex;
    justify-content: center;
}

.page-shell {
    width: 100%;
    max-width: 1400px;
}