/* Variáveis CSS para Tema Escuro (Padrão - Azul Escuro) */
    :root {
      /* Cores principais - Tema Escuro */
      --bg-primary: #0a1929;
      --bg-secondary: #132f4c;
      --bg-tertiary: #1e3a5f;
      --bg-card: #1a2332;
      --bg-hover: #243447;
      
      /* Cores de texto */
      --text-primary: #e0e7ff;
      --text-secondary: #c7d2fe;
      --text-muted: #a5b4fc;
      
      /* Cores de destaque - Azul */
      --accent-primary: #3b82f6;
      --accent-secondary: #2563eb;
      --accent-hover: #60a5fa;
      --accent-gradient: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
      
      /* Cores de borda */
      --border-color: #1e3a5f;
      --border-hover: #3b82f6;
      
      /* Cores de sombra */
      --shadow-sm: rgba(0, 0, 0, 0.3);
      --shadow-md: rgba(0, 0, 0, 0.4);
      --shadow-lg: rgba(0, 0, 0, 0.5);
      
      /* Cores de estado */
      --success: #10b981;
      --error: #ef4444;
      --warning: #f59e0b;
      --info: #3b82f6;
    }
    
    /* Variáveis CSS para Tema Claro */
    [data-theme="light"] {
      /* Cores principais - Tema Claro */
      --bg-primary: #f8fafc;
      --bg-secondary: #ffffff;
      --bg-tertiary: #f1f5f9;
      --bg-card: #ffffff;
      --bg-hover: #e2e8f0;
      
      /* Cores de texto */
      --text-primary: #1e293b;
      --text-secondary: #334155;
      --text-muted: #64748b;
      
      /* Cores de destaque - Azul */
      --accent-primary: #3b82f6;
      --accent-secondary: #2563eb;
      --accent-hover: #60a5fa;
      --accent-gradient: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
      
      /* Cores de borda */
      --border-color: #e2e8f0;
      --border-hover: #3b82f6;
      
      /* Cores de sombra */
      --shadow-sm: rgba(0, 0, 0, 0.1);
      --shadow-md: rgba(0, 0, 0, 0.15);
      --shadow-lg: rgba(0, 0, 0, 0.2);
      
      /* Cores de estado */
      --success: #10b981;
      --error: #ef4444;
      --warning: #f59e0b;
      --info: #3b82f6;
    }
    
    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
      transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    }
    
    body { 
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      background: var(--bg-primary);
      min-height: 100vh;
      margin: 0;
      padding: 0;
      color: var(--text-primary);
      overflow-x: hidden;
    }
    
    /* Background effect when login is visible - Split Design */
    body.login-active {
      background: linear-gradient(135deg, #0a1929 0%, #132f4c 50%, #1e3a5f 100%) !important;
      position: relative;
    }
    
    body.login-active::before {
      content: '';
      position: fixed;
      top: 0;
      right: 0;
      width: 53%;
      height: 100vh;
      background-image: url('../imgs/ressonancia_magnetica.png');
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0.3;
      z-index: 0;
      filter: brightness(0.7);
    }
    
    /* Ensure login screen is centered when visible */
    #loginScreen:not(.hidden) {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      padding: 20px;
      background: transparent;
    }
    
    /* Login Screen Styles - Split Design */
    .container {
      width: 100%;
      max-width: 900px;
      background: linear-gradient(135deg, #1e3a5f 0%, #132f4c 100%);
      border-radius: 20px;
      box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
      padding: 0;
      margin: 0;
      border: 1px solid rgba(59, 130, 246, 0.2);
      position: relative;
      z-index: 1;
      display: flex;
      overflow: hidden;
      min-height: 550px;
    }
    
    .login-form-section {
      flex: 1.5;
      padding: 60px 50px;
      display: flex;
      flex-direction: column;
      justify-content: center;
      position: relative;
      z-index: 2;
    }
    
    .login-visual-section {
      flex: 1;
      background: transparent;
      position: relative;
      overflow: hidden;
      display: flex !important;
      align-items: center;
      justify-content: center;
    }
    
    .login-visual-section .login-accent-lines {
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      z-index: 1;
    }
    
    .login-visual-section svg {
      width: 100%;
      height: 100%;
      max-width: 400px;
      max-height: 400px;
    }
    
    .login-visual-image {
      position: absolute;
      top: 0;
      right: 0;
      width: 53%;
      height: 100%;
      background-image: url('/static/imgs/ressonancia_magnetica.png');
      background-size: cover;
      background-position: center;
      background-repeat: no-repeat;
      opacity: 0.15;
      z-index: 0;
      filter: brightness(0.8);
    }
    
    [data-theme="dark"] .container {
      background: linear-gradient(135deg, #1e3a5f 0%, #132f4c 100%);
    }
    
    .main-container {
      width: 100%;
      min-height: 100vh;
      background: var(--bg-primary);
      padding: 0;
      margin: 0;
      display: flex;
      flex-direction: row;
    }

    /* Estilos da navbar movidos para navbar.css (carregado via base.html) */

    .app-content-wrapper {
      flex: 1;
      margin-left: 280px;
      min-height: 100vh;
      display: flex;
      flex-direction: column;
    }

    .app-content {
      flex: 1;
      padding: 40px;
      overflow-y: auto;
      background: var(--bg-primary);
    }
    
    /* Login Title - Split Design */
    #loginScreen h1 {
      color: #ffffff;
      text-align: left;
      margin-bottom: 12px;
      font-size: 32px;
      font-weight: 700;
      letter-spacing: -0.02em;
      line-height: 1.2;
      padding: 0;
    }
    
    #loginScreen .login-subtitle {
      color: rgba(255, 255, 255, 0.7);
      font-size: 15px;
      margin-bottom: 40px;
      line-height: 1.5;
    }
    
    #loginScreen .login-subtitle a {
      color: #60a5fa;
      text-decoration: underline;
      cursor: pointer;
      transition: color 0.2s;
    }
    
    #loginScreen .login-subtitle a:hover {
      color: #93c5fd;
    }
    
    #loginScreen h1::after {
      display: none;
    }
    
    h1:not(#loginScreen h1) {
      color: var(--accent-primary);
      text-align: center;
      margin-bottom: 30px;
      font-size: 28px;
    }
    
    h2 {
      color: var(--accent-primary);
      margin-bottom: 20px;
      font-size: 24px;
    }
    
    .form-group {
      margin-bottom: 32px;
      position: relative;
    }
    
    .form-group label {
      display: block;
      margin-bottom: 12px;
      color: rgba(255, 255, 255, 0.9);
      font-weight: 500;
      font-size: 14px;
      letter-spacing: 0.01em;
    }
    
    .form-group .input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }
    
    .form-group input[type="text"],
    .form-group input[type="password"] {
      width: 100%;
      padding: 12px 0;
      border: none;
      border-bottom: 2px solid rgba(255, 255, 255, 0.2);
      border-radius: 0;
      font-size: 15px;
      transition: all 0.3s ease;
      background: transparent;
      color: #ffffff;
      font-weight: 400;
    }
    
    .form-group input[type="text"]::placeholder,
    .form-group input[type="password"]::placeholder {
      color: rgba(255, 255, 255, 0.4);
      opacity: 1;
    }
    
    .form-group input[type="text"]:hover,
    .form-group input[type="password"]:hover {
      border-bottom-color: rgba(255, 255, 255, 0.4);
    }
    
    .form-group input[type="text"]:focus,
    .form-group input[type="password"]:focus {
      outline: none;
      border-bottom-color: #60a5fa;
      box-shadow: 0 1px 0 0 #60a5fa;
    }
    
    .remember-me {
      display: flex;
      align-items: center;
      gap: 10px;
      margin-bottom: 32px;
      color: rgba(255, 255, 255, 0.8);
      font-size: 14px;
    }
    
    .remember-me input[type="checkbox"] {
      width: 18px;
      height: 18px;
      cursor: pointer;
      accent-color: #3b82f6;
    }
    
    input[type="text"]:not(.form-group input),
    input[type="password"]:not(.form-group input) {
      width: 100%;
      padding: 12px;
      border: 2px solid var(--border-color);
      border-radius: 8px;
      font-size: 16px;
      transition: all 0.3s;
      background: var(--bg-secondary);
      color: var(--text-primary);
    }
    
    input[type="text"]:not(.form-group input):focus,
    input[type="password"]:not(.form-group input):focus {
      outline: none;
      border-color: var(--accent-primary);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    /* Login Button - Split Design */
    #loginForm button[type="submit"] {
      width: 100%;
      padding: 14px 24px;
      background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
      color: white;
      border: none;
      border-radius: 10px;
      font-size: 15px;
      font-weight: 600;
      letter-spacing: 0.01em;
      cursor: pointer;
      transition: all 0.3s ease;
      margin-top: 0;
      margin-bottom: 0;
      box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }
    
    #loginForm button[type="submit"]:hover {
      background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 50%, #93c5fd 100%);
      box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
      transform: translateY(-1px);
    }
    
    #loginForm button[type="submit"]:active {
      transform: translateY(0);
    }
    
    #loginForm button[type="submit"]:focus {
      outline: none;
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3),
                  0 6px 20px rgba(59, 130, 246, 0.4);
    }
    
    button:not(#loginForm button) {
      width: 100%;
      padding: 14px;
      background: var(--accent-gradient);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s, box-shadow 0.2s;
      margin-bottom: 15px;
    }
    
    button:not(#loginForm button):hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(59, 130, 246, 0.4);
    }
    
    button:not(#loginForm button):active {
      transform: translateY(0);
    }
    
    .btn-secondary {
      background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    }
    
    .btn-back {
      background: var(--bg-tertiary);
      color: var(--text-primary);
      width: auto;
      padding: 10px 20px;
      margin-bottom: 20px;
      border-radius: 8px;
      font-size: 14px;
    }

    .page-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 32px;
      padding-bottom: 16px;
      border-bottom: 1px solid var(--border-color);
    }

    .page-header h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 28px;
      font-weight: 700;
      letter-spacing: -0.02em;
    }
    
    /* Menu Cards - Premium Design */
    .menu-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 20px;
      margin-top: 0;
      width: 100%;
    }
    
    .menu-card {
      background: var(--bg-card);
      border: 1px solid rgba(59, 130, 246, 0.15);
      border-radius: 16px;
      padding: 32px 28px;
      cursor: pointer;
      transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      gap: 20px;
      min-height: 260px;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    }
    
    .menu-card::before {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 3px;
      background: var(--accent-primary);
      opacity: 0;
      transition: opacity 0.3s ease;
    }
    
    .menu-card:hover {
      transform: translateY(-4px);
      border-color: rgba(59, 130, 246, 0.4);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                  0 4px 12px rgba(59, 130, 246, 0.15);
      background: var(--bg-hover);
    }
    
    .menu-card:hover::before {
      opacity: 1;
    }
    
    .menu-card-icon {
      width: 56px;
      height: 56px;
      opacity: 0.9;
      transition: all 0.3s ease;
      color: #60a5fa;
    }
    
    .menu-card-icon svg {
      width: 100%;
      height: 100%;
    }
    
    .menu-card:hover .menu-card-icon {
      opacity: 1;
      transform: scale(1.1);
      color: #93c5fd;
    }
    
    .menu-card-content {
      flex: 1;
      display: flex;
      flex-direction: column;
      gap: 10px;
    }
    
    .menu-card-title {
      font-size: 20px;
      font-weight: 600;
      color: var(--text-primary);
      letter-spacing: -0.01em;
      margin: 0;
      line-height: 1.3;
    }
    
    .menu-card-description {
      font-size: 14px;
      color: var(--text-muted);
      line-height: 1.6;
      margin: 0;
      font-weight: 400;
    }
    
    .menu-card-arrow {
      align-self: flex-end;
      margin-top: auto;
      font-size: 18px;
      color: var(--accent-primary);
      transition: all 0.3s ease;
      opacity: 0.7;
    }
    
    .menu-card:hover .menu-card-arrow {
      transform: translateX(4px);
      opacity: 1;
    }
    
    /* Variações sutis de cor dentro da mesma paleta */
    .menu-card.primary {
      border-color: rgba(59, 130, 246, 0.2);
    }
    
    .menu-card.primary:hover {
      border-color: rgba(59, 130, 246, 0.5);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                  0 4px 12px rgba(59, 130, 246, 0.2);
    }
    
    .menu-card.primary .menu-card-icon {
      color: #60a5fa;
    }
    
    .menu-card.secondary {
      border-color: rgba(139, 92, 246, 0.15);
    }
    
    .menu-card.secondary:hover {
      border-color: rgba(139, 92, 246, 0.4);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                  0 4px 12px rgba(139, 92, 246, 0.15);
    }
    
    .menu-card.secondary .menu-card-icon {
      color: #a78bfa;
    }
    
    .menu-card.secondary .menu-card-arrow {
      color: #a78bfa;
    }
    
    .menu-card.tertiary {
      border-color: rgba(236, 72, 153, 0.15);
    }
    
    .menu-card.tertiary:hover {
      border-color: rgba(236, 72, 153, 0.4);
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3),
                  0 4px 12px rgba(236, 72, 153, 0.15);
    }
    
    .menu-card.tertiary .menu-card-icon {
      color: #f472b6;
    }
    
    .menu-card.tertiary .menu-card-arrow {
      color: #f472b6;
    }
    
    /* Responsividade */
    @media (max-width: 1024px) {
      .app-sidebar {
        width: 240px;
      }
      
      .app-content-wrapper {
        margin-left: 240px;
      }
      
      .menu-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
      }
    }
    
    @media (max-width: 768px) {
      .app-sidebar {
        width: 70px;
      }
      
      .sidebar-logo h1 {
        font-size: 14px;
      }
      
      .nav-item {
        justify-content: center;
        padding: 12px;
        position: relative;
        text-indent: -9999px;
        overflow: hidden;
      }
      
      .nav-item .nav-icon {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        text-indent: 0;
      }
      
      .sidebar-footer button {
        padding: 8px;
        font-size: 0;
      }
      
      .app-content-wrapper {
        margin-left: 70px;
      }
      
      .app-content {
        padding: 24px;
      }
      
      .menu-cards {
        grid-template-columns: 1fr;
        gap: 16px;
      }
      
      .menu-card {
        min-height: 220px;
        padding: 28px 24px;
      }
      
      .menu-card-icon {
        width: 48px;
        height: 48px;
      }
      
      .menu-card-title {
        font-size: 19px;
      }
      
      .menu-card-description {
        font-size: 13px;
      }
      
      .page-header h2 {
        font-size: 28px;
      }
    }
    
    @media (max-width: 480px) {
      .menu-card {
        min-height: 200px;
        padding: 24px 20px;
        gap: 16px;
      }
      
      .menu-card-icon {
        width: 44px;
        height: 44px;
      }
      
      .menu-card-title {
        font-size: 18px;
      }
      
      .menu-card-description {
        font-size: 12px;
      }
      
      .menu-card-arrow {
        font-size: 16px;
      }
    }
    
    .error-message {
      opacity: 0;
      transform: translateY(-10px);
      transition: opacity 0.3s ease, transform 0.3s ease;
      color: #fca5a5;
      margin-top: 16px;
      text-align: left;
      display: none;
      padding: 12px 16px;
      background: rgba(220, 38, 38, 0.1);
      border: 1px solid rgba(220, 38, 38, 0.3);
      border-radius: 8px;
      font-size: 13px;
      font-weight: 400;
      line-height: 1.4;
    }
    
    .error-message.show {
      display: block !important;
      opacity: 1 !important;
      transform: translateY(0) !important;
      visibility: visible !important;
    }
    
    @media (max-width: 768px) {
      .container {
        flex-direction: column;
        max-width: 100%;
      }
      
      .login-form-section {
        padding: 40px 30px;
      }
      
      .login-visual-section {
        display: none;
      }
    }
    
    .filters-container {
      background: var(--bg-card);
      border-radius: 12px;
      box-shadow: 0 2px 8px var(--shadow-sm);
      border: 1px solid var(--border-color);
      padding: 20px;
      margin-bottom: 20px;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 15px;
      align-items: end;
    }

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

    .filter-group label {
      font-size: 12px;
      font-weight: 600;
      color: var(--text-secondary);
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .filter-group input,
    .filter-group select {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid var(--border-color);
      border-radius: 6px;
      font-size: 14px;
      transition: all 0.2s;
      background: var(--bg-secondary);
      color: var(--text-primary);
      height: 40px;
      box-sizing: border-box;
    }

    .filter-group input:focus,
    .filter-group select:focus {
      outline: none;
      border-color: var(--accent-primary);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }

    .filter-actions {
      display: flex;
      flex-direction: column;
      gap: 8px;
      justify-content: flex-end;
    }

    .filter-actions::before {
      content: '';
      display: block;
      height: 20px;
      flex-shrink: 0;
    }

    .btn-filter {
      padding: 10px 20px;
      background: var(--accent-primary);
      color: white;
      border: none;
      border-radius: 6px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s;
      white-space: nowrap;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .btn-filter:hover {
      background: var(--accent-hover);
      transform: translateY(-1px);
      box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }

    .btn-filter-clear {
      background: var(--bg-tertiary);
      color: var(--text-primary);
    }

    .btn-filter-clear:hover {
      background: var(--bg-hover);
    }

    .studies-table-container {
      width: 100%;
      overflow-x: auto;
      margin-top: 0;
      background: var(--bg-card);
      border-radius: 12px;
      box-shadow: 0 2px 8px var(--shadow-sm);
      border: 1px solid var(--border-color);
    }

    .studies-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 14px;
      min-width: 800px;
    }

    .studies-table thead {
      background: var(--bg-tertiary);
      border-bottom: 2px solid var(--border-color);
    }

    .studies-table th {
      padding: 16px 20px;
      text-align: left;
      font-weight: 600;
      color: var(--text-primary);
      font-size: 12px;
      text-transform: uppercase;
      letter-spacing: 0.8px;
      white-space: nowrap;
      cursor: pointer;
      user-select: none;
      position: sticky;
      top: 0;
      background: var(--bg-tertiary);
      z-index: 10;
    }

    .studies-table th:hover {
      background: var(--bg-hover);
    }

    .studies-table th.sortable {
      position: relative;
      padding-right: 24px;
    }

    .studies-table th.sortable::after {
      content: '⇅';
      position: absolute;
      right: 8px;
      font-size: 12px;
      color: #999;
    }

    .studies-table tbody tr {
      border-bottom: 1px solid var(--border-color);
      transition: all 0.2s ease;
      background: var(--bg-card);
    }

    .studies-table tbody tr:hover {
      background-color: var(--bg-hover);
      cursor: pointer;
      transform: scale(1.001);
      box-shadow: 0 2px 4px var(--shadow-sm);
    }

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

    .studies-table tbody tr:nth-child(even) {
      background-color: var(--bg-secondary);
    }

    .studies-table tbody tr:nth-child(even):hover {
      background-color: var(--bg-hover);
    }

    .studies-table td {
      padding: 16px 20px;
      color: var(--text-primary);
      vertical-align: middle;
      font-size: 14px;
    }

    .studies-table td:first-child {
      font-weight: 600;
      color: var(--text-primary);
    }

    .studies-table .icon-cell {
      text-align: center;
      width: 150px;
      padding: 12px 20px;
    }

    .studies-table .icon-cell svg {
      width: 20px;
      height: 20px;
      color: var(--accent-primary);
      cursor: pointer;
      transition: all 0.2s ease;
      opacity: 0.8;
    }

    .studies-table .icon-cell:hover svg {
      color: var(--accent-hover);
      opacity: 1;
      transform: scale(1.15);
    }

    .studies-table .icon-cell button,
    .studies-table .icon-cell .action-btn {
      background: var(--accent-primary);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 12px 24px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      width: auto;
      margin: 0;
      min-width: 120px;
      white-space: nowrap;
      box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
    }

    .studies-table .icon-cell button:hover,
    .studies-table .icon-cell .action-btn:hover {
      background: var(--accent-hover);
      transform: translateY(-2px);
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    }

    .studies-table .icon-cell button:active,
    .studies-table .icon-cell .action-btn:active {
      transform: translateY(0);
    }
    
    #viewer {
      width: 100%;
      height: 600px;
      border: 2px solid var(--border-color);
      border-radius: 12px;
      background: #000;
      margin: 20px 0;
    }
    
    .share-link-container {
      background: var(--bg-card);
      border: 1px solid var(--border-color);
      border-left: 4px solid var(--accent-primary);
      border-radius: 12px;
      padding: 24px;
      margin: 24px 0;
      box-shadow: 0 2px 8px var(--shadow-sm);
    }
    
    .share-link-container h3 {
      margin: 0 0 16px 0;
      color: var(--text-primary);
      font-size: 18px;
      font-weight: 600;
    }
    
    .share-link-container input {
      width: 100%;
      padding: 12px 16px;
      border: 1px solid var(--border-color);
      border-radius: 8px;
      font-size: 14px;
      margin-bottom: 12px;
      background: var(--bg-secondary);
      color: var(--text-primary);
      font-family: monospace;
      transition: all 0.2s ease;
    }
    
    .share-link-container input:focus {
      outline: none;
      border-color: var(--accent-primary);
      box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    }
    
    .copy-btn {
      background: var(--accent-primary);
      color: white;
      border: none;
      border-radius: 8px;
      padding: 12px 24px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.2s ease;
      width: 100%;
    }
    
    .copy-btn:hover {
      background: var(--accent-hover);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    }
    
    .hidden {
      display: none;
    }
    
    .loading {
      text-align: center;
      color: var(--text-muted);
      margin: 40px 0;
      font-size: 15px;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 12px;
    }
    
    .loading::before {
      content: '';
      width: 20px;
      height: 20px;
      border: 3px solid rgba(59, 130, 246, 0.2);
      border-top-color: var(--accent-primary);
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
    }
    
    @keyframes spin {
      to { transform: rotate(360deg); }
    }
    
    .logout-btn {
      width: auto;
      padding: 10px 20px;
      background: rgba(255, 255, 255, 0.2);
      border: 1px solid rgba(255, 255, 255, 0.3);
      color: white;
      font-size: 14px;
      margin: 0;
    }

    .logout-btn:hover {
      background: rgba(255, 255, 255, 0.3);
    }
    
    .video-controls {
      display: flex;
      align-items: center;
      gap: 10px;
      margin: 20px 0;
      padding: 15px;
      background: var(--bg-card);
      border-radius: 8px;
      border: 1px solid var(--border-color);
    }
    
    .video-controls button {
      width: auto;
      padding: 10px 20px;
    }
    
    /* Modal de Vídeo */
    .video-modal {
      display: none;
      position: fixed;
      z-index: 10000;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.9);
      animation: fadeIn 0.3s ease;
    }
    
    .video-modal.show {
      display: flex;
      align-items: center;
      justify-content: center;
    }
    
    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    
    .video-modal-content {
      background: var(--bg-card);
      border-radius: 20px;
      padding: 30px;
      max-width: 95%;
      max-height: 95vh;
      width: 1200px;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px var(--shadow-lg);
      animation: slideUp 0.3s ease;
      border: 1px solid var(--border-color);
    }
    
    @keyframes slideUp {
      from { transform: translateY(50px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }
    
    .video-modal-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
      padding-bottom: 15px;
      border-bottom: 2px solid var(--border-color);
    }
    
    .video-modal-header h2 {
      margin: 0;
      color: var(--text-primary);
      font-size: 20px;
      font-weight: 600;
    }
    
    .video-modal-close {
      background: #dc3545;
      color: white;
      border: none;
      border-radius: 50%;
      width: 24px;
      height: 24px;
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.3s;
      line-height: 1;
      padding: 0;
      min-width: 24px;
    }
    
    .video-modal-close:hover {
      background: #c82333;
      transform: rotate(90deg);
    }
    
    .video-modal-display {
      width: 100%;
      height: 600px;
      background: #000;
      border-radius: 12px;
      margin-bottom: 10px;
      overflow: hidden;
      position: relative;
    }

    .video-modal-progress {
      width: 100%;
      padding: 15px 20px;
      background: var(--bg-tertiary);
      border-radius: 12px;
      margin-bottom: 15px;
    }
    
    .video-modal-controls {
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: center;
      gap: 15px;
      padding: 20px;
      background: var(--bg-tertiary);
      border-radius: 12px;
      flex-wrap: nowrap;
    }
    
    .video-modal-controls button {
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 16px;
      font-weight: 600;
      transition: all 0.3s;
      min-width: 120px;
    }
    
    .video-modal-controls button:hover {
      transform: translateY(-2px);
      box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
    
    .video-modal-controls button.play {
      background: var(--accent-primary);
      color: white;
    }
    
    .video-modal-controls button.pause {
      background: #ffc107;
      color: #1a1a1a;
    }
    
    .video-modal-controls button.stop {
      background: #dc3545;
      color: white;
    }
    
    .video-modal-controls button.download {
      background: var(--accent-primary);
      color: white;
    }
    
    .video-modal-controls button.play:hover {
      background: var(--accent-hover);
    }
    
    .video-modal-controls button.pause:hover {
      background: #ffb300;
    }
    
    .video-modal-controls button.stop:hover {
      background: #c82333;
    }
    
    .video-modal-controls button.download:hover {
      background: var(--accent-hover);
    }
    
    .video-modal-info {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-muted);
      margin: 0;
      white-space: nowrap;
      padding: 8px 16px;
      background: var(--bg-secondary);
      border-radius: 8px;
      min-width: 200px;
      text-align: center;
    }

    .speed-control {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 12px;
      background: var(--bg-secondary);
      border-radius: 8px;
    }

    .speed-control label {
      font-size: 14px;
      color: var(--text-primary);
      white-space: nowrap;
      font-weight: 500;
    }

    .speed-control input[type="range"] {
      width: 100px;
      height: 6px;
      background: var(--border-color);
      border-radius: 3px;
      outline: none;
      cursor: pointer;
    }

    .speed-control input[type="range"]::-webkit-slider-thumb {
      appearance: none;
      width: 16px;
      height: 16px;
      background: var(--accent-primary);
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .speed-control input[type="range"]::-webkit-slider-thumb:hover {
      background: var(--accent-hover);
      transform: scale(1.1);
    }

    .speed-control input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      background: var(--accent-primary);
      border: none;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.2s ease;
    }

    .speed-control input[type="range"]::-moz-range-thumb:hover {
      background: var(--accent-hover);
      transform: scale(1.1);
    }

    .speed-control #speedValue {
      font-size: 14px;
      font-weight: 600;
      color: var(--text-primary);
      min-width: 35px;
      text-align: center;
    }

    .progress-container {
      width: 100%;
      display: flex;
      align-items: center;
    }

    .progress-container input[type="range"] {
      -webkit-appearance: none;
      appearance: none;
      width: 100%;
      height: 8px;
      background: var(--border-color);
      border-radius: 4px;
      outline: none;
    }

    .progress-container input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      appearance: none;
      width: 16px;
      height: 16px;
      background: var(--accent-primary);
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.2s;
    }

    .progress-container input[type="range"]::-webkit-slider-thumb:hover {
      transform: scale(1.2);
      background: var(--accent-hover);
    }

    .progress-container input[type="range"]::-moz-range-thumb {
      width: 16px;
      height: 16px;
      background: var(--accent-primary);
      border-radius: 50%;
      cursor: pointer;
      border: none;
      transition: all 0.2s;
    }

    .progress-container input[type="range"]::-moz-range-thumb:hover {
      transform: scale(1.2);
      background: var(--accent-hover);
    }

    /* Responsividade */
    @media (max-width: 768px) {
      .app-header {
        padding: 15px 20px;
        flex-wrap: wrap;
        gap: 10px;
      }

      .app-header h1 {
        font-size: 20px;
      }

      .app-content {
        padding: 20px 15px;
      }

      .page-header h2 {
        font-size: 22px;
      }

      .studies-table {
        font-size: 12px;
      }

      .studies-table th,
      .studies-table td {
        padding: 12px 10px;
        font-size: 12px;
      }

      .studies-table th {
        font-size: 10px;
      }

      button {
        font-size: 14px;
        padding: 12px;
      }

      .logout-btn {
        font-size: 12px;
        padding: 8px 16px;
      }

      .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
      }
    }

    @media (max-width: 480px) {
      .app-header {
        padding: 12px 15px;
      }

      .app-header h1 {
        font-size: 18px;
      }

      .app-content {
        padding: 15px 10px;
      }

      .studies-table-container {
        border-radius: 8px;
      }

      .studies-table th,
      .studies-table td {
        padding: 10px 8px;
        font-size: 11px;
      }

      .studies-table th {
        font-size: 9px;
        letter-spacing: 0.3px;
      }

      button {
        font-size: 14px;
        padding: 12px;
      }
    }
    
    .video-modal-loading {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      color: white;
      font-size: 18px;
      text-align: center;
    }