@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #38bdf8;
    /* Sky 400 */
    --primary-light: #7dd3fc;
    --primary-glow: rgba(56, 189, 248, 0.4);
    --bg-dark: #0f172a;
    /* Slate 900 */
    --bg-darker: #020617;
    /* Slate 950 */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #f1f5f9;
    /* Slate 100 */
    --text-dim: #94a3b8;
    /* Slate 400 */
    --sidebar-width: 250px;
    --border-radius: 0px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background: var(--bg-dark);
    background-image:
        radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.15) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    line-height: 1.6;
}

/* Glassmorphism */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 0px;
}

.card.glass {
    background: rgba(15, 23, 42, 0.6);
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem;
}

/* Nav Styles */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 2.5rem;
    margin-bottom: 3rem;
    position: sticky;
    top: 20px;
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Sidebar for Admin */
.admin-layout {
    display: flex;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-dark);
    position: fixed;
    top: 0;
    left: 0;
    border-right: 1px solid var(--border-slate);
    display: flex;
    flex-direction: column;
    padding: 0;
    transition: 0.3s;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
}

/* Sidebar Header (Nexus Style) */
.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-slate);
    background: rgba(0, 0, 0, 0.2);
}

.sidebar-logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #38bdf8, #1d4ed8);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
    box-shadow: 0 4px 12px rgba(56, 189, 248, 0.3);
}

.sidebar-brand h3 {
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 3px;
}

.sidebar-brand p {
    font-size: 0.65rem;
    color: var(--text-dim);
    font-weight: 500;
}

/* Account Box Refinement */
.account-box {
    margin: 1rem;
    padding: 0.75rem;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--border-slate);
    border-radius: 0px;
    display: flex;
    align-items: center;
    position: relative;
}

.account-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #38bdf8, #0ea5e9);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: white;
    margin-right: 10px;
}

.account-info {
    flex: 1;
}

.account-info .name {
    font-size: 0.85rem;
    font-weight: 700;
    display: block;
}

.account-info .username {
    font-size: 0.7rem;
    color: var(--text-dim);
    display: block;
}

.account-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.account-action-btn {
    width: 32px;
    height: 32px;
    background: #1e293b;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    text-decoration: none;
    transition: 0.2s;
    font-size: 0.9rem;
}

.account-action-btn:hover {
    background: #334155;
    color: var(--primary);
}

.role-badge-nexus {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: var(--primary);
    color: #020617;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 800;
    margin-top: 5px;
    cursor: default;
    width: fit-content;
    text-transform: uppercase;
}

.nav-group-title {
    padding: 0.75rem 1.25rem 0.25rem;
    font-size: 10px;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.nav-links {
    list-style: none;
    padding: 0 0.75rem;
    width: 100%;
}

.nav-item-header {
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-dim);
    cursor: pointer;
    transition: 0.2s;
}

.nav-item-header:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.03);
}

.nav-item-header.active {
    background: rgba(30, 41, 59, 1);
    color: var(--primary);
    border: 1px solid rgba(51, 65, 85, 0.5);
    position: relative;
}

.nav-item-header.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.nav-submenu {
    list-style: none;
    padding-left: 1.25rem;
    margin-bottom: 0.25rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-links li.open .nav-submenu {
    max-height: 500px;
}

.arrow-icon {
    transition: transform 0.3s ease;
}

.nav-links li.open .arrow-icon {
    transform: rotate(180deg);
}

.nav-submenu li {
    margin-bottom: 0.1rem;
}

.nav-submenu a {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 0px;
    gap: 10px;
    transition: 0.2s;
}

.nav-submenu a:hover {
    color: var(--text-main);
}

.nav-submenu a.active {
    background: rgba(56, 189, 248, 0.08);
    color: var(--primary);
    border-left: 2px solid var(--primary);
}

.nav-submenu a .icon-box {
    width: 28px;
    height: 28px;
    font-size: 0.8rem;
    border-radius: 0px;
}

.link-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.link-content .title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.link-content .subtext {
    font-size: 10px;
    color: #64748b;
    line-height: 1.2;
    font-weight: 500;
}

.nav-links a {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: 0px;
    transition: all 0.2s ease;
    gap: 12px;
    position: relative;
    margin: 0.1rem 0;
}

.nav-links a:hover {
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.05);
}

.nav-links a.active {
    background: rgba(30, 41, 59, 1);
    color: var(--primary);
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.nav-links a.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary);
    box-shadow: 0 0 10px var(--primary);
}

.nav-links a .icon-box {
    width: 32px;
    height: 32px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(51, 65, 85, 0.2);
    border-radius: 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-dim);
    transition: 0.2s;
    flex-shrink: 0;
}

.nav-links a.active .icon-box {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--primary);
}

.nav-links a:hover .icon-box {
    background: rgba(30, 41, 59, 1);
    color: var(--text-main);
}

.nav-links a .link-content {
    display: flex;
    flex-direction: column;
}

.nav-links a .title {
    font-weight: 600;
    font-size: 13px;
}

.nav-links a .subtext {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 1px;
}


.sidebar-footer {
    padding: 1.25rem;
    border-top: 1px solid var(--border-slate);
    display: flex;
    gap: 10px;
}

.footer-btn {
    flex: 1;
    background: var(--border-slate);
    color: var(--text-main);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 10px;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
}

.sidebar-footer-nexus {
    padding: 1.5rem 1rem;
    border-top: 1px solid var(--border-slate);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: #475569;
}

.sidebar-footer-nexus .panel-name {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 600;
}

.sidebar-footer-nexus .version {
    font-size: 10px;
}

.sidebar-footer-nexus .icon {
    color: var(--primary);
    font-size: 12px;
}

/* Activity Log Expansion */
.log-table-container {
    margin-top: 1.5rem;
    overflow-x: auto;
}

.log-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.log-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid var(--border-slate);
}

.log-row {
    background: rgba(15, 23, 42, 0.4);
    transition: 0.2s;
}

.log-row:hover {
    background: rgba(30, 41, 59, 0.6);
}

.log-td {
    padding: 1rem;
    vertical-align: middle;
}

.log-td:first-child {
    border-radius: 4px 0 0 4px;
}

.log-td:last-child {
    border-radius: 0 4px 4px 0;
}

.log-index {
    width: 24px;
    height: 24px;
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
}

.log-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.log-avatar {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
    flex-shrink: 0;
}

.log-username {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.log-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: capitalize;
}

/* Badge Variants */
.badge-role {
    background: rgba(139, 92, 246, 0.15) !important;
    color: #a78bfa !important;
    border: 1px solid rgba(139, 92, 246, 0.2) !important;
}

.badge-verify {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.badge-verify.pending {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}

.badge-status {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #34d399 !important;
    border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.badge-status.suspended {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.15) !important;
}

.log-detail {
    font-size: 13px;
    color: #94a3b8;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.log-time-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.log-date {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-main);
}

.log-time {
    font-size: 10px;
    color: #64748b;
}

.log-relative {
    font-size: 10px;
    color: var(--primary);
    opacity: 0.8;
}

.main-content {
    margin-left: var(--sidebar-width);
    padding: 2.5rem;
    width: 100%;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 6rem 0;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero p {
    color: var(--text-dim);
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 3rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.4s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 12px;
}

.btn-edit {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

.btn-edit:hover {
    background: var(--primary);
    color: #fff;
}

.btn-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    margin-left: 8px;
}

.btn-delete:hover {
    background: #ef4444;
    color: #fff;
}

.btn.glass {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-main);
    border: 1px solid var(--glass-border);
}

.btn.glass:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-slate);
    border-radius: 16px;
    padding: 2rem;
    transition: 0.3s;
}

.card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

/* Stat Card Specifics */
.stat-card .card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
}

.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0.5rem 0;
}

.stat-card .label {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 500;
}

.stat-card .progress-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 100px;
    margin-top: 1rem;
    overflow: hidden;
}

.stat-card .progress-fill {
    height: 100%;
    border-radius: 100px;
}

/* Split Layout for Activity/Actions */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.btn-quick {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-slate);
    border-radius: 12px;
    color: var(--text-main);
    text-decoration: none;
    margin-bottom: 0.8rem;
    transition: 0.2s;
    font-weight: 500;
}

.btn-quick:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--primary);
    transform: translateX(5px);
}

.btn-quick span {
    font-size: 1.2rem;
}

/* Tables */
table {
    width: 100%;
    margin-top: 1.5rem;
}

th {
    padding: 1.25rem 1rem;
    color: var(--text-dim);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-bottom: 2px solid var(--glass-border);
    text-align: left;
}

td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-active {
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.status-expired {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
        filter: blur(10px);
    }

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

.animate {
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close-modal {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    cursor: pointer;
    color: var(--text-dim);
    transition: 0.3s;
    font-size: 1.5rem;
}

.close-modal:hover {
    color: #fff;
    transform: rotate(90deg);
}

.modal-header {
    margin-bottom: 2rem;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
}

.modal-header p {
    color: var(--text-dim);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Form Elements */
input,
select,
textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.03);
    color: #fff;
    outline: none;
    transition: 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

select option {
    background: #0f172a;
    color: #fff;
}

.form-group label {
    display: block;
    margin-bottom: 0.6rem;
    color: var(--text-dim);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Settings Tabs */
.settings-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-slate);
    padding-bottom: 1rem;
}

.settings-tab {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dim);
    transition: 0.2s;
    border: 1px solid transparent;
}

.settings-tab:hover {
    color: var(--text-main);
}

.settings-tab.active {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
    border-color: rgba(56, 189, 248, 0.2);
}

.settings-section {
    display: none;
}

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

/* Activity Log Entry */
.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-slate);
    gap: 1rem;
    transition: 0.2s;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.02);
}

.activity-status {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.activity-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.activity-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.activity-info {
    background: rgba(56, 189, 248, 0.1);
    color: var(--primary);
}

.activity-details {
    flex: 1;
}

.activity-details .action {
    font-size: 0.9rem;
    font-weight: 600;
    display: block;
}

.activity-details .meta {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.activity-time {
    font-size: 0.8rem;
    color: var(--text-dim);
    white-space: nowrap;
}

/* Status Dot */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.status-dot.active {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-dot.inactive {
    background-color: var(--danger);
}