/* CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    line-height: 1.6;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    background-color: #fafafa;
    color: #111;
    min-height: 100vh;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
}

/* SVG Grid Background */
.grid-bg {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f0f0f0' fill-opacity='0.3'%3E%3Cpath d='M0 60L60 0H30L0 30M60 60V30L30 60'/%3E%3C/g%3E%3Cg fill='%23e8e8e8' fill-opacity='0.4'%3E%3Cpath d='M0 0h60v60H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: 60px 60px;
}

/* Dark Grid Background */
.dark-grid-bg {
    background: linear-gradient(135deg, #000000 0%, #111111 50%, #000000 100%);
    background-attachment: fixed;
    color: #fff;
    position: relative;
    overflow-x: hidden;
}

.dark-grid-bg::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.02) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    padding: 32px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme Cards */
.dark-grid-bg .card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05);
}

.dark-grid-bg .card h2 {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dark-grid-bg .field label {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.dark-grid-bg .field input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    backdrop-filter: blur(10px);
}

.dark-grid-bg .field input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.2);
}

.dark-grid-bg .field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #000;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    position: relative;
    background: #fff;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #000;
    border-color: #000;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-label:hover .checkmark {
    border-color: #000;
    transform: scale(1.05);
}

.field-help {
    display: block;
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    font-weight: 400;
}

/* Dark Theme Checkbox */
.dark-grid-bg .checkbox-label {
    color: rgba(255, 255, 255, 0.9);
}

.dark-grid-bg .checkmark {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.05);
}

.dark-grid-bg .checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(255, 255, 255, 0.9);
}

.dark-grid-bg .checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    border-color: #000;
}

.dark-grid-bg .checkbox-label:hover .checkmark {
    border-color: rgba(255, 255, 255, 0.5);
}

.dark-grid-bg .field-help {
    color: rgba(255, 255, 255, 0.6);
}

.card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.stack {
    display: flex;
    flex-direction: column;
}

.stack.gap-8 { gap: 8px; }
.stack.gap-12 { gap: 12px; }
.stack.gap-16 { gap: 16px; }
.stack.gap-24 { gap: 24px; }
.stack.gap-32 { gap: 32px; }

.row {
    display: flex;
    align-items: center;
}

.hidden {
    display: none !important;
}

.muted {
    color: #666;
    font-weight: 400;
}

.tiny {
    font-size: 0.875rem;
    font-weight: 500;
}

.text-center {
    text-align: center;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.02em;
}

h1 { 
    font-size: 2.25rem; 
    font-weight: 700;
    letter-spacing: -0.03em;
}
h2 { 
    font-size: 1.75rem; 
    font-weight: 600;
}

.brand-title {
    font-size: 2rem;
    font-weight: 800;
    color: #000;
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, #000 0%, #333 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border: 2px solid transparent;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
    color: #000;
    min-height: 48px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn:focus {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: linear-gradient(135deg, #000 0%, #333 100%);
    color: #fff;
    border-color: #000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.btn.primary:hover {
    background: linear-gradient(135deg, #333 0%, #000 100%);
    border-color: #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.btn.ghost {
    border-color: #000;
    color: #000;
    background: rgba(0, 0, 0, 0.02);
}

.btn.ghost:hover {
    background: #000;
    color: #fff;
    border-color: #000;
}

.btn.small {
    padding: 10px 20px;
    font-size: 0.875rem;
    min-height: 40px;
    border-radius: 10px;
}

/* Form Fields */
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-weight: 600;
    color: #000;
    font-size: 0.875rem;
    letter-spacing: 0.01em;
}

.field input,
.field select,
.field textarea {
    padding: 16px 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    font-weight: 500;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: #000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.field input:read-only {
    background: #f8f8f8;
    color: #666;
    border-color: rgba(0, 0, 0, 0.04);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

/* Key Input Group */
.key-input-group {
    display: flex;
    gap: 8px;
}

.key-input-group input {
    flex: 1;
}

/* Topbar */
.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 16px 0;
    margin-bottom: 24px;
}

/* Dark Topbar */
.topbar.dark {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
}

.topbar.dark .brand-title {
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.topbar.dark .btn.ghost {
    border-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.topbar.dark .btn.ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Brand Section */
.brand-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.3s ease;
}

.topbar-logo:hover {
    transform: scale(1.05);
}

/* Dark theme logo adjustments */
.topbar.dark .topbar-logo {
    filter: brightness(1.2) contrast(1.1);
}

/* Login Container */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Login Card */
.login-card {
    max-width: 400px;
    margin: 100px auto;
}

/* Dark Login Card */
.login-card.dark {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    max-width: 400px;
    width: 100%;
    margin: 0;
    position: relative;
    overflow: hidden;
}

.login-card.dark::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
}

/* Logo Section */
.logo-section {
    text-align: center;
    margin-bottom: 24px;
}

.logo-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin: 0 auto 16px;
    display: block;
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.3s ease;
}

.logo-image:hover {
    transform: scale(1.05);
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: 0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0.01em;
}

/* Login Form Container */
.login-form-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Dark Theme Form Fields */
.login-card.dark .field label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Dark Theme Generate Key Button */
.dark-grid-bg .btn.ghost.small {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dark-grid-bg .btn.ghost.small:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.dark-grid-bg .btn.ghost.small:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Dark Theme Create License Button */
.dark-grid-bg .btn.primary {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.3),
        0 2px 8px rgba(255, 255, 255, 0.1);
}

.dark-grid-bg .btn.primary:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(255, 255, 255, 0.15);
}

.dark-grid-bg .btn.primary:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.4),
        0 4px 12px rgba(255, 255, 255, 0.15);
}

.dark-grid-bg .btn.primary:active {
    transform: translateY(0);
}

.login-card.dark .field input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
}

.login-card.dark .field input::placeholder {
    color: rgba(255, 255, 255, 0.4);
    font-weight: 400;
}

.login-card.dark .field input:focus {
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.1),
        0 4px 12px rgba(0, 0, 0, 0.2);
    outline: none;
    transform: translateY(-1px);
}

.login-card.dark .field input:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

/* Login Button */
.login-btn {
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #000;
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 100%;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, #f8f8f8 0%, #e8e8e8 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 8px 24px rgba(0, 0, 0, 0.3);
}

.login-btn:hover::before {
    left: 100%;
}

.login-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 4px rgba(255, 255, 255, 0.2),
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 4px 16px rgba(0, 0, 0, 0.2);
}

.login-btn:active {
    transform: translateY(0);
}

.lock-icon {
    width: 16px;
    height: 16px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Login Footer */
.login-footer {
    text-align: center;
    margin-top: 16px;
}

.login-footer p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Seized Card */
.seized-card {
    max-width: 600px;
    margin: 100px auto;
}

/* Table */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 16px;
}

/* Dark Theme Table */
.dark-grid-bg .table-container {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
}

.dark-grid-bg .table th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-grid-bg .table td {
    color: rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark-grid-bg .table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.dark-grid-bg .empty-state {
    color: rgba(255, 255, 255, 0.6);
}

.dark-grid-bg .pagination {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.table-controls {
    display: flex;
    gap: 16px;
    align-items: center;
}

.table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th,
.table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #000;
}

/* Sortable Table Headers */
.table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.table th.sortable:hover {
    background: #e8e8e8;
}

.table th.sortable:active {
    background: #d8d8d8;
}

.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.75rem;
    opacity: 0.6;
    transition: all 0.2s ease;
}

.table th.sortable:hover .sort-indicator {
    opacity: 1;
}

/* Dark Theme Sortable Headers */
.dark-grid-bg .table th {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dark-grid-bg .table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: all 0.2s ease;
}

.dark-grid-bg .table th.sortable:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dark-grid-bg .table th.sortable:active {
    background: rgba(255, 255, 255, 0.15);
}

.dark-grid-bg .sort-indicator {
    color: rgba(255, 255, 255, 0.7);
}

.dark-grid-bg .table th.sortable:hover .sort-indicator {
    color: rgba(255, 255, 255, 0.9);
}

.table tbody tr:hover {
    background: #f9f9f9;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.active {
    background: #e5e5e5;
    color: #000;
}

.badge.revoked {
    background: #f5f5f5;
    color: #666;
}

.badge.locked {
    background: #e3f2fd;
    color: #1976d2;
}

.badge.unlocked {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Dark Theme Badges */
.dark-grid-bg .badge.locked {
    background: rgba(25, 118, 210, 0.2);
    color: #64b5f6;
}

.dark-grid-bg .badge.unlocked {
    background: rgba(123, 31, 162, 0.2);
    color: #ba68c8;
}

/* Actions */
.actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.actions .btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    min-height: 32px;
    white-space: nowrap;
}

/* Dark Theme Actions */
.dark-grid-bg .actions .btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.9);
}

.dark-grid-bg .actions .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e5e5;
}

.pagination .btn {
    padding: 8px 12px;
    min-height: 36px;
}

.pagination .btn.active {
    background: #000;
    color: #fff;
    border-color: #000;
}



/* Error Message */
.error-message {
    color: #d32f2f;
    font-size: 0.875rem;
    padding: 8px 12px;
    background: #ffebee;
    border: 1px solid #ffcdd2;
    border-radius: 4px;
}

/* Dark Theme Error Message */
.login-card.dark .error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.08);
    border: 1px solid rgba(255, 107, 107, 0.2);
    border-radius: 12px;
    margin-top: 20px;
    padding: 12px 16px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 16px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .table-controls {
        justify-content: stretch;
    }
    
    .table-controls .field {
        flex: 1;
    }
    
    .topbar-content {
        flex-direction: row;
        gap: 16px;
        align-items: center;
    }
    
    .topbar-logo {
        width: 40px;
        height: 40px;
    }
    
    .key-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    /* Mobile Login Styles */
    .login-card.dark {
        padding: 32px 24px;
        margin: 0 16px;
        border-radius: 20px;
    }
    
    .login-title {
        font-size: 28px;
    }
    
    .login-subtitle {
        font-size: 14px;
    }
    
    .logo-image {
        width: 70px;
        height: 70px;
    }
    
    .login-form-container {
        padding: 24px 20px;
    }
    
    .login-card.dark .field input {
        padding: 16px 18px;
    }
    
    .login-btn {
        padding: 16px 20px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    .table th,
    .table td {
        padding: 6px 8px;
    }
    
    .btn {
        padding: 10px 16px;
        font-size: 0.875rem;
    }
    
    .field input {
        padding: 12px 14px;
        font-size: 0.875rem;
    }
    
    .topbar-logo {
        width: 36px;
        height: 36px;
    }
    
    .topbar-content {
        gap: 12px;
    }
    
    .form-grid {
        gap: 10px;
    }
    
    .table-header {
        gap: 10px;
    }
    
    .actions {
        gap: 4px;
    }
    
    .actions .btn {
        padding: 6px 10px;
        font-size: 0.7rem;
        min-height: 28px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .toast {
        animation: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .grid-bg {
        background-image: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e5e5e5' fill-opacity='0.4'%3E%3Cpath d='M0 80L80 0H40L0 40M80 80V40L40 80'/%3E%3C/g%3E%3Cg fill='%23d0d0d0' fill-opacity='0.6'%3E%3Cpath d='M0 0h80v80H0z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
        background-size: 40px 40px;
    }
}

/* Large Screen Optimizations */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 32px;
    }
    
    .card {
        padding: 40px;
    }
    
    .form-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .table th,
    .table td {
        padding: 16px 20px;
    }
    
    .topbar-logo {
        width: 56px;
        height: 56px;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1199px) {
    .container {
        padding: 0 24px;
    }
    
    .card {
        padding: 28px;
    }
    
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .topbar-logo {
        width: 44px;
        height: 44px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        min-height: 100vh;
        padding: 16px;
    }
    
    .login-card.dark {
        padding: 24px 20px;
    }
    
    .topbar {
        padding: 12px 0;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
    }
}
