/* System Design Tokens & Variables */
:root {
    --bg-app: #090d16;
    --bg-card: rgba(20, 28, 45, 0.65);
    --bg-card-hover: rgba(30, 41, 59, 0.85);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(6, 182, 212, 0.5);
    
    /* Core Colors */
    --color-primary: #06b6d4;      /* Neon Cyan */
    --color-secondary: #8b5cf6;    /* Purple */
    --color-success: #10b981;      /* Emerald Green */
    --color-error: #ef4444;        /* Soft Red */
    --color-warning: #f59e0b;      /* Amber */
    
    /* Text Colors */
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #111827;
    
    /* Typography */
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    /* Shadows */
    --shadow-main: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 15px rgba(6, 182, 212, 0.2);
}

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

body {
    background-color: var(--bg-app);
    color: var(--text-main);
    font-family: var(--font-sans);
    line-height: 1.5;
    height: 100vh;
    overflow: hidden;
    position: relative;
}

/* Decorative background glow */
body::before {
    content: '';
    position: absolute;
    top: -150px;
    left: -150px;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.15) 0%, rgba(9, 13, 22, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -150px;
    right: -150px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, rgba(9, 13, 22, 0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* Layout Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo-icon {
    font-size: 2rem;
    filter: drop-shadow(0 0 8px var(--color-primary));
    animation: pulseIcon 3s infinite ease-in-out;
}

.logo-text h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-text h1 span {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* Server Status Badge */
.server-status {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.85rem;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-indicator.pinging {
    background-color: var(--color-warning);
    box-shadow: 0 0 8px var(--color-warning);
}

.status-indicator.online {
    background-color: var(--color-success);
    box-shadow: 0 0 8px var(--color-success);
    animation: glowSuccess 2s infinite alternate;
}

.status-indicator.offline {
    background-color: var(--color-error);
    box-shadow: 0 0 8px var(--color-error);
}

/* Main Body Layout */
.app-body {
    display: grid;
    grid-template-columns: 280px 1fr;
    flex: 1;
    overflow: hidden;
    transition: grid-template-columns 0.3s ease;
}

.hidden {
    display: none !important;
}

/* Scrollable Sections */
.sidebar, .editor-section, .results-section {
    padding: 1.5rem;
    height: 100%;
    overflow-y: auto;
}

.sidebar {
    border-right: 1px solid var(--border-color);
    background: rgba(9, 13, 22, 0.4);
    display: flex;
    flex-direction: column;
}

.editor-section {
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.results-section {
    background: rgba(9, 13, 22, 0.2);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Section Title */
.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 1.2rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Document Selector Grid */
.document-selector-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.doc-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    color: inherit;
    width: 100%;
}

.doc-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.doc-card.active {
    background: rgba(6, 182, 212, 0.08);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow);
}

.card-icon {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.doc-card.active .card-icon {
    background: rgba(6, 182, 212, 0.15);
    transform: scale(1.1);
}

.card-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.1rem;
}

.card-info p {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.font-factura { color: #38bdf8; }
.font-boleta { color: #f472b6; }
.font-nota { color: #fb7185; }
.font-guia { color: #34d399; }
.font-resumen { color: #fbbf24; }
.font-baja { color: #f87171; }


/* Editor Styling */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.editor-wrapper {
    flex: 1;
    position: relative;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: #060913;
    overflow: hidden;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
}

#jsonEditor {
    width: 100%;
    height: 100%;
    background: transparent;
    border: none;
    color: #e2e8f0;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    padding: 1.2rem;
    resize: none;
    outline: none;
    tab-size: 4;
    line-height: 1.6;
}

#jsonEditor:focus-within {
    box-shadow: 0 0 0 1px var(--color-primary);
}

/* Buttons */
.btn {
    font-family: var(--font-sans);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border-color);
    color: var(--text-muted);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-main);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.25);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4);
    filter: brightness(1.1);
}

.btn-large {
    padding: 0.8rem 1.5rem;
    font-size: 0.95rem;
    border-radius: 10px;
}

.btn-send {
    width: 100%;
}

.send-action-wrapper {
    margin-top: 0.5rem;
}

/* Loader Spinner */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

.spinner.hidden {
    display: none;
}

/* Results Content Area */
.results-container {
    flex: 1;
    min-height: 250px;
    display: flex;
    flex-direction: column;
}

/* Placeholder State */
.result-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    gap: 0.8rem;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.5;
}

.result-placeholder h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.result-placeholder p {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 280px;
}

/* Loading State card */
.result-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem;
    gap: 1rem;
}

.pulse-loader {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-primary);
    box-shadow: 0 0 15px var(--color-primary);
    animation: pulseRing 1.5s infinite ease-in-out;
}

.result-loading h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.result-loading p {
    font-size: 0.8rem;
    color: var(--text-muted);
    max-width: 280px;
}

/* Result Cards Base styles */
.result-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.success-card {
    border-left: 4px solid var(--color-success);
}

.failure-card {
    border-left: 4px solid var(--color-error);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.02);
}

.result-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    letter-spacing: 0.5px;
}

.result-badge.success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.result-badge.error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.result-id {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.result-content {
    padding: 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-content h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cdr-desc {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.8rem;
    border-radius: 8px;
}

/* Notes & Alert box */
.alert-box {
    padding: 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
}

.note-box {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
    color: #fbd38d;
}

.notes-list {
    margin-left: 1.2rem;
    margin-top: 0.4rem;
}

.error-msg-box {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 1rem;
    border-radius: 8px;
    color: #fca5a5;
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.error-msg-box strong {
    font-size: 0.9rem;
}

.error-advice {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* File Download Cards */
.file-downloads {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.file-downloads h4 {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    text-transform: uppercase;
}

.download-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.btn-download {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.8rem;
    border-radius: 10px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.8rem;
    text-align: left;
    width: 100%;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.dl-icon {
    font-size: 1.4rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-download.xml .dl-icon {
    color: var(--color-primary);
    background: rgba(6, 182, 212, 0.1);
}

.btn-download.zip .dl-icon {
    color: var(--color-success);
    background: rgba(16, 185, 129, 0.1);
}

.dl-details strong {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
}

.dl-details span {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* API Response Console */
.api-console-wrapper {
    margin-top: auto;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: #030712;
}

.console-toggle {
    width: 100%;
    background: rgba(255, 255, 255, 0.02);
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.8rem;
    padding: 0.6rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
}

.console-toggle:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
}

.console-toggle .arrow {
    font-size: 0.6rem;
    transition: transform 0.2s ease;
}

.console-toggle.active .arrow {
    transform: rotate(180deg);
}

.console-body {
    border-top: 1px solid var(--border-color);
    max-height: 200px;
    overflow-y: auto;
    padding: 1rem;
}

#consoleJson {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: #a7f3d0;
    white-space: pre-wrap;
    word-break: break-all;
}

/* Helper Utility Classes */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulseIcon {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; filter: drop-shadow(0 0 12px var(--color-primary)); }
}

@keyframes glowSuccess {
    from { box-shadow: 0 0 4px var(--color-success); }
    to { box-shadow: 0 0 12px var(--color-success); }
}

@keyframes pulseRing {
    0% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5); }
    70% { transform: scale(1); opacity: 1; box-shadow: 0 0 0 12px rgba(6, 182, 212, 0); }
    100% { transform: scale(0.95); opacity: 0.8; box-shadow: 0 0 0 0 rgba(6, 182, 212, 0); }
}

@keyframes slideUp {
    from { transform: translateY(15px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Scaling */
@media(max-width: 1100px) {
    .app-body {
        grid-template-columns: 1fr;
        height: auto;
        overflow-y: auto;
    }
    
    body {
        overflow-y: auto;
    }
    
    .sidebar, .editor-section, .results-section {
        height: auto;
        overflow-y: visible;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .editor-wrapper {
        min-height: 350px;
    }
}

@media(max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        text-align: center;
        padding: 1.2rem;
    }
    .logo-area {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media(max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   CLIENT MANAGEMENT CSS
   ========================================== */
.clients-wrapper {
    margin-top: 15px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.clients-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 20px;
    min-height: 450px;
}

@media(max-width: 900px) {
    .clients-layout {
        grid-template-columns: 1fr;
    }
}

.client-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
}

.client-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--color-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 8px;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 12px;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    transition: all 0.25s ease;
    font-family: inherit;
}

.form-group input:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
    outline: none;
}

select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 12px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.25s ease;
}

select:focus {
    border-color: var(--color-primary);
    background: rgba(255, 255, 255, 0.07);
    box-shadow: 0 0 8px rgba(6, 182, 212, 0.25);
}

select option {
    background-color: #1f2937;
    color: #f3f4f6;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.file-help {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Client Table Styling */
.clients-table-wrapper {
    overflow-x: auto;
    max-height: 420px;
    overflow-y: auto;
}

.clients-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
}

.clients-table th {
    background: rgba(255, 255, 255, 0.03);
    text-align: left;
    padding: 10px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.clients-table td {
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

.clients-table tr:hover {
    background: rgba(255, 255, 255, 0.01);
}

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

.badge-active {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-expired {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Spaced out Client Cards List */
.clients-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 480px;
    overflow-y: auto;
    padding-right: 5px;
}

.client-item-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.client-item-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-primary);
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.15);
}

.client-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.client-company-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.client-ruc {
    font-size: 0.75rem;
    color: var(--color-primary);
    font-weight: 700;
}

.client-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
}

.client-item-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.client-item-details strong {
    color: rgba(255, 255, 255, 0.7);
}

.client-token-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.04);
}

.client-token {
    font-family: 'Courier New', Courier, monospace;
    color: #38bdf8;
    overflow-x: auto;
    white-space: nowrap;
    max-width: 180px;
}

.btn-copy {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.btn-copy:hover {
    opacity: 1;
}

.client-card-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.85rem;
}
/* Modal overlay styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: opacity 0.3s ease;
}

.modal-card {
    background: rgba(25, 20, 35, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 12px;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: var(--color-primary);
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.btn-close-modal:hover {
    color: #ef4444;
}

@keyframes zoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* APISPERU Table styling */
.apisperu-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    color: var(--text-main);
}

.apisperu-table th {
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.apisperu-table td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    vertical-align: middle;
}

.apisperu-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Actions buttons matching image colors */
.action-btn-group {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.action-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.95rem;
    transition: transform 0.2s, background-color 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.action-btn:hover {
    transform: scale(1.15);
}

.action-btn-view {
    background-color: #99f6e4 !important; /* light teal */
    color: #0d9488 !important; /* dark teal */
}
.action-btn-view:hover {
    background-color: #2dd4bf !important;
}

.action-btn-edit {
    background-color: #e9d5ff !important; /* light purple */
    color: #9333ea !important; /* dark purple */
}
.action-btn-edit:hover {
    background-color: #d8b4fe !important;
}

.action-btn-delete {
    background-color: #fecdd3 !important; /* light pink/red */
    color: #e11d48 !important; /* dark pink/red */
}
.action-btn-delete:hover {
    background-color: #fda4af !important;
}
