/* Custom CSS Design System - Secure Cloud Share */
/* Estilo premium con Glassmorphism, Neon Accents y animaciones */

:root {
    --bg-color: #08090d;
    --card-bg: rgba(17, 20, 32, 0.65);
    --card-border: rgba(255, 255, 255, 0.07);
    --card-border-focus: rgba(99, 102, 241, 0.4);
    
    --primary-color: #6366f1; /* Indigo */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.3);
    
    --accent-color: #06b6d4; /* Cyan */
    --accent-glow: rgba(6, 182, 212, 0.3);
    
    --success-color: #10b981; /* Emerald */
    --warning-color: #f59e0b; /* Amber */
    --danger-color: #ef4444; /* Rose */
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Theme-specific tokens */
    --select-option-bg: #0b0c11;
    --sidebar-bg: rgba(10, 12, 22, 0.85);
    --sidebar-bg-mobile: rgba(8, 10, 18, 0.95);
    --input-bg: rgba(0, 0, 0, 0.25);
    --input-hover-bg: rgba(255, 255, 255, 0.01);
    --input-focus-bg: rgba(0, 0, 0, 0.4);
    --input-hover-border: rgba(255, 255, 255, 0.15);
}

body.theme-bright {
    --bg-color: #faf6ee; /* Cream background */
    --card-bg: rgba(255, 255, 255, 0.7); /* Translucent white card */
    --card-border: rgba(0, 0, 0, 0.06);
    --card-border-focus: rgba(99, 102, 241, 0.5);
    
    --primary-color: #4f46e5;
    --primary-hover: #3730a3;
    --primary-glow: rgba(79, 70, 229, 0.15);
    
    --accent-color: #0891b2;
    --accent-glow: rgba(8, 145, 178, 0.15);
    
    --text-main: #1e293b; /* Deep charcoal text */
    --text-muted: #475569;
    --text-dim: #64748b;

    --select-option-bg: #fdfbf7;
    --sidebar-bg: rgba(245, 240, 230, 0.85);
    --sidebar-bg-mobile: rgba(240, 235, 225, 0.95);
    --input-bg: rgba(0, 0, 0, 0.03);
    --input-hover-bg: rgba(0, 0, 0, 0.01);
    --input-focus-bg: rgba(255, 255, 255, 0.85);
    --input-hover-border: rgba(0, 0, 0, 0.12);
}

body.theme-bright .glow-1,
body.theme-bright .glow-2 {
    opacity: 0.07;
}

body.theme-bright .sidebar-user-block #logged-user-info .user-status-indicator {
    border-color: #faf6ee !important;
}

body.theme-bright .modal-close-btn,
body.theme-bright .btn-close-modal {
    color: var(--text-dim) !important;
}

/* Custom Scrollbar for premium dark integration */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: var(--transition-fast);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Glowing Elements */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-1, .glow-2 {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    pointer-events: none;
}

.glow-1 {
    top: -10%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, var(--primary-color) 0%, transparent 70%);
    animation: pulseGlow 15s infinite alternate;
}

.glow-2 {
    bottom: -10%;
    right: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
    animation: pulseGlow 20s infinite alternate-reverse;
}

@keyframes pulseGlow {
    0% { transform: scale(1) translate(0, 0); opacity: 0.12; }
    50% { transform: scale(1.1) translate(3%, 5%); opacity: 0.18; }
    100% { transform: scale(0.9) translate(-2%, -3%); opacity: 0.12; }
}

/* App Container Layout - Sidebar Grid System */
.app-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    gap: 0;
}

/* Sidebar Fijo a la Izquierda */
.app-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--card-border);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition-normal);
}

/* Brand Logo en Sidebar */
.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
    filter: drop-shadow(0 0 8px var(--accent-glow));
    flex-shrink: 0;
}

.logo-text h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, var(--text-main), #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.badge-env {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 99px;
    padding: 3px 8px;
    font-size: 0.65rem;
    font-weight: 500;
    color: var(--text-muted);
    display: inline-block;
    margin-top: 2px;
}

/* Bloque de Usuario en Sidebar */
.sidebar-user-block {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    align-items: center;
}

.sidebar-user-block .btn-secondary {
    padding: 8px 12px;
    font-size: 0.8rem;
}

.btn-logout-pill {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

.btn-logout-pill:hover {
    background: rgba(239, 68, 68, 0.18);
    border-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.1);
}

.btn-logout-pill .btn-icon {
    width: 13px;
    height: 13px;
}

/* Navegación del Sidebar */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.nav-category {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-title {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dim);
    margin-left: 8px;
    margin-bottom: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 10px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
}

.nav-item:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
    transform: translateX(4px);
}

.nav-item.active {
    color: var(--text-main);
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.18);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.05);
}

.nav-item.active .nav-icon {
    color: var(--primary-color);
    filter: drop-shadow(0 0 4px rgba(99, 102, 241, 0.4));
}

.nav-icon {
    width: 18px;
    height: 18px;
    color: inherit;
    transition: var(--transition-fast);
}

/* Panel de Contenido Principal (Derecha) */
.app-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

/* Cabecera Superior del Contenido */
.main-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 40px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(8, 9, 13, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 90;
}

#view-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.btn-toggle-sidebar {
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
    display: none; /* Oculto en escritorio */
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.btn-toggle-sidebar:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Área de contenido del panel */
.main-content {
    padding: 40px;
    flex-grow: 1;
    max-width: 900px;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Tarjeta Principal Modificada */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
}

/* Drag and Drop Zone */
.upload-dropzone {
    border: 2px dashed rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: var(--transition-normal);
}

.upload-dropzone:hover, .upload-dropzone.dragover {
    border-color: var(--accent-color);
    background: rgba(6, 182, 212, 0.03);
    box-shadow: inset 0 0 20px rgba(6, 182, 212, 0.02);
}

.dropzone-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.upload-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-color);
    filter: drop-shadow(0 0 10px var(--accent-glow));
    margin-bottom: 4px;
    transition: transform 0.3s ease;
}

.upload-dropzone:hover .upload-icon {
    transform: translateY(-5px);
}

.dropzone-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.dropzone-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dropzone-limit {
    font-size: 0.75rem;
    color: var(--text-dim);
    margin-top: 4px;
}

/* File List styling */
.file-list-container {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 14px;
    padding: 16px;
}

.file-list-container h3 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 180px;
    overflow-y: auto;
    padding-right: 4px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 0.88rem;
    transition: var(--transition-fast);
}

.file-item:hover {
    background: rgba(255, 255, 255, 0.04);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-remove-file:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.remove-icon {
    width: 16px;
    height: 16px;
}

/* Clipboard Textarea */
.textarea-wrapper {
    position: relative;
    border-radius: 18px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    overflow: hidden;
    transition: var(--transition-normal);
}

.textarea-wrapper:focus-within {
    border-color: var(--card-border-focus);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.1);
}

#text-content {
    width: 100%;
    height: 180px;
    background: none;
    border: none;
    outline: none;
    padding: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    line-height: 1.6;
}

.textarea-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

/* Settings Panel */
.settings-panel {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.settings-panel h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 580px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

.setting-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setting-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

/* Inputs & Select styling */
.select-wrapper, .input-password-wrapper {
    position: relative;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    background: var(--input-bg);
    transition: var(--transition-fast);
}

.select-wrapper:hover, .input-password-wrapper:hover {
    border-color: var(--input-hover-border);
    background: var(--input-hover-bg);
}

.select-wrapper:focus-within, .input-password-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 12px var(--primary-glow);
    background: var(--input-focus-bg);
}

select, input[type="password"], input[type="text"] {
    width: 100%;
    background: none;
    border: none;
    outline: none;
    padding: 11px 14px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
}

/* Autofill Overrides for premium dark integration */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-text-fill-color: var(--text-main) !important;
    -webkit-box-shadow: 0 0 0px 1000px var(--select-option-bg) inset !important;
    transition: background-color 5000s ease-in-out 0s;
    border-radius: 9px;
}

select {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    padding-right: 36px;
}

select option {
    background-color: var(--select-option-bg) !important;
    color: var(--text-main) !important;
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    pointer-events: none;
}

.input-password-wrapper {
    display: flex;
    align-items: center;
}

.btn-toggle-pass {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 8px;
    margin-right: 6px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.btn-toggle-pass:hover {
    color: var(--text-main);
}

.icon-eye {
    width: 18px;
    height: 18px;
}

/* Toggles Grid */
.toggles-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toggle-control {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 12px 16px;
    border-radius: 14px;
    gap: 16px;
}

.toggle-control.highlight {
    background: rgba(99, 102, 241, 0.02);
    border-color: rgba(99, 102, 241, 0.08);
}

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

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

.toggle-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Switch Custom Style */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .3s;
    border-radius: 34px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: var(--text-muted);
    transition: .3s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-color);
    border-color: rgba(99, 102, 241, 0.3);
}

input:checked + .slider:before {
    transform: translateX(20px);
    background-color: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

/* Progress bar */
.progress-container {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

#progress-status {
    color: var(--text-muted);
    font-weight: 500;
}

#progress-percent {
    color: var(--accent-color);
    font-weight: 600;
}

.progress-bar-wrapper {
    height: 6px;
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 99px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 99px;
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.1s ease;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.25);
    transition: var(--transition-normal);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.35);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    transition: var(--transition-fast);
}

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

.btn-text {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transition: var(--transition-fast);
}

.btn-text:hover {
    color: var(--danger-color);
}

.btn-icon {
    width: 18px;
    height: 18px;
}

.btn-full-width {
    width: 100%;
}

/* Results view */
.result-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.success-icon-wrapper {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--success-color);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.1);
}

.success-icon {
    width: 24px;
    height: 24px;
}

.result-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
}

.result-header p {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 400px;
}

.result-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.link-input-wrapper {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    overflow: hidden;
}

.link-input-wrapper input {
    flex-grow: 1;
    background: none;
    border: none;
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 12px 16px;
}

.btn-copy {
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 0 18px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

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

.copy-icon {
    width: 15px;
    height: 15px;
}

.result-actions {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 20px;
    align-items: center;
}

@media (max-width: 500px) {
    .result-actions {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}

.qr-container {
    background: #ffffff;
    padding: 8px;
    border-radius: 12px;
    width: 140px;
    height: 140px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.qr-container img {
    max-width: 100%;
    max-height: 100%;
}

.security-meta-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.meta-item {
    font-size: 0.82rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 6px;
}

.meta-item strong {
    color: var(--text-muted);
}

.meta-item span {
    color: var(--text-main);
    font-weight: 500;
}

.card-footer {
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 16px;
}

/* Recipient View (Destinatario) */
.recipient-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.recipient-icon {
    width: 56px;
    height: 56px;
    color: var(--accent-color);
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

#recipient-title {
    font-size: 1.3rem;
    font-weight: 700;
}

.badge-secure {
    background: rgba(6, 182, 212, 0.1);
    color: var(--accent-color);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 99px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
}

.recipient-sub-block {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 18px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.block-info {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Password Auth Block */
.auth-message {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
}

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

.auth-form-row input {
    flex-grow: 1;
    border: 1px solid var(--card-border);
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.auth-form-row input:focus {
    border-color: var(--card-border-focus);
}

.error-text {
    color: var(--danger-color);
    font-size: 0.8rem;
    margin-top: -4px;
}

/* Text Viewer (Decrypted Text display) */
.text-content-viewer-wrapper {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 16px;
    max-height: 250px;
    overflow-y: auto;
}

#decoded-text-view {
    color: var(--text-main);
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.5;
}

/* Download file list */
.download-file-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.download-file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 12px 16px;
}

.btn-download {
    background: var(--accent-color);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.15);
    transition: var(--transition-fast);
}

.btn-download:hover {
    background: #0891b2;
    transform: translateY(-1px);
}

.btn-download:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.download-icon {
    width: 14px;
    height: 14px;
}

.recipient-footer {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
}

.burn-alert-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(239, 68, 68, 0.07);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.78rem;
    color: #fca5a5;
    line-height: 1.4;
    text-align: left;
}

.burn-icon-svg {
    width: 20px;
    height: 20px;
    color: var(--danger-color);
    flex-shrink: 0;
}

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

/* History view (Tabla) */
.history-card {
    padding: 22px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.history-header h2 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.no-history-text {
    font-size: 0.85rem;
    color: var(--text-dim);
    text-align: center;
    padding: 16px 0;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
    text-align: left;
}

.history-table th, .history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.history-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 600;
}

.history-table tbody tr {
    transition: var(--transition-fast);
}

.history-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.015);
}

.history-table td {
    color: var(--text-main);
}

.history-type-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 600;
}

.badge-text-type {
    background: rgba(99, 102, 241, 0.1);
    color: #a5b4fc;
}

.badge-file-type {
    background: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
}

.history-link {
    color: var(--accent-color);
    text-decoration: none;
    max-width: 150px;
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.history-link:hover {
    text-decoration: underline;
}

.history-actions {
    display: flex;
    gap: 8px;
}

.btn-history-action {
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-history-action:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.btn-history-delete:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.history-icon {
    width: 14px;
    height: 14px;
}

/* Footer general */
.app-footer {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-dim);
    padding: 10px 0;
}

/* Toast System */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast {
    background: rgba(20, 24, 38, 0.95);
    border: 1px solid var(--card-border);
    border-left: 4px solid var(--primary-color);
    border-radius: 10px;
    padding: 12px 18px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    min-width: 250px;
    max-width: 380px;
    backdrop-filter: blur(10px);
    animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.3s ease;
}

.toast.success {
    border-left-color: var(--success-color);
}

.toast.warning {
    border-left-color: var(--warning-color);
}

.toast.danger {
    border-left-color: var(--danger-color);
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.toast.success .toast-icon { color: var(--success-color); }
.toast.warning .toast-icon { color: var(--warning-color); }
.toast.danger .toast-icon { color: var(--danger-color); }

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

/* Animation utilities */
.fade-in {
    animation: fadeIn 0.4s ease;
}

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

/* --- ESTILOS ADICIONALES (LOGIN Y PORTAPAPELES PÚBLICO) --- */

.header-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

#auth-header-block {
    display: flex;
    align-items: center;
}

.user-name-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--accent-color);
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Locked Features Block (Dashed layout) */
.locked-feature-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 2px dashed rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.12);
    border-radius: 18px;
    padding: 40px 24px;
    margin: 10px 0;
    animation: fadeIn 0.4s ease;
}

.locked-icon {
    width: 44px;
    height: 44px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

.locked-feature-block h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.locked-feature-block p {
    font-size: 0.85rem;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.4;
}

/* Public Clipboard */
.tab-info-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
}

#public-text-content {
    width: 100%;
    height: 220px;
    background: none;
    border: none;
    outline: none;
    padding: 16px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.95rem;
    resize: none;
    line-height: 1.6;
}

/* Modal Overlay & Modal Window */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(4, 5, 8, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

.modal-card {
    background: rgba(17, 20, 32, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6) !important;
}

.btn-close-modal:hover {
    color: var(--text-main) !important;
    background: rgba(255, 255, 255, 0.05);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 580px) {
    .header-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 6px;
    }
}

/* --- ESTILOS DE MULTI-CLIPS --- */
.clips-form-wrapper {
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 14px;
}

.clip-card-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.clip-card-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
}

.clip-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clip-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.clip-card-body {
    font-size: 0.85rem;
    color: var(--text-muted);
    word-break: break-all;
    max-height: 80px;
    overflow-y: auto;
    font-family: monospace;
    background: rgba(0,0,0,0.2);
    padding: 8px;
    border-radius: 6px;
}

/* --- ESTILOS DE GOOGLE KEEP NOTES --- */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 10px;
}

.note-card {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 140px;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    animation: fadeIn 0.3s ease;
}

.note-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}

.note-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffffff;
    margin-right: 28px;
    word-break: break-word;
}

.note-card-content {
    font-size: 0.85rem;
    color: #cbd5e1;
    margin-top: 8px;
    flex-grow: 1;
    word-break: break-word;
    line-height: 1.5;
}

.note-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.note-card-date {
    font-size: 0.7rem;
    color: var(--text-dim);
}

.note-card-actions {
    display: flex;
    gap: 6px;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.note-card:hover .note-card-actions {
    opacity: 1;
}

.btn-note-action {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-note-action:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.08);
}

.btn-note-delete:hover {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

.btn-pin-note {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-dim);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    transition: var(--transition-fast);
}

.btn-pin-note:hover, .btn-pin-note.active {
    color: var(--warning-color);
}

/* Color Dot Palette inside Keep Note Card */
.color-picker-palette .color-dot {
    transition: transform 0.1s ease;
}
.color-picker-palette .color-dot:hover {
    transform: scale(1.2);
}
.color-picker-palette .color-dot.active {
    border-color: #ffffff !important;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
}

/* --- ESTILOS DE MARKDOWN --- */
.markdown-preview-area ul, .note-card-content ul {
    margin-left: 20px;
    margin-bottom: 8px;
    list-style-type: disc !important;
}

.markdown-preview-area li, .note-card-content li {
    margin-bottom: 4px;
}

.markdown-preview-area pre, .note-card-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    font-family: monospace;
    font-size: 0.8rem;
    overflow-x: auto;
    margin: 8px 0;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.markdown-preview-area code, .note-card-content code {
    background: rgba(255, 255, 255, 0.08);
    padding: 2px 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.85rem;
}

/* --- RESPONSIVIDAD PARA EL MENÚ LATERAL Y REJILLA --- */
@media (max-width: 950px) {
    .app-container {
        grid-template-columns: 1fr !important;
    }
    
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 280px;
        transform: translateX(-100%);
        z-index: 1000;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.6);
        background: var(--sidebar-bg-mobile);
    }
    
    .app-sidebar.open {
        transform: translateX(0);
    }
    
    .btn-toggle-sidebar {
        display: block !important;
    }
    
    .main-header {
        padding: 16px 20px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .card {
        padding: 24px;
    }
}

/* --- SISTEMA DE TIPOGRAFÍA Y ESPACIADO GLOBAL --- */

/* Títulos de tarjetas principales */
.card h2 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    color: var(--text-main);
    margin: 0;
}

/* Subtítulos de tarjetas principales */
.card-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 400;
    line-height: 1.45;
    margin: 0;
}

/* Grupo contenedor de encabezados para tarjetas */
.card-header-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px; /* Espacio limpio antes del formulario o tabla */
}

/* Títulos internos de segundo nivel dentro de tarjetas */
.card h3 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.025em;
    margin: 0 0 12px 0;
}

/* Encabezados de modales */
.modal-overlay h2 {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    line-height: 1.25;
    color: var(--text-main);
    margin: 0;
}

.modal-overlay p {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin: 4px 0 0 0;
}

#create-user-form input, #system-settings-form input {
    background: none;
    border: none;
    width: 100%;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    padding: 11px 14px;
}

/* Theme Toggle Button */
.btn-theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    padding: 0;
}

.btn-theme-toggle:hover {
    color: var(--accent-color);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-glow);
}

/* Adjust icons based on active class on body */
body.theme-bright .btn-theme-toggle {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}

body.theme-bright .btn-theme-toggle:hover {
    color: var(--primary-color);
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--primary-color);
    box-shadow: 0 0 10px var(--primary-glow);
}

/* Toggle transformations */
body.theme-bright .sun-icon {
    transform: scale(0) rotate(-90deg) !important;
    opacity: 0 !important;
}

body.theme-bright .moon-icon {
    transform: scale(1) rotate(0deg) !important;
    opacity: 1 !important;
}

/* Badges for User Roles */
.badge-role {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.badge-admin {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.badge-team {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.badge-client {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

body.theme-bright .badge-admin {
    background: rgba(79, 70, 229, 0.1);
    color: #4f46e5;
    border: 1px solid rgba(79, 70, 229, 0.2);
}

body.theme-bright .badge-team {
    background: rgba(8, 145, 178, 0.1);
    color: #0891b2;
    border: 1px solid rgba(8, 145, 178, 0.2);
}

body.theme-bright .badge-client {
    background: rgba(5, 150, 105, 0.1);
    color: #059669;
    border: 1px solid rgba(5, 150, 105, 0.2);
}

/* Edit User Modal inputs */
#edit-user-form input {
    background: none;
    border: none;
    width: 100%;
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    padding: 11px 14px;
}



