@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Brand Colors */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-light: rgba(99, 102, 241, 0.12);

    --accent: #0ea5e9;
    --accent-hover: #0284c7;
    --accent-glow: rgba(14, 165, 233, 0.35);
    --accent-gradient: linear-gradient(135deg, #6366f1 0%, #0ea5e9 100%);

    /* Backgrounds & Surfaces */
    --bg-dark: #090d16;
    --bg-panel: #111827;
    --bg-card: rgba(17, 24, 39, 0.72);
    --bg-card-hover: rgba(22, 30, 48, 0.82);
    --bg-input: rgba(13, 17, 26, 0.75);

    /* Text Hierarchy */
    --text-main: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    /* Borders & Lines */
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.16);
    --border-subtle: rgba(255, 255, 255, 0.04);

    /* System Feedback */
    --success: #10b981;
    --success-hover: #059669;
    --success-glow: rgba(16, 185, 129, 0.3);

    --warning: #f59e0b;
    --warning-hover: #d97706;
    --warning-glow: rgba(245, 158, 11, 0.3);

    --danger: #ef4444;
    --danger-hover: #dc2626;
    --danger-glow: rgba(239, 68, 68, 0.3);

    --info: #38bdf8;
    --info-glow: rgba(56, 189, 248, 0.3);

    /* Geometric & Elevation */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.4), 0 2px 6px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 20px 35px -5px rgba(0, 0, 0, 0.5), 0 8px 16px -3px rgba(0, 0, 0, 0.3);
}

/* Base Reset & Custom Scrollbars */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.55;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Glassmorphism & Visual Utilities */
.glass {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
}

.text-gradient {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: 'Outfit', 'Inter', sans-serif;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: -0.025em;
    line-height: 1.25;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.25rem;
}

h4 {
    font-size: 1.05rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

/* ==========================================================================
   MODERN BUTTONS SYSTEM
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
    line-height: 1.25;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    user-select: none;
    white-space: nowrap;
    position: relative;
    outline: none;
}

.btn:active {
    transform: translateY(1px) scale(0.985);
}

/* Primary Button (Linear Gradient + Glow + Shimmer highlight) */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px 0 rgba(79, 70, 229, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.3);
    filter: brightness(1.08);
    color: #ffffff !important;
}

.btn-primary:active {
    transform: translateY(0) scale(0.985);
    box-shadow: 0 2px 8px 0 rgba(79, 70, 229, 0.3);
}

/* Secondary Button (Refined Glass) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.btn-secondary:active {
    transform: translateY(0) scale(0.985);
}

/* Success Button (Emerald Glow) */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px 0 rgba(16, 185, 129, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-success:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px 0 rgba(16, 185, 129, 0.48);
    filter: brightness(1.08);
    color: #ffffff !important;
}

/* Danger Button (Rose Glow) */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px 0 rgba(239, 68, 68, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-danger:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px 0 rgba(239, 68, 68, 0.48);
    filter: brightness(1.08);
    color: #ffffff !important;
}

/* Warning Button (Amber Glow) */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-warning:hover {
    transform: translateY(-1.5px);
    box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.48);
    filter: brightness(1.08);
    color: #ffffff !important;
}

/* ==========================================================================
   MODERN FORM INPUTS
   ========================================================================== */
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

input:hover,
select:hover,
textarea:hover {
    border-color: var(--border-hover);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background-color: rgba(15, 20, 32, 0.95);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-subtle);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================================================
   APP LAYOUT & MODERN SIDEBAR
   ========================================================================== */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: radial-gradient(circle at 12% 10%, rgba(99, 102, 241, 0.04) 0%, transparent 40%),
        radial-gradient(circle at 88% 90%, rgba(14, 165, 233, 0.03) 0%, transparent 40%),
        var(--bg-dark);
}

.sidebar {
    width: 270px;
    background: linear-gradient(180deg, #0d111a 0%, #090d16 100%);
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.35);
    z-index: 20;
    flex-shrink: 0;
}

/* Brand Header */
.sidebar .brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.75rem;
    padding: 0.25rem 0.5rem;
    user-select: none;
}

.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(14, 165, 233, 0.25) 100%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.28);
    flex-shrink: 0;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.brand-sub {
    font-size: 1.25rem;
    font-weight: 400;
    color: #f8fafc;
    letter-spacing: -0.02em;
}

/* Nav Menu & Sections */
.nav-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-subtle);
    padding: 0.85rem 0.75rem 0.35rem 0.75rem;
    user-select: none;
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-item {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    color: var(--text-muted);
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    border: 1px solid transparent;
}

.nav-icon {
    flex-shrink: 0;
    color: var(--text-subtle);
    transition: var(--transition);
}

.nav-link:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.05);
    transform: translateX(3px);
}

.nav-link:hover .nav-icon {
    color: var(--accent);
    transform: scale(1.08);
}

.nav-link.active {
    color: #ffffff;
    font-weight: 600;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.18) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-link.active .nav-icon {
    color: #818cf8;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.6));
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

/* User Profile Footer */
.sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
    transition: var(--transition);
    flex: 1;
    min-width: 0;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
}

.user-profile-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #4f46e5 0%, #0ea5e9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.35);
}

.user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-name {
    font-size: 0.825rem;
    font-weight: 600;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: capitalize;
}

.btn-logout {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(255, 255, 255, 0.02);
    transition: var(--transition);
    flex-shrink: 0;
    text-decoration: none;
}

.btn-logout:hover {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    transform: translateY(-1px);
    box-shadow: 0 2px 10px rgba(239, 68, 68, 0.2);
}

/* ==========================================================================
   MAIN CONTENT & CARDS
   ========================================================================== */
.main-content {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
}

.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    border-color: var(--border-hover);
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table-responsive {
    overflow-x: auto;
    border-radius: 10px;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 0.75rem;
}

th,
td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
}

th:first-child {
    border-top-left-radius: 10px;
}

th:last-child {
    border-top-right-radius: 10px;
}

td {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

tr {
    transition: var(--transition-fast);
}

tr:hover td {
    background-color: rgba(99, 102, 241, 0.035);
    color: #ffffff;
}

/* ==========================================================================
   STATUS BADGES & ALERTS
   ========================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.badge-default {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.badge-unycop {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.badge-coop,
.badge-info {
    background: rgba(14, 165, 233, 0.12);
    color: #38bdf8;
    border: 1px solid rgba(14, 165, 233, 0.25);
}

.badge-done,
.badge-success {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    align-items: center;
}

.page-link,
.pagination a {
    padding: 0.4rem 0.85rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.825rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.page-link:hover,
.pagination a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateY(-1px);
}

.page-link.active,
.pagination .active {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #ffffff !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.35);
}

/* ==========================================================================
   INTERACTIVE TOAST NOTIFICATIONS (Punto 4)
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 3rem);
}

.toast {
    pointer-events: auto;
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem 1rem 1rem;
    border-radius: 14px;
    background: rgba(17, 24, 39, 0.94);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 36px -4px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
    animation: toastSlideIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-hiding {
    animation: toastSlideOut 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes toastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
}

.toast-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.toast-success .toast-icon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.toast-info .toast-icon {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    border: 1px solid rgba(99, 102, 241, 0.25);
}

.toast-body {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.15rem;
    line-height: 1.3;
}

.toast-msg {
    font-size: 0.825rem;
    color: var(--text-secondary);
    line-height: 1.4;
    word-break: break-word;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-subtle);
    cursor: pointer;
    padding: 0.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition);
}

.toast-close:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    transform-origin: left;
}

.toast-success .toast-progress {
    background: #10b981;
}

.toast-error .toast-progress {
    background: #ef4444;
}

/* ==========================================================================
   ONE-CLICK COPY & TABLE ICON BUTTONS (Punto 1)
   ========================================================================== */
.btn-action-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1;
}

.btn-action-icon:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent);
    transform: scale(1.08);
}

.btn-copy-mini {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    transition: var(--transition);
    user-select: none;
}

.btn-copy-mini:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.btn-copy-mini.copied {
    color: #34d399 !important;
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: rgba(16, 185, 129, 0.3) !important;
}

.coop-badge-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    padding: 0.25rem 0.55rem;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.coop-badge-copy:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: #ffffff;
}

.coop-badge-copy:hover .copy-icon-hover {
    color: var(--accent);
    opacity: 1;
}

.copy-icon-hover {
    opacity: 0.4;
    transition: opacity 0.2s;
    color: var(--text-muted);
}

/* ==========================================================================
   SEARCH BAR SPINNER & CLEAR BUTTON (Punto 5)
   ========================================================================== */
.search-box-wrapper {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}

.search-box-wrapper input {
    padding-left: 2.6rem !important;
    padding-right: 4.8rem !important;
}

.search-box-icon {
    position: absolute;
    left: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-subtle);
    pointer-events: none;
    transition: var(--transition);
}

.search-box-wrapper input:focus ~ .search-box-icon {
    color: var(--primary);
}

.search-box-actions {
    position: absolute;
    right: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.search-clear-btn {
    background: rgba(255, 255, 255, 0.06);
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 0.7rem;
    line-height: 1;
}

.search-clear-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    transform: scale(1.1);
}

.search-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: searchSpin 0.7s linear infinite;
    display: none;
}

@keyframes searchSpin {
    to { transform: rotate(360deg); }
}

.search-box-wrapper.is-loading .search-spinner {
    display: block;
}

.search-shortcut-badge {
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    color: var(--text-subtle);
    pointer-events: none;
    user-select: none;
}

/* ==========================================================================
   CLICKABLE TABLE ROWS & HOVER CUES (Punto 6)
   ========================================================================== */
.clickable-row {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.clickable-row:hover td {
    background-color: rgba(99, 102, 241, 0.06) !important;
}

.clickable-row:active td {
    background-color: rgba(99, 102, 241, 0.12) !important;
}

.row-quick-hint {
    font-size: 0.7rem;
    color: var(--text-subtle);
    opacity: 0;
    transition: opacity 0.2s;
    margin-left: 0.5rem;
}

.clickable-row:hover .row-quick-hint {
    opacity: 0.8;
}