/**
 * Estilos del Sistema de Gestión de Producción Musical
 * Studio Manager
 */

/* ========================================
   Variables CSS
======================================== */
:root {
    --primary: #667eea;
    --primary-dark: #5a67d8;
    --primary-light: #818cf8;
    --secondary: #764ba2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    --sidebar-width: 260px;
    --header-height: 70px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --transition: all 0.2s ease;
}

/* ========================================
   Reset y Base
======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.95), transparent 28%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Login Page
======================================== */
.login-page {
    --login-accent: var(--primary);
    --login-accent-strong: var(--secondary);
    --login-accent-soft: rgba(102, 126, 234, 0.12);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.16), transparent 28%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.1), transparent 24%),
        linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-mode-cliente {
    --login-accent: var(--primary);
    --login-accent-strong: var(--secondary);
    --login-accent-soft: rgba(102, 126, 234, 0.14);
}

.login-mode-admin {
    --login-accent: #4f63d9;
    --login-accent-strong: #2f3f97;
    --login-accent-soft: rgba(79, 99, 217, 0.14);
}

.login-bg-text {
    position: absolute;
    top: 50%;
    left: -5%;
    transform: translateY(-50%);
    font-size: 15vw;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.03);
    letter-spacing: 0.1em;
    line-height: 1;
    z-index: 0;
    pointer-events: none;
}

.login-bg-text span {
    display: block;
}

.login-container {
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 1.75rem;
    box-shadow: 0 28px 50px -28px rgba(15, 23, 42, 0.38);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(12px);
}

.login-header {
    text-align: center;
    padding: 2.25rem 2rem 1.75rem;
    background:
        radial-gradient(circle at top center, rgba(255, 255, 255, 0.16), transparent 36%),
        linear-gradient(135deg, var(--login-accent) 0%, var(--login-accent-strong) 100%);
    color: white;
}

.login-logo {
    width: 82px;
    height: 82px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.1rem;
    font-size: 2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.login-header h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.login-header p {
    opacity: 0.9;
    font-size: 0.98rem;
    max-width: 28ch;
    margin: 0 auto;
}

.login-mode-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.login-tabs {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1rem 0;
    background: rgba(248, 250, 252, 0.92);
    border-bottom: 1px solid var(--gray-200);
}

.login-tab {
    flex: 1;
    padding: 0.95rem 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 1rem 1rem 0.2rem 0.2rem;
    position: relative;
}

.login-tab:hover {
    color: var(--gray-700);
    background: rgba(255, 255, 255, 0.98);
}

.login-tab.active {
    color: var(--login-accent);
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 255, 255, 0.96));
    box-shadow: 0 12px 24px -20px rgba(15, 23, 42, 0.2);
}

.login-tab.active::after {
    content: '';
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: -1px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--login-accent), var(--login-accent-strong));
}

.login-mode-help {
    padding: 0.9rem 2rem 0;
    color: var(--gray-500);
    font-size: 0.88rem;
}

.login-mode-help strong {
    color: var(--gray-800);
}

.login-form {
    padding: 1.35rem 2rem 2rem;
}

.login-footer {
    text-align: center;
    padding: 0 2rem 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* ========================================
   Formularios
======================================== */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-group small {
    display: block;
    margin-top: 0.375rem;
    color: var(--gray-500);
    font-size: 0.75rem;
}

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

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9375rem;
    font-family: inherit;
    color: var(--gray-800);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 3rem;
}

.toggle-password {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    cursor: pointer;
}

.checkbox-label span {
    display: flex;
    flex-direction: column;
}

.checkbox-label span strong {
    font-weight: 500;
}

.checkbox-label span small {
    margin-top: 0.25rem;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    background: var(--gray-50);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.file-upload-area input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-content {
    color: var(--gray-600);
}

.file-upload-content i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.file-upload-content p {
    margin-bottom: 0.5rem;
}

.file-upload-content span {
    color: var(--primary);
    font-weight: 500;
}

.file-preview {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

.file-preview i {
    font-size: 2rem;
    color: var(--primary);
}

.file-preview span {
    flex: 1;
}

.btn-remove-file {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
}

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

/* ========================================
   Botones
======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: inherit;
    border-radius: var(--radius);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
    border: none;
    text-decoration: none;
    white-space: nowrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 10px 22px -14px rgba(102, 126, 234, 0.85);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #6b4190 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(180deg, var(--gray-700) 0%, var(--gray-800) 100%);
    color: white;
    box-shadow: 0 10px 18px -16px rgba(17, 24, 39, 0.85);
}

.btn-secondary:hover {
    background: var(--gray-700);
    color: white;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(102, 126, 234, 0.07);
    box-shadow: 0 8px 20px -18px rgba(102, 126, 234, 0.8);
}

.btn-outline-light {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-success:hover {
    background: #0d9668;
    color: white;
}

.btn-danger {
    background: linear-gradient(180deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 10px 18px -16px rgba(239, 68, 68, 0.8);
}

.btn-danger:hover {
    background: #dc2626;
    color: white;
}

.btn-icon {
    padding: 0.5rem;
    background: transparent;
    color: var(--gray-500);
}

.btn-icon:hover {
    background: var(--gray-100);
    color: var(--gray-700);
}

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

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* ========================================
   Alertas
======================================== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
    backdrop-filter: blur(6px);
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.alert-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

/* Flash Messages */
.flash-message {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.94);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

.flash-message.flash-success {
    border-left: 4px solid var(--success);
}

.flash-message.flash-error {
    border-left: 4px solid var(--danger);
}

.flash-message.flash-warning {
    border-left: 4px solid var(--warning);
}

.flash-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.25rem;
    margin-left: auto;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ========================================
   Layout Admin
======================================== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background:
        radial-gradient(circle at top left, rgba(129, 140, 248, 0.16), transparent 30%),
        linear-gradient(180deg, #0f172a 0%, #172033 100%);
    color: white;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow: hidden;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.sidebar-header .logo i {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
    min-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: var(--gray-400);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    margin: 0.2rem 0.75rem;
    border-radius: 0.85rem;
}

.nav-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.06);
}

.nav-item.active {
    color: white;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.22), rgba(118, 75, 162, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: -0.75rem;
    top: 0.45rem;
    bottom: 0.45rem;
    width: 3px;
    background: var(--primary);
    border-radius: 999px;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, 0.48));
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.logout-btn {
    color: var(--gray-400);
    padding: 0.5rem;
    transition: var(--transition);
}

.logout-btn:hover {
    color: white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 2rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.page-header h1 i {
    color: var(--primary);
}

.page-header p {
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.page-header-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 0;
}

.page-header-top {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header-copy {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.page-header-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--primary);
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--gray-500);
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 0.625rem;
}

/* ========================================
   Cards
======================================== */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 30px -24px rgba(15, 23, 42, 0.35);
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.9), rgba(255, 255, 255, 0.96));
}

.card-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header h2 i {
    color: var(--primary);
}

.card-body {
    padding: 1.5rem;
}

.hero-panel {
    background:
        radial-gradient(circle at top right, rgba(102, 126, 234, 0.18), transparent 32%),
        radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.9), transparent 28%),
        linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(102, 126, 234, 0.1);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 44px -34px rgba(15, 23, 42, 0.28);
    padding: 1.75rem;
    margin-bottom: 2rem;
}

.hero-panel--compact {
    padding: 1.5rem;
}

.hero-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.hero-panel-title {
    max-width: 760px;
}

.hero-panel-title h2,
.hero-panel-title h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.hero-panel-title p {
    color: var(--gray-600);
    max-width: 68ch;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.hero-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
}

.metric-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    min-height: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.metric-label {
    display: block;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.45rem;
}

.metric-value {
    display: block;
    color: var(--gray-900);
    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.35rem;
}

.metric-detail {
    color: var(--gray-600);
    font-size: 0.875rem;
}

.section-block {
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.section-title {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.section-title h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title h2 i {
    color: var(--primary);
}

.section-title p {
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.stack-md {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.panel-surface {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.list-card {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow);
    padding: 1.25rem;
}

.list-card + .list-card {
    margin-top: 1rem;
}

.notice-inline {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.notice-inline i {
    color: var(--warning);
    font-size: 1.1rem;
    margin-top: 0.125rem;
}

.btn-block-spaced {
    width: 100%;
    margin-top: 1rem;
}

/* ========================================
   Stats Cards
======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 14px 32px -28px rgba(15, 23, 42, 0.4);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.bg-blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bg-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.bg-orange {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.bg-purple {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.stat-content p {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.stat-content small {
    color: var(--gray-400);
    font-size: 0.75rem;
}

/* ========================================
   Tables
======================================== */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    vertical-align: middle;
}

.table th {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
}

.table tbody tr {
    transition: background 0.18s ease;
}

.table tbody tr:hover {
    background: #f8fbff;
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar-small {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.875rem;
}

.user-cell div {
    display: flex;
    flex-direction: column;
}

.user-cell small {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
}

/* ========================================
   Badges y Status
======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-blue {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
}

.badge-green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-orange {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.badge-gray {
    background: var(--gray-100);
    color: var(--gray-600);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.status-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.status-badge.status-en_progreso {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.status-badge.status-revision {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.status-badge.status-completado {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-badge.status-pausado {
    background: rgba(107, 114, 128, 0.1);
    color: var(--gray-500);
}

.version-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.version-badge-accent {
    background: linear-gradient(135deg, #f97316, #ea580c);
}

/* ========================================
   Projects Grid
======================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.3);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.project-card:hover {
    box-shadow: 0 18px 38px -24px rgba(102, 126, 234, 0.28);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    gap: 1rem;
}

.project-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.project-header h3 a {
    color: var(--gray-900);
}

.project-header h3 a:hover {
    color: var(--primary);
}

.project-client {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.project-client a {
    color: var(--gray-600);
}

.project-client a:hover {
    color: var(--primary);
}

.project-description {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-stats {
    display: flex;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.project-stats span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ========================================
   Versions Blog (Admin)
======================================== */
.versions-blog h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.versions-blog h2 i {
    color: var(--primary);
}

.version-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.28);
    border: 1px solid var(--gray-200);
}

.version-card.version-latest {
    border-color: var(--primary);
    border-width: 2px;
}

.version-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.version-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.version-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.version-date {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.version-meta {
    display: flex;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.version-comment {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
}

.version-comment strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.version-comment p {
    color: var(--gray-600);
    white-space: pre-wrap;
}

.version-player {
    margin-bottom: 1rem;
}

.version-player audio {
    width: 100%;
}

.version-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* ========================================
   Clientes List
======================================== */
.client-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.client-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    transition: var(--transition);
}

.client-item:hover {
    background: var(--gray-100);
}

.client-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.client-info {
    flex: 1;
}

.client-info h4 {
    font-weight: 600;
    font-size: 0.9375rem;
}

.client-info p {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.client-stats {
    display: flex;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

/* ========================================
   Quick Actions
======================================== */
.quick-actions {
    margin-top: 2rem;
}

.quick-actions h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quick-actions h2 i {
    color: var(--primary);
}

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

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.28);
    color: var(--gray-700);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.action-card:hover {
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 18px 36px -24px rgba(102, 126, 234, 0.26);
}

.action-card i {
    font-size: 1.75rem;
    color: var(--primary);
}

.action-card span {
    font-weight: 500;
    font-size: 0.875rem;
}

/* ========================================
   Notes
======================================== */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.note-item {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 3px solid var(--gray-300);
}

.note-item.note-unread {
    border-left-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.note-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}

.note-header strong {
    color: var(--gray-900);
}

.note-date {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.note-content {
    color: var(--gray-700);
    font-size: 0.9375rem;
    line-height: 1.5;
}

.note-actions {
    margin-top: 0.75rem;
}

/* Timestamp Notes */
.timestamp-notes {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.timestamp-note {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.timestamp-note.note-unread {
    background: rgba(102, 126, 234, 0.05);
}

.timestamp-time {
    flex-shrink: 0;
}

.time-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.time-link:hover {
    transform: scale(1.05);
}

.timestamp-content {
    flex: 1;
}

.timestamp-content .note-author {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.timestamp-content p {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.timestamp-content small {
    color: var(--gray-400);
    font-size: 0.75rem;
}

.timestamp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   Modals
======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-header h2 i {
    color: var(--primary);
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* ========================================
   Empty States
======================================== */
.empty-state {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.5;
}

.empty-state-large {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #ffffff 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 28px -24px rgba(15, 23, 42, 0.24);
    border: 1px dashed var(--gray-300);
}

.empty-state-large i {
    font-size: 4rem;
    color: var(--gray-300);
    margin-bottom: 1.5rem;
}

.empty-state-large h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.empty-state-large p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

/* ========================================
   Content Grid
======================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* ========================================
   Settings
======================================== */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-label {
    color: var(--gray-500);
}

.info-value {
    font-weight: 500;
}

/* Client Info Grid */
.client-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.client-info-grid .info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    border: none;
    padding: 0;
}

.client-info-grid .info-item label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.client-info-grid .info-item span {
    font-weight: 500;
    color: var(--gray-800);
}

.info-notes {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.info-notes label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.info-notes p {
    color: var(--gray-700);
    line-height: 1.6;
}

/* ========================================
   Player Card
======================================== */
.player-card {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
}

.player-card .card-body {
    padding: 1.5rem;
}

.player-card audio {
    width: 100%;
}

/* ========================================
   Client Layout
======================================== */
.client-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.client-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0 2rem;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}

.header-logo a {
    color: white;
    opacity: 0.8;
}

.header-logo a:hover {
    opacity: 1;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-user .user-name {
    font-weight: 500;
}

.client-main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.welcome-section {
    margin-bottom: 2rem;
}

.welcome-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.welcome-section p {
    color: var(--gray-500);
}

/* Projects List Client */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project-card-link {
    text-decoration: none;
}

.project-card-client {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.3);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
}

.project-card-client:hover {
    box-shadow: 0 18px 38px -24px rgba(102, 126, 234, 0.28);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.project-card-client.has-new {
    border-color: var(--success);
}

.new-badge {
    position: absolute;
    top: -0.5rem;
    right: 1rem;
    background: var(--success);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.project-card-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.project-card-desc {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.project-card-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.project-card-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.project-card-arrow {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 1.25rem;
}

.project-card-client:hover .project-card-arrow {
    color: var(--primary);
    transform: translateY(-50%) translateX(3px);
}

/* ========================================
   Version Card Client
======================================== */
.project-header-client {
    margin-bottom: 2rem;
}

.project-title-section {
    margin-bottom: 1rem;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.back-link:hover {
    color: var(--primary);
}

.project-header-client h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.project-header-client .project-description {
    color: var(--gray-600);
    margin-top: 0.75rem;
    line-height: 1.6;
}

.versions-blog-client h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.version-card-client {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 14px 28px -24px rgba(15, 23, 42, 0.28);
    border: 1px solid var(--gray-200);
}

.version-card-client.version-latest {
    border-color: var(--primary);
    border-width: 2px;
}

.version-header-client {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.version-info-client {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.version-meta-client {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.version-comment-client {
    background: rgba(102, 126, 234, 0.1);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border-left: 3px solid var(--primary);
}

.version-comment-client strong {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.version-comment-client p {
    color: var(--gray-600);
}

.audio-player-container {
    margin-bottom: 1.5rem;
    background: var(--gray-900);
    padding: 1rem;
    border-radius: var(--radius);
}

.audio-player-container audio {
    width: 100%;
}

.version-actions-client {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.my-audios-section {
    background: white;
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
}

.audios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.audio-item-client {
    background: linear-gradient(180deg, #ffffff 0%, var(--gray-50) 100%);
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.audio-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 0.75rem;
}

.audio-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.audio-actions {
    display: flex;
    gap: 0.375rem;
}

.audio-item-client audio {
    width: 100%;
    margin-bottom: 0.5rem;
}

.audio-conversation {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.audio-conversation h5 {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--gray-700);
}

.chat-container {
    max-height: 250px;
    overflow-y: auto;
    font-size: 0.85rem;
    padding-right: 0.5rem;
}

.chat-message {
    margin-bottom: 0.5rem;
    padding: 0.75rem;
    border-radius: var(--radius);
}

.chat-cliente {
    background: #f1f5f9;
    border-left: 3px solid var(--gray-400);
}

.chat-admin {
    background: #eff6ff;
    border-left: 3px solid var(--primary);
}

.chat-message p {
    margin: 0.25rem 0 0;
}

.chat-meta {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.7rem;
    color: var(--gray-500);
}

.chat-form-wrap {
    margin-top: 0.75rem;
}

.chat-form-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
}

.chat-form-row input {
    flex: 1;
}

.modal-content-sm {
    max-width: 400px;
}

.is-hidden {
    display: none;
}

.my-notes-section {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
}

.my-notes-section h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.my-note-item {
    background: white;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    border-left: 3px solid var(--gray-300);
}

.my-note-item.timestamp-note {
    border-left-color: var(--primary);
}

.my-note-item .note-date {
    font-size: 0.75rem;
    color: var(--gray-400);
    display: block;
    margin-bottom: 0.25rem;
}

.my-note-item .note-time button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
}

.my-note-item p {
    color: var(--gray-700);
    font-size: 0.9375rem;
}

.time-selector {
    display: flex;
    align-items: center;
    gap: 1rem;
}

#current-time-display {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    font-family: monospace;
}

/* ========================================
   Plyr Customization
======================================== */
.plyr {
    border-radius: var(--radius);
    overflow: hidden;
}

.plyr--audio {
    background: transparent;
}

.plyr__controls {
    background: transparent !important;
    padding: 0.75rem !important;
}

.player-card .plyr {
    color: white;
}

.player-card .plyr__control--overlaid {
    background: var(--primary);
}

.player-card .plyr__control--overlaid:focus,
.player-card .plyr__control--overlaid:hover {
    background: var(--primary-dark);
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: var(--sidebar-width);
        height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .sidebar-nav {
        padding-bottom: 1rem;
    }

    .sidebar-footer {
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .content-grid,
    .notes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-page {
        padding: 1rem;
        align-items: flex-start;
    }

    .login-container {
        max-width: 100%;
        margin-top: 2rem;
    }

    .login-card {
        border-radius: 1.5rem;
    }

    .login-header {
        padding: 1.8rem 1.35rem 1.4rem;
    }

    .login-header h1 {
        font-size: 1.45rem;
        line-height: 1.15;
    }

    .login-header p {
        font-size: 0.92rem;
    }

    .login-mode-badge {
        font-size: 0.72rem;
        margin-top: 0.85rem;
    }

    .login-tabs {
        padding: 0.85rem 0.85rem 0;
        gap: 0.6rem;
    }

    .login-tab {
        padding: 0.85rem 0.75rem;
        font-size: 0.9rem;
    }

    .login-mode-help,
    .login-form,
    .login-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .main-content {
        padding: 1rem;
    }

    .main-content,
    .client-main {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .page-header-top {
        align-items: flex-start;
    }

    .hero-panel {
        padding: 1.125rem;
        border-radius: 1.25rem;
    }

    .hero-panel-title h1,
    .hero-panel-title h2 {
        font-size: 1.3rem;
        line-height: 1.18;
        text-wrap: balance;
    }

    .hero-panel-title p,
    .section-title p,
    .page-header p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .hero-panel-header {
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .hero-metrics {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .metric-card {
        padding: 0.95rem;
        min-height: 0;
    }

    .metric-value {
        font-size: 1.35rem;
    }

    .metric-detail {
        font-size: 0.8125rem;
        line-height: 1.45;
    }

    .section-header {
        align-items: stretch;
        margin-bottom: 0.75rem;
    }

    .page-header h1 {
        font-size: 1.1rem;
    }

    .page-header h1 i {
        font-size: 1rem;
    }

    /* Status badges no deben romper en 2 líneas */
    .status-badge {
        white-space: nowrap;
        font-size: 0.6875rem;
        padding: 0.25rem 0.625rem;
    }

    /* Project cards más compactas */
    .project-card {
        padding: 1rem;
    }

    .project-header {
        gap: 0.5rem;
    }

    .project-header h3 {
        font-size: 1rem;
    }

    .project-description {
        font-size: 0.8125rem;
    }

    .project-stats {
        font-size: 0.75rem;
        gap: 0.75rem;
    }

    .project-actions {
        gap: 0.375rem;
    }

    .project-actions .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    /* Badges generales más compactos */
    .badge {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }

    .page-header p {
        font-size: 0.8125rem;
    }

    .page-header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .page-header-actions .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .breadcrumb {
        font-size: 0.75rem;
        flex-wrap: wrap;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .stat-label {
        font-size: 0.75rem;
    }

    .stat-sublabel {
        font-size: 0.6875rem;
    }

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

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

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

    .version-header,
    .version-header-client {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .version-info,
    .version-info-client {
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .version-actions,
    .version-actions-client {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .version-actions .btn,
    .version-actions-client .btn {
        flex: 1;
        min-width: 0;
        text-align: center;
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .version-player audio,
    .audio-player-container audio {
        width: 100%;
    }

    .client-header {
        padding: 0.75rem 0.875rem;
        height: auto;
        min-height: var(--header-height);
        align-items: flex-start;
        gap: 0.75rem;
    }

    .client-main {
        padding: 1rem;
    }

    .header-logo,
    .header-user {
        min-width: 0;
    }

    .header-logo {
        gap: 0.75rem;
        font-size: 1.05rem;
        flex: 1;
    }

    .header-logo span {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-user {
        gap: 0.75rem;
        flex-shrink: 0;
    }

    .header-user .user-name {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 0.95rem;
    }

    .welcome-section h1 {
        font-size: 1.5rem;
    }

    .project-card-arrow {
        display: none;
    }

    .hero-actions,
    .page-header-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .page-header-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tablas responsivas: convertir a bloques en móvil */
    .table-responsive {
        overflow-x: visible;
    }

    .table thead {
        display: none;
    }

    .table tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--gray-200);
        border-radius: var(--radius);
        padding: 0.75rem;
        background: white;
    }

    .table tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.375rem 0;
        border-bottom: 1px solid var(--gray-100);
        font-size: 0.875rem;
    }

    .table tbody td:last-child {
        border-bottom: none;
    }

    .table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--gray-600);
        font-size: 0.75rem;
        text-transform: uppercase;
        margin-right: 1rem;
        flex-shrink: 0;
    }

    .actions-cell {
        justify-content: flex-end;
        gap: 0.375rem;
    }

    /* Audio player dentro de tabla */
    .audio-player-mini audio {
        width: 180px;
        height: 36px;
    }

    /* Card headers en móvil */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    /* Modal en móvil */
    .modal-content {
        margin: 0.5rem;
        max-height: 95vh;
        max-width: calc(100vw - 1rem);
    }

    .modal-body {
        padding: 1rem;
    }

    /* Audios grid del cliente */
    .audios-grid {
        grid-template-columns: 1fr;
    }

    .project-card-client,
    .project-card,
    .version-card,
    .version-card-client,
    .audio-item-client,
    .card {
        border-radius: 1.1rem;
    }

    .project-card-client,
    .project-card {
        padding: 1.125rem;
    }

    .project-card-header {
        flex-direction: column;
        gap: 0.625rem;
    }

    .project-card-header h3,
    .project-header h3 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .project-card-meta,
    .project-stats,
    .version-meta,
    .version-meta-client {
        flex-wrap: wrap;
        gap: 0.625rem 1rem;
    }

    .new-badge {
        top: 0.875rem;
        right: 0.875rem;
    }

    /* Config tabs */
    .settings-tabs {
        flex-wrap: wrap;
    }

    .settings-tab {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    /* Responsive input-group */
    .response-input-row {
        flex-direction: row;
    }

    .response-input-row input {
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .login-page {
        padding: 0.75rem;
    }

    .login-container {
        margin-top: 1.25rem;
    }

    .login-header {
        padding: 1.5rem 1rem 1.15rem;
    }

    .login-logo {
        width: 70px;
        height: 70px;
        font-size: 1.7rem;
    }

    .login-header h1 {
        font-size: 1.2rem;
    }

    .login-header p {
        font-size: 0.84rem;
        max-width: 24ch;
    }

    .login-tabs {
        padding: 0.75rem 0.75rem 0;
        gap: 0.5rem;
    }

    .login-tab {
        font-size: 0.84rem;
        padding: 0.8rem 0.5rem;
        gap: 0.35rem;
    }

    .login-tab i {
        font-size: 0.9rem;
    }

    .login-mode-help {
        font-size: 0.82rem;
        padding-top: 0.8rem;
    }

    .login-form {
        padding-top: 1rem;
        padding-bottom: 1.35rem;
    }

    .login-footer {
        padding-bottom: 1.1rem;
        font-size: 0.82rem;
    }

    .client-header {
        padding: 0.65rem 0.75rem;
        align-items: center;
    }

    .header-logo {
        gap: 0.625rem;
        font-size: 0.95rem;
    }

    .header-logo i {
        font-size: 1rem;
    }

    .header-user {
        gap: 0.5rem;
    }

    .header-user .user-name {
        display: none;
    }

    .header-user .btn {
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .hero-panel {
        padding: 1rem;
    }

    .hero-panel-title h1,
    .hero-panel-title h2 {
        font-size: 1.1rem;
    }

    .hero-panel-title p,
    .section-title p {
        font-size: 0.9rem;
    }

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

    .metric-card {
        padding: 0.9rem;
    }

    .metric-label {
        font-size: 0.7rem;
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .section-title h2 {
        font-size: 1rem;
        line-height: 1.25;
    }

    .project-card-client,
    .project-card,
    .version-card,
    .version-card-client {
        padding: 1rem;
    }

    .project-card-meta span,
    .project-stats span {
        width: 100%;
    }

    .new-badge {
        position: static;
        display: inline-flex;
        margin-bottom: 0.75rem;
    }

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

    .login-card {
        border-radius: var(--radius);
    }

    .login-form {
        padding: 1.25rem;
    }

    .page-header h1 {
        font-size: 1rem;
    }

    .page-header-top {
        gap: 0.75rem;
    }

    .version-number {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .version-actions .btn,
    .version-actions-client .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
    }

    .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    /* Audio players a ancho completo */
    .audio-player-mini audio {
        width: 100%;
    }

    /* Project meta info */
    .project-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Client info grid */
    .client-info-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Time Display (Captura de tiempo)
======================================== */
.current-time-display {
    background: rgba(102, 126, 234, 0.1);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-time-display i {
    font-size: 1rem;
}

.current-time-display .time-value {
    font-family: 'SF Mono', 'Monaco', 'Consolas', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
}

/* ========================================
   Note Actions Inline
======================================== */
.note-actions-inline {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.note-actions-inline .btn-sm {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
}

.my-note-item {
    position: relative;
    transition: var(--transition);
}

.my-note-item:hover {
    background: white;
}

/* ========================================
   Note Threads & Responses
======================================== */
.note-thread {
    margin-bottom: 1rem;
    border-left: 3px solid var(--gray-300);
    padding-left: 0.75rem;
}

.note-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.note-author {
    font-weight: 600;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.note-author .badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
}

.responses-list {
    margin-left: 1rem;
    border-left: 2px solid var(--gray-200);
    padding-left: 0.5rem;
    margin-top: 0.5rem;
}

.response-item {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius-sm);
    background: var(--gray-50);
}

.response-item.admin {
    background: rgba(139, 92, 246, 0.1);
}

.response-item.cliente {
    background: rgba(59, 130, 246, 0.1);
}

.response-item.mine {
    background: rgba(16, 185, 129, 0.1);
}

.response-item p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
}

.quick-response {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
}

.response-input-row {
    display: flex;
    gap: 0.5rem;
}

.response-input-row input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: inherit;
}

.response-input-row input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.time-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius);
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

.time-link-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow);
}

.timestamp-row {
    display: flex;
    flex-direction: column;
}

.timestamp-row p {
    margin: 0;
}

.badge-purple {
    background: rgba(139, 92, 246, 0.2);
    color: #7c3aed;
}

.my-note-item.mine {
    background: rgba(16, 185, 129, 0.08);
    border-left-color: var(--success);
}

.my-note-item.theirs {
    background: rgba(59, 130, 246, 0.08);
    border-left-color: var(--info);
}

/* ========================================
   Utilities
======================================== */
.mb-3 {
    margin-bottom: 1rem;
}

.mt-3 {
    margin-top: 1rem;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray-500);
}

/* ========================================
   Mobile Menu Toggle (Hamburguesa)
======================================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--gray-600);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.menu-toggle:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .page-header {
        position: relative;
    }

    .sidebar.open {
        z-index: 1000;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .sidebar-overlay.active {
        display: block;
    }
}
