body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

* {
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ===== DataTables ===== */
.dataTables_wrapper {
    padding: 0;
}
.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.4rem 0.75rem;
    font-size: 13px;
    background: #f8fafc;
    outline: none;
    transition: all 0.2s;
}
.dark .dataTables_wrapper .dataTables_length select,
.dark .dataTables_wrapper .dataTables_filter input {
    background: #1e1e3a;
    border-color: #2e2e4a;
    color: #e2e8f0;
}
.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}
.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 8px !important;
    padding: 0.35rem 0.75rem !important;
    margin: 0 2px;
    font-size: 13px;
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
    color: #475569 !important;
}
.dark .dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #16162e !important;
    border-color: #2e2e4a !important;
    color: #94a3b8 !important;
}
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: transparent !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3) !important;
}
table.dataTable thead th {
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid #e2e8f0;
    padding: 0.75rem 0.85rem;
    color: #64748b;
}
.dark table.dataTable thead th {
    border-bottom-color: #2e2e4a;
    color: #94a3b8;
}
table.dataTable.no-footer {
    border-bottom-color: #e2e8f0;
}
.dark table.dataTable.no-footer {
    border-bottom-color: #2e2e4a;
}
table.dataTable.stripe tbody tr.odd,
table.dataTable.display tbody tr.odd {
    background: #f8fafc;
}
.dark table.dataTable.stripe tbody tr.odd,
.dark table.dataTable.display tbody tr.odd {
    background: #1a1a34;
}
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background: #eef2ff;
}
.dark table.dataTable.hover tbody tr:hover,
.dark table.dataTable.display tbody tr:hover {
    background: #222244;
}
table.dataTable td {
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}
.dark table.dataTable td {
    border-bottom-color: #2e2e4a;
    color: #e2e8f0;
}

/* ===== Small boxes (Dashboard stats) ===== */
.small-box {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}
.dark .small-box {
    border-color: #2e2e4a;
}
.small-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.08);
}

/* ===== License key display ===== */
.license-key-display {
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 1.05em;
    letter-spacing: 2px;
    word-break: break-all;
    background: rgba(99,102,241,0.08);
    padding: 8px 14px;
    border-radius: 8px;
    display: inline-block;
}

/* ===== Table action buttons ===== */
.table-actions { white-space: nowrap; width: 1%; min-width: 140px; }
.table-text-truncate {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

/* ===== Scrollbar (Dark mode sidebar) ===== */
.dark .sidebar::-webkit-scrollbar { width: 6px; }
.dark .sidebar::-webkit-scrollbar-track { background: #0a0a1a; }
.dark .sidebar::-webkit-scrollbar-thumb { background: #2e2e4a; border-radius: 3px; }

/* ===== Form label consistency ===== */
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.4rem;
}
.dark .form-label {
    color: #94a3b8;
}

/* ===== Badge helper classes ===== */
.badge-trial { background-color: #06b6d4 !important; color: #fff !important; }
.badge-demo { background-color: #f59e0b !important; color: #fff !important; }
.badge-subscription { background-color: #10b981 !important; color: #fff !important; }
.badge-lifetime { background-color: #8b5cf6 !important; color: #fff !important; }

/* ===== Navigation submenu dots override ===== */
.nav-icon-dot {
    font-size: 6px;
    vertical-align: middle;
}

/* ===== Responsive table helper ===== */
@media (max-width: 767.98px) {
    .table-text-truncate { max-width: 100px; }
    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive-custom table { min-width: 650px; }
}
