/* Estilos para el panel de administración */
:root {
    --bg-color: #0b0f19;
    --card-bg: rgba(17, 24, 39, 0.7);
    --primary: #10b981;
    --primary-hover: #059669;
    --primary-glow: rgba(16, 185, 129, 0.15);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --border: rgba(255, 255, 255, 0.08);
    --input-bg: rgba(0, 0, 0, 0.3);
    
    /* Estados */
    --status-nuevo: #3b82f6;
    --status-en-demo: #f59e0b;
    --status-finalizado: #10b981;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    padding: 30px;
    position: relative;
    overflow-y: auto;
}

/* Background animated glow orbs */
.background-orbs {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    top: 0;
    left: 0;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
}

.orb-1 { width: 500px; height: 500px; background: var(--primary); top: -50px; left: -50px; }
.orb-2 { width: 400px; height: 400px; background: #6366f1; bottom: 0; right: 0; }

.container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), #3b82f6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

h1 {
    font-size: 20px;
    font-weight: 700;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 15, 25, 0.95);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: #111827;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 35px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    text-align: center;
}

/* Card layout */
.card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-bottom: 25px;
}

/* Table styles */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

th {
    padding: 12px 16px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

td {
    padding: 16px;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border);
    color: var(--text-main);
}

tr:hover td {
    background: rgba(255,255,255,0.02);
}

/* Badges */
.badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    text-transform: uppercase;
}

.badge-nuevo {
    background: rgba(59, 130, 246, 0.15);
    color: var(--status-nuevo);
}

.badge-en_demo {
    background: rgba(245, 158, 11, 0.15);
    color: var(--status-en-demo);
}

.badge-finalizado {
    background: rgba(16, 185, 129, 0.15);
    color: var(--status-finalizado);
}

/* Inputs & Buttons */
.form-control {
    background-color: var(--input-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: white;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary);
}

.btn {
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-primary {
    background: var(--primary);
    color: #0b0f19;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: white;
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.15);
}

/* Detail overlay / panel */
.detail-modal {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 650px;
    height: 100%;
    background: #111827;
    border-left: 1px solid var(--border);
    box-shadow: -10px 0 40px rgba(0,0,0,0.5);
    z-index: 50;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.detail-modal.active {
    transform: translateX(0);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Chat view in modal */
.chat-container {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    height: 350px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #efeae2;
    background-image: url('https://user-images.githubusercontent.com/15075759/28719144-86dc0f70-73b1-11e7-911d-60d70fcded21.png');
    background-size: contain;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-bubble {
    max-width: 85%;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #111827;
}

.chat-bubble.user {
    background-color: #d9fdd3;
    align-self: flex-end;
}

.chat-bubble.bot {
    background-color: white;
    align-self: flex-start;
}

/* Detail key/value grid */
.detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px 15px;
    font-size: 13.5px;
}

.detail-label {
    color: var(--text-muted);
    font-weight: 600;
}

.detail-value {
    color: white;
}

.section-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 12px;
}
