/* ════════════════════════════════════════════════════════════════
   GOODTEAM Custom Theme Override
   ════════════════════════════════════════════════════════════════ */

/* ── Variables ───────────────────────────────────────────────── */
:root {
    --gt-primary: #6366f1;
    --gt-secondary: #8b5cf6;
    --gt-success: #10b981;
    --gt-danger: #ef4444;
    --gt-warning: #f59e0b;
    --gt-info: #3b82f6;
    --gt-dark: #1e1b4b;
    --gt-card-bg: #ffffff;
    --gt-shadow: 0 4px 24px rgba(99, 102, 241, .10);
    --gt-radius: 16px;
}

/* ── Sidebar ─────────────────────────────────────────────────── */
#sidebar-menu .metismenu li a {
    font-size: 13.5px;
    border-radius: 10px;
    margin: 2px 10px;
    transition: all .2s;
}

#sidebar-menu .metismenu li a:hover,
#sidebar-menu .metismenu li a.active {
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary)) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
}

#sidebar-menu .metismenu li a i {
    font-size: 16px;
}

.vertical-menu {
    background: linear-gradient(180deg, #1e1b4b 0%, #312e81 100%) !important;
}

.vertical-menu .navbar-brand-box {
    background: transparent !important;
}

#sidebar-menu ul li a {
    color: rgba(255, 255, 255, .75) !important;
}

#sidebar-menu ul li a:hover {
    color: #fff !important;
}

.menu-title {
    color: rgba(255, 255, 255, .45) !important;
    font-size: 10px !important;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 20px 25px 5px;
}

/* ── Topbar ──────────────────────────────────────────────────── */
#page-topbar {
    background: #fff !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06) !important;
}

.navbar-header .logo-txt {
    font-weight: 700;
    font-size: 16px;
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Stat Cards ──────────────────────────────────────────────── */
.gt-stat-card {
    border: none;
    border-radius: var(--gt-radius);
    overflow: hidden;
    position: relative;
    box-shadow: var(--gt-shadow);
    transition: transform .2s, box-shadow .2s;
}

.gt-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(99, 102, 241, .18);
}

.gt-stat-card .gt-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.gt-stat-card .gt-stat-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
}

.gt-stat-card .gt-stat-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}

.gt-stat-card .gt-stat-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 20px;
    font-weight: 600;
}

.gt-stat-card .gt-wave {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    opacity: .08;
    transform: translate(30%, 30%);
}

/* Color variants */
.gt-stat-indigo .gt-stat-icon {
    background: rgba(99, 102, 241, .12);
    color: var(--gt-primary);
}

.gt-stat-indigo .gt-wave {
    background: var(--gt-primary);
}

.gt-stat-violet .gt-stat-icon {
    background: rgba(139, 92, 246, .12);
    color: var(--gt-secondary);
}

.gt-stat-violet .gt-wave {
    background: var(--gt-secondary);
}

.gt-stat-emerald .gt-stat-icon {
    background: rgba(16, 185, 129, .12);
    color: var(--gt-success);
}

.gt-stat-emerald .gt-wave {
    background: var(--gt-success);
}

.gt-stat-amber .gt-stat-icon {
    background: rgba(245, 158, 11, .12);
    color: var(--gt-warning);
}

.gt-stat-amber .gt-wave {
    background: var(--gt-warning);
}

.gt-stat-blue .gt-stat-icon {
    background: rgba(59, 130, 246, .12);
    color: var(--gt-info);
}

.gt-stat-blue .gt-wave {
    background: var(--gt-info);
}

.gt-stat-rose .gt-stat-icon {
    background: rgba(239, 68, 68, .12);
    color: var(--gt-danger);
}

.gt-stat-rose .gt-wave {
    background: var(--gt-danger);
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    border: none !important;
    border-radius: var(--gt-radius) !important;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .06) !important;
}

.card-header {
    border-bottom: 1px solid #f3f4f6 !important;
    background: transparent !important;
    padding: 16px 20px !important;
    font-weight: 600;
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary)) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(99, 102, 241, .3);
    transition: all .2s;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, .4) !important;
}

.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border: none !important;
    border-radius: 10px !important;
    font-weight: 500;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
    border: none !important;
    border-radius: 10px !important;
}

.btn-light {
    background: #f3f4f6 !important;
    border: none !important;
    border-radius: 10px !important;
    color: #374151 !important;
}

.btn-light:hover {
    background: #e5e7eb !important;
}

/* ── Tables ──────────────────────────────────────────────────── */
.table thead th {
    background: #f8f9ff !important;
    border-bottom: 2px solid #e5e7eb !important;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #6b7280;
    padding: 12px 16px;
}

.table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    border-color: #f3f4f6;
}

.table tbody tr:hover td {
    background: #fafaff !important;
}

.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

/* ── Badges ──────────────────────────────────────────────────── */
.badge {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 4px 10px !important;
}

/* ── Forms ───────────────────────────────────────────────────── */
.form-control,
.form-select {
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
    font-size: 13.5px;
    padding: 8px 14px !important;
    transition: border-color .2s, box-shadow .2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gt-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12) !important;
}

.modal-content {
    border: none !important;
    border-radius: var(--gt-radius) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .15) !important;
}

.modal-header {
    border-bottom: 1px solid #f3f4f6 !important;
    padding: 16px 20px !important;
}

.modal-footer {
    border-top: 1px solid #f3f4f6 !important;
}

/* ── Page title ──────────────────────────────────────────────── */
.page-title-box h4 {
    font-weight: 700;
    font-size: 18px !important;
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.breadcrumb-item a {
    color: var(--gt-primary) !important;
}

/* ── Auth pages ──────────────────────────────────────────────── */
.auth-page {
    background: linear-gradient(135deg, #ede9fe 0%, #dbeafe 50%, #e0f2fe 100%) !important;
    min-height: 100vh;
}

.auth-full-page-content {
    background: #fff !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 60px rgba(99, 102, 241, .15) !important;
    min-height: auto !important;
}

.auth-logo .logo-txt {
    font-weight: 800;
    font-size: 20px;
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Name Key badges ─────────────────────────────────────────── */
.namekey-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, var(--gt-primary), var(--gt-secondary));
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: default;
}

.namekey-badge .del-nk {
    cursor: pointer;
    opacity: .7;
    transition: opacity .15s;
}

.namekey-badge .del-nk:hover {
    opacity: 1;
}

/* ── DataTable ───────────────────────────────────────────────── */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link {
    background: var(--gt-primary) !important;
    border-color: var(--gt-primary) !important;
    border-radius: 8px !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-link {
    border-radius: 8px !important;
    margin: 0 2px;
}

div.dataTables_wrapper div.dataTables_filter input {
    border-radius: 10px !important;
    border: 1.5px solid #e5e7eb !important;
}

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 3px;
}

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

/* ── Dropdown ────────────────────────────────────────────────── */
.dropdown-menu {
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, .12) !important;
    padding: 8px !important;
}

.dropdown-item {
    border-radius: 8px !important;
    font-size: 13.5px;
    padding: 8px 14px !important;
}

.dropdown-item:hover {
    background: #f3f4f6 !important;
    color: var(--gt-primary) !important;
}

/* ── Progress ────────────────────────────────────────────────── */
.progress {
    border-radius: 10px !important;
    background: #f3f4f6 !important;
}

.progress-bar {
    border-radius: 10px !important;
}

/* ── Animations ──────────────────────────────────────────────── */
@keyframes gt-fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.gt-stat-card {
    animation: gt-fadeUp .4s ease both;
}

.gt-stat-card:nth-child(2) {
    animation-delay: .05s;
}

.gt-stat-card:nth-child(3) {
    animation-delay: .10s;
}

.gt-stat-card:nth-child(4) {
    animation-delay: .15s;
}

/* ── Status Badges ───────────────────────────────────────────── */
.gt-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .3px;
}

.gt-badge-active {
    background: #d1fae5;
    color: #065f46;
}

.gt-badge-expired {
    background: #fee2e2;
    color: #991b1b;
}

.gt-badge-pending {
    background: #fef3c7;
    color: #92400e;
}

.gt-badge-locked {
    background: #fee2e2;
    color: #991b1b;
}

.gt-badge-online {
    background: #dbeafe;
    color: #1e40af;
}

.gt-badge-dot::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.gt-badge-active.gt-badge-dot::before {
    background: #10b981;
}

.gt-badge-expired.gt-badge-dot::before {
    background: #ef4444;
}

.gt-badge-pending.gt-badge-dot::before {
    background: #f59e0b;
}

.gt-badge-locked.gt-badge-dot::before {
    background: #ef4444;
}

/* ── Key display ─────────────────────────────────────────────── */
.gt-key-cell {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    background: #f8f9ff;
    padding: 4px 10px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    transition: all .15s;
    color: #374151;
}

.gt-key-cell:hover {
    background: #ede9fe;
    border-color: #c4b5fd;
    color: #6366f1;
}

.gt-key-cell.copied {
    background: #d1fae5;
    border-color: #6ee7b7;
    color: #065f46;
}

/* ── UDID progress ───────────────────────────────────────────── */
.gt-uuid-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
}

.gt-uuid-bar .gt-uuid-prog {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
    min-width: 40px;
}

.gt-uuid-bar .gt-uuid-fill {
    height: 100%;
    border-radius: 3px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width .3s;
}

.gt-uuid-bar .gt-uuid-fill.full {
    background: #ef4444;
}

/* ── Action buttons ──────────────────────────────────────────── */
.gt-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all .15s;
    font-size: 14px;
}

.gt-action-btn:hover {
    transform: scale(1.1);
}

.gt-action-reset {
    background: #ede9fe;
    color: #6366f1;
}

.gt-action-delete {
    background: #fee2e2;
    color: #ef4444;
}

.gt-action-edit {
    background: #dbeafe;
    color: #3b82f6;
}

.gt-action-lock {
    background: #fee2e2;
    color: #ef4444;
}

.gt-action-unlock {
    background: #d1fae5;
    color: #10b981;
}

.gt-action-copy {
    background: #f3f4f6;
    color: #6b7280;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.gt-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 16px;
}

.gt-toolbar-divider {
    width: 1px;
    height: 28px;
    background: #e5e7eb;
    margin: 0 4px;
}

.gt-info-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f3f4f6;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.gt-info-pill strong {
    color: #6366f1;
}

/* ── Table row highlight ─────────────────────────────────────── */
.table tbody tr.row-expired {
    background: #fff9f9 !important;
}

.table tbody tr.row-pending {
    background: #fffdf5 !important;
}

.table tbody tr.row-active {
    background: #f9fff9 !important;
}

/* ── Date display ────────────────────────────────────────────── */
.gt-date {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
}

.gt-date.expired {
    color: #ef4444;
    font-weight: 600;
}

.gt-date-sub {
    font-size: 10px;
    color: #9ca3af;
    display: block;
}

/* ── UDID mono ───────────────────────────────────────────────── */
.gt-udid {
    font-family: monospace;
    font-size: 11px;
    color: #4b5563;
    background: #f9fafb;
    padding: 2px 6px;
    border-radius: 4px;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    cursor: default;
}

/* ── Page header bar ─────────────────────────────────────────── */
.gt-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.gt-page-header h4 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}

.gt-stats-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gt-mini-stat {
    background: #f3f4f6;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #374151;
}

.gt-mini-stat span {
    color: #6366f1;
}

/* ── Key expired badge ───────────────────────────────────────── */
.key-expired {
    color: #ef4444;
    font-size: 11px;
    font-weight: 600;
}

.key-active {
    color: #10b981;
    font-size: 11px;
    font-weight: 600;
}

.key-pending {
    color: #f59e0b;
    font-size: 11px;
    font-weight: 600;
}