:root {
    --bg-main: #05070d;
    --bg-card: #0c1222;
    --bg-soft: #101935;
    --blue-main: #F5BF43;
    --blue-glow: #E78E32;
    --text-main: #e6ecff;
    --text-soft: #9aa4c7;
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
}

a {
    text-decoration: none;
    color: inherit
}

/* HERO */
.hero {
    padding: 60px 20px;
    text-align: center;
    background:
        radial-gradient(circle at top, #1e3a8a55, transparent 60%),
        linear-gradient(180deg, #05070d, #02030a);
}

.logo-main {
    max-width: 140px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px #F5BF4355);
}

.hero h1 {
    margin: 0;
    font-size: 44px;
    font-weight: 900;
    color: var(--blue-main);
}

.hero p {
    color: var(--text-soft);
    font-size: 18px;
}

/* LAYOUT */
.container {
    max-width: 1200px;
    margin: auto;
    padding: 40px 20px;
}

.container-narrow {
    max-width: 800px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* CARD */
.card {
    background: linear-gradient(180deg, #0c1222, #070b16);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid #F5BF4322;
    transition: .4s;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent, #F5BF4322, transparent);
    opacity: 0;
    transition: .4s;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 40px #F5BF4333;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-body {
    padding: 30px
}

.card-padding {
    padding: 30px
}

.card h1,
.card h2,
.card h3 {
    color: #E78E32;
    margin-top: 0;
}

.card p {
    color: var(--text-soft);
    font-size: 14px
}

/* PROGRESS */
.progress-container {
    background: #020617;
    height: 10px;
    border-radius: 20px;
    overflow: hidden;
    margin: 15px 0 5px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #F5BF43, #E78E32, #22d3ee);
    box-shadow: 0 0 15px #E78E32aa;
}

.progress-text {
    font-size: 13px;
    color: var(--text-soft);
}

/* PRICE & BADGES */
.price-tag {
    font-size: 24px;
    font-weight: bold;
    color: var(--blue-main);
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 10px;
}

.badge-pausada {
    background: #fbbf24;
    color: #000
}

.badge-finalizada {
    background: #ef4444;
    color: #fff
}

/* FORMS & BUTTONS */
.btn-primary,
.card a:not(.back-link) {
    display: block;
    width: 100%;
    margin-top: 15px;
    padding: 12px;
    text-align: center;
    border-radius: 12px;
    background: linear-gradient(90deg, #F5BF43, #E78E32);
    color: #fff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: .3s;
}

.btn-primary:hover,
.card a:hover:not(.back-link) {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-disabled {
    background: #333 !important;
    cursor: not-allowed;
    opacity: 0.6;
}

form input,
form select,
form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    background: var(--bg-main);
    color: #fff;
    border: 1px solid #334155;
    border-radius: 12px;
    font-family: inherit;
}

form input:focus {
    border-color: var(--blue-main);
    outline: none;
}

.total-pago {
    background: #020617;
    padding: 20px;
    border-radius: 15px;
    margin: 15px 0 25px;
    text-align: center;
    font-size: 1.1em;
    border: 1px dashed var(--blue-glow);
}

.total-pago strong {
    color: var(--blue-main);
}

/* BACK LINK */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    color: var(--blue-main);
    font-weight: bold;
    transition: .3s;
}

.back-link:hover {
    color: var(--blue-glow);
    transform: translateX(-5px);
}

/* ALERTS */
.alert {
    padding: 18px;
    background: var(--bg-soft);
    border-radius: 15px;
    margin-bottom: 25px;
    border-left: 4px solid var(--blue-main);
    color: var(--text-main);
}

/* FOOTER */
.footer {
    background: #02030a;
    border-top: 1px solid #F5BF4322;
    padding: 40px 20px 20px;
}

.footer-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.logo-footer {
    max-width: 120px;
    margin-bottom: 15px
}

.footer h4 {
    color: #E78E32;
    margin-top: 0;
}

.footer p {
    color: #9aa4c7;
    font-size: 14px
}

.social a {
    display: inline-block;
    margin: 5px 5px 0 0;
    padding: 8px 14px;
    background: #0c1222;
    border: 1px solid #F5BF4322;
    border-radius: 20px;
    font-size: 13px;
}

.social a:hover {
    background: var(--blue-main);
    color: #000;
}

.btn-support {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 16px;
    background: #F5BF4322;
    border: 1px solid #E78E32;
    color: #E78E32;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: .3s;
}

.btn-support:hover {
    background: #E78E32;
    color: #fff;
    box-shadow: 0 0 15px rgba(231, 142, 50, 0.4);
}

.copy {
    text-align: center;
    margin-top: 30px;
    color: #64748b;
    font-size: 13px;
}

/* ADMIN SPECIFICS */
.admin-sidebar {
    background: #02030a;
    width: 240px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid #F5BF4322;
    padding-top: 20px;
}

.admin-sidebar a {
    display: block;
    padding: 15px 25px;
    color: var(--text-soft);
    transition: .3s;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: #F5BF4311;
    color: var(--blue-main);
}

.admin-main {
    margin-left: 240px;
    padding: 30px;
}

.admin-header {
    background: #02030a;
    padding: 20px 30px;
    border-bottom: 1px solid #F5BF4322;
    margin-left: 240px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    margin-top: 20px;
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #ffffff11;
}

.admin-table th {
    background: #ffffff05;
    color: var(--blue-main);
    text-transform: uppercase;
    font-size: 12px;
}

.admin-table tr:last-child td {
    border: none;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: linear-gradient(180deg, #0c1222, #070b16);
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--blue-glow);
    max-width: 600px;
    width: 100%;
    position: relative;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.modal-content h3 {
    color: var(--blue-main);
    margin-top: 0;
    font-size: 24px;
}

.ganador-info p {
    margin: 12px 0;
    border-bottom: 1px solid #ffffff11;
    padding-bottom: 8px;
    color: var(--text-soft);
}

.ganador-info strong {
    color: var(--blue-main);
}

.close-modal {
    background: var(--bg-soft);
    border: 1px solid var(--blue-main);
    color: var(--blue-main);
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    margin-top: 20px;
    transition: .3s;
}

.close-modal:hover {
    background: var(--blue-main);
    color: #000;
}

/* RESPONSIVENESS */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .container {
        padding: 20px 15px;
    }

    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #F5BF4322;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .admin-main,
    .admin-header {
        margin-left: 0;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

@media (max-width: 480px) {

    .card-padding,
    .card-body {
        padding: 20px;
    }

    .hero {
        padding: 40px 15px;
    }
}
/* SUPPORT CHAT WIDGET */
.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10000;
    font-family: inherit;
}

.chat-button {
    width: 60px;
    height: 60px;
    background: var(--blue-main);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    transition: .3s;
    font-size: 24px;
}

.chat-button:hover {
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 450px;
    background: var(--bg-card);
    border: 1px solid var(--blue-glow);
    border-radius: 20px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}

.chat-header {
    background: var(--bg-soft);
    padding: 15px;
    border-bottom: 1px solid #ffffff11;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-header h4 { margin:0; color: var(--blue-main); }

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    padding: 10px 15px;
    border-radius: 15px;
    max-width: 80%;
    font-size: 14px;
    line-height:1.4;
}

.message.user {
    align-self: flex-end;
    background: var(--blue-main);
    color: #000;
}

.message.admin {
    align-self: flex-start;
    background: #1e293b;
    color: #fff;
}

.chat-input {
    padding: 15px;
    border-top: 1px solid #ffffff11;
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex: 1;
    background: #05070d;
    border: 1px solid #334155;
    color: #fff;
    padding: 8px 12px;
    border-radius: 20px;
}

.chat-input button {
    background: var(--blue-main);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
}
/* SEARCH TICKETS SECTION */
.search-container {
    margin-top: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    margin-bottom: 0 !important;
}

.btn-search {
    width: auto !important;
    margin-top: 0 !important;
    white-space: nowrap;
    padding: 12px 25px !important;
}

.results-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item {
    background: #05070d;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid #F5BF4322;
}

.result-item h4 {
    margin: 0 0 10px 0;
    color: var(--blue-main);
    font-size: 16px;
}

.result-tickets {
    font-family: monospace;
    font-size: 1.2em;
    color: var(--text-main);
    word-break: break-all;
}

.result-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: bold;
    margin-top: 10px;
}

.status-revision { background: #fbbf24; color: #000; }
.status-confirmado { background: #10b981; color: #fff; }
.status-rechazado { background: #ef4444; color: #fff; }

@media (max-width: 480px) {
    .search-form {
        flex-direction: column;
    }
}
