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

/* Reduzir animações para melhor performance */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
 
:root {
    --bg-dark: #0a0e27;
    --bg-darker: #050816;
    --card-bg: #1a1f3a;
    --card-bg-hover: #252b4a;
    --card-bg-light: #2a3152;
    --text-primary: #ffffff;
    --text-secondary: #b8c5d6;
    --text-muted: #7a8ba3;
    --border-color: #2a3152;
    --border-light: #3a4262;
    --primary-purple: #8b5cf6;
    --primary-purple-dark: #7c3aed;
    --primary-purple-light: #a78bfa;
    --green: #10b981;
    --green-dark: #059669;
    --blue: #3b82f6;
    --blue-dark: #2563eb;
    --red: #ef4444;
    --red-dark: #dc2626;
    --yellow: #fbbf24;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 12px 32px rgba(0, 0, 0, 0.6);
    --glow-purple: 0 0 20px rgba(139, 92, 246, 0.3);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

.admin-panel {
    display: flex;
    min-height: 100vh;
}

/* Auth Container */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    padding: 20px;
}

.auth-box {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 48px;
    width: 100%;
    max-width: 450px;
    box-shadow: var(--shadow-xl);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 32px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea,
.form-group input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.form-group textarea {
    min-height: 100px;
}

.form-group input[type="file"] {
    cursor: pointer;
    padding: 12px 16px;
}

.form-group input[type="file"]::-webkit-file-upload-button {
    padding: 8px 16px;
    background: var(--primary-purple);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.form-group input[type="file"]::-webkit-file-upload-button:hover {
    background: var(--primary-purple-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(10, 14, 39, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Input com botões */
.input-with-button,
.input-with-buttons {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.input-with-button input,
.input-with-buttons input {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-with-buttons input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Quando só tem botão de copiar (sem gerar) */
.input-with-buttons:has(.btn-copy-key:only-of-type) input {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-with-buttons:has(.btn-copy-key:only-of-type) .btn-copy-key {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 8px;
}

.input-with-button input[readonly],
.input-with-buttons input[readonly] {
    background: rgba(10, 14, 39, 0.4);
    cursor: text;
    color: var(--text-muted);
}

.input-with-buttons input[readonly]:not(:placeholder-shown),
.input-with-buttons input[readonly][value]:not([value=""]),
.input-with-buttons input:not(:placeholder-shown),
.input-with-buttons input[value]:not([value=""]) {
    background: rgba(10, 14, 39, 0.9) !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    font-family: monospace !important;
    font-size: 14px !important;
}

.btn-generate-key {
    padding: 14px 20px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.btn-generate-key:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

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

.btn-generate-key span {
    font-size: 16px;
}

.btn-copy-key {
    padding: 14px 16px;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 12px;
    color: var(--blue);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    min-width: 50px;
}

/* Quando só tem botão de copiar (sem gerar) */
.input-with-buttons:has(.btn-copy-key:only-child) input {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

.input-with-buttons:has(.btn-copy-key:only-child) .btn-copy-key {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    margin-left: 8px;
}

.btn-copy-key:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: var(--blue);
    transform: translateY(-2px);
}

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

.btn-copy-key span {
    font-size: 16px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
}

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple), var(--shadow-lg);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.message {
    margin-top: 24px;
    padding: 14px 18px;
    border-radius: 12px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.message.success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--green);
    display: block;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--red);
    display: block;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    padding: 28px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.sidebar-icon {
    font-size: 36px;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.5));
}

.sidebar-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.sidebar-title p {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0;
    overflow-y: auto;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-size: 15px;
    font-weight: 500;
    margin: 4px 12px;
    border-radius: 12px;
}

.nav-link:hover {
    background: rgba(139, 92, 246, 0.1);
    color: var(--text-primary);
    transform: translateX(4px);
    border-left-color: var(--primary-purple);
}

.nav-link.active {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    color: var(--primary-purple-light);
    border-left-color: var(--primary-purple);
    box-shadow: var(--shadow-sm);
    font-weight: 600;
}

.nav-link span {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: rgba(10, 14, 39, 0.5);
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-logout:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), var(--shadow-lg);
}

/* Main Content */
.main-content {
    margin-left: 300px;
    padding: 32px;
    padding-right: 32px;
    min-height: 100vh;
    background: transparent;
    width: calc(100% - 300px);
    box-sizing: border-box;
}

.content-section {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

.content-section.active {
    display: block;
}

/* Content Cards */
.content-card {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    box-sizing: border-box;
}

.content-card:hover {
    box-shadow: var(--shadow-xl);
    border-color: var(--border-light);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 8px rgba(139, 92, 246, 0.3));
}

.card-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

/* Keys Stats Cards */
.keys-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.keys-stat-card {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.keys-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-purple), var(--primary-purple-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.keys-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-purple);
}

.keys-stat-card:hover::before {
    transform: scaleX(1);
}

.keys-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 16px;
}

.keys-stat-icon.total {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.keys-stat-icon.active {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.keys-stat-icon.expired {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2) 0%, rgba(239, 68, 68, 0.1) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.keys-stat-icon.available {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.keys-stat-icon.unavailable {
    background: linear-gradient(135deg, rgba(120, 120, 120, 0.2) 0%, rgba(120, 120, 120, 0.1) 100%);
    border: 1px solid rgba(120, 120, 120, 0.3);
}

.keys-stat-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.keys-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
    line-height: 1;
}

.keys-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin: 0;
}

.keys-stat-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--border-color);
    border-radius: 0 0 16px 16px;
}

.keys-stat-progress-bar {
    height: 100%;
    transition: width 0.5s ease;
    border-radius: 0 0 16px 16px;
}

.keys-stat-progress-bar.total {
    background: var(--blue);
}

.keys-stat-progress-bar.active {
    background: var(--green);
}

.keys-stat-progress-bar.expired {
    background: var(--red);
}

.keys-stat-progress-bar.available {
    background: var(--primary-purple);
}

.keys-stat-progress-bar.unavailable {
    background: #9ca3af;
}

/* Dashboard Cards */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.dashboard-card {
    background: linear-gradient(145deg, rgba(26, 31, 58, 0.8) 0%, rgba(20, 25, 50, 0.9) 100%);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.2);
    border-color: var(--primary-purple);
}

.dashboard-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.dashboard-card-icon.users {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2) 0%, rgba(59, 130, 246, 0.1) 100%);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.dashboard-card-icon.apps {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.dashboard-card-icon.keys {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.dashboard-card-content {
    flex: 1;
    min-width: 0;
}

.dashboard-card-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    line-height: 1;
}

.dashboard-card-label {
    font-size: 11px;
    color: var(--text-muted);
    margin: 0;
}

.dashboard-card-arrow {
    font-size: 18px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.dashboard-card:hover .dashboard-card-arrow {
    color: var(--primary-purple);
}

/* Generate Form */
.generate-form {
    margin-top: 24px;
}

/* Form Row - Grid para alinhamento perfeito no eixo Y */
.form-row {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.8fr auto;
    gap: 16px;
    align-items: start;
}

.form-field {
    display: grid;
    grid-template-rows: auto 48px auto;
    gap: 0;
    min-width: 0;
}

.form-field label {
    grid-row: 1;
    display: block;
    margin-bottom: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    height: 20px;
    line-height: 20px;
}

.form-field input,
.form-field select {
    grid-row: 2;
    width: 100%;
    padding: 14px 16px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
    height: 48px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    margin: 0;
}

.form-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-field input:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(10, 14, 39, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.form-field small {
    grid-row: 3;
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 1.4;
    height: 18px;
    min-height: 18px;
}

.btn-generate {
    grid-column: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: var(--shadow-md);
    height: 48px;
    min-width: 160px;
    margin-top: 30px;
    align-self: start;
}

.btn-generate:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-purple), var(--shadow-lg);
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.btn-action {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-action.green {
    background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
    color: white;
}

.btn-action.green:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4), var(--shadow-md);
}

.btn-action.blue {
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: white;
}

.btn-action.blue:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4), var(--shadow-md);
}

.btn-action.purple {
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: white;
}

.btn-action.purple:hover {
    box-shadow: var(--glow-purple), var(--shadow-md);
}

.btn-action.red {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-action.red:hover {
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.4), var(--shadow-md);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
}

/* Filters */
.filters-row {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 14px 18px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(10, 14, 39, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.filter-select {
    padding: 14px 18px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-purple);
    background: rgba(10, 14, 39, 0.8);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    background: rgba(10, 14, 39, 0.4);
}

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

.keys-table thead {
    background: rgba(139, 92, 246, 0.1);
}

.keys-table th {
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--border-color);
}

.keys-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.keys-table tbody tr {
    transition: all 0.2s ease;
}

.keys-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

.empty-message {
    text-align: center;
    padding: 60px;
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.status-badge.ativa {
    background: rgba(16, 185, 129, 0.2);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-badge.expirada {
    background: rgba(239, 68, 68, 0.2);
    color: var(--red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.status-badge.disponivel {
    background: rgba(59, 130, 246, 0.2);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge.nao_disponivel {
    background: rgba(120, 120, 120, 0.2);
    color: #9ca3af;
    border: 1px solid rgba(120, 120, 120, 0.3);
}

.status-badge.usada {
    background: rgba(139, 92, 246, 0.2);
    color: var(--primary-purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.role-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-dark) 100%);
    color: white;
    letter-spacing: 0.5px;
}

.role-badge.admin {
    background: linear-gradient(135deg, var(--yellow) 0%, #f59e0b 100%);
    color: var(--bg-dark);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
}

.pagination {
    display: flex;
    gap: 10px;
}

.pagination button {
    padding: 10px 16px;
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 10px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination button:hover:not(:disabled) {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--primary-purple);
    color: var(--primary-purple-light);
    transform: translateY(-2px);
}

.pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 8, 22, 0.8);
    backdrop-filter: blur(8px);
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 36px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}

.close {
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

.modal-content h2 {
    margin-bottom: 24px;
    background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 26px;
    font-weight: 700;
}

/* Modal Tabs */
.modal-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
}

.modal-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    bottom: -2px;
}

.modal-tab:hover {
    color: var(--text-primary);
    background: rgba(139, 92, 246, 0.1);
}

.modal-tab.active {
    color: var(--primary-purple);
    border-bottom-color: var(--primary-purple);
    background: rgba(139, 92, 246, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.modal-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.modal-actions .btn {
    flex: 1;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-purple);
}

/* Sistema de Notificações */
.notifications-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.notification {
    background: rgba(26, 31, 58, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-width: 300px;
    max-width: 400px;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    pointer-events: all;
}

.notification.show {
    opacity: 1;
    transform: translateX(0);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.notification-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.notification-message {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
}

.notification-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.notification-close:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* Tipos de notificação */
.notification-success {
    border-left: 4px solid var(--green);
}

.notification-success .notification-icon {
    color: var(--green);
}

.notification-error {
    border-left: 4px solid var(--red);
}

.notification-error .notification-icon {
    color: var(--red);
}

.notification-warning {
    border-left: 4px solid #f59e0b;
}

.notification-warning .notification-icon {
    color: #f59e0b;
}

.notification-info {
    border-left: 4px solid var(--blue);
}

.notification-info .notification-icon {
    color: var(--blue);
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .notifications-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .notification {
        min-width: auto;
        max-width: none;
    }
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

    .main-content {
        margin-left: 0;
        padding: 20px;
        width: 100%;
    }

    .form-row {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 20px;
    }

    .form-field {
        min-width: 100%;
        width: 100%;
    }

    .btn-generate {
        width: 100%;
        min-width: auto;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-action {
        width: 100%;
        justify-content: center;
    }

    .filters-row {
        flex-direction: column;
    }

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

    .keys-table th,
    .keys-table td {
        padding: 12px 8px;
    }
}

/* Modal de Visualização de Aplicativo */
.view-app-info {
    margin-bottom: 24px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 150px;
}

.info-row span {
    color: var(--text-secondary);
    text-align: right;
    flex: 1;
}

.view-app-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.view-app-actions .btn-action {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
}

.view-app-actions .btn-action.yellow {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
}

.view-app-actions .btn-action.yellow:hover {
    background: linear-gradient(135deg, #d97706, #b45309);
    transform: translateY(-2px);
}

/* Rev Tabs */
.rev-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.rev-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rev-tab:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    color: var(--text-primary);
}

.rev-tab.active {
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-light));
    border-color: var(--primary-purple);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.rev-tab span {
    font-size: 16px;
}

.rev-tab-content {
    display: none;
}

.rev-tab-content.active {
    display: block;
}

.generate-link-section {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 24px;
}

.links-section {
    margin-top: 32px;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

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

.status-badge.status-used {
    background: rgba(107, 114, 128, 0.2);
    color: #6b7280;
    border: 1px solid rgba(107, 114, 128, 0.3);
}

.btn-action.small {
    padding: 6px 12px;
    font-size: 14px;
    min-width: auto;
}

.copy-link-btn {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
}

.copy-link-btn:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.5);
}
