/* WireTap panel – Dark theme */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Dark theme (default) */
    --bg-primary: #0f1117;
    --bg-secondary: #161b22;
    --bg-card: #1c2128;
    --bg-card-hover: #22272e;
    --sidebar-bg: #161b22;
    --sidebar-border: rgba(255,255,255,0.06);

    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    --accent-orange: #f0883e;
    --accent-orange-dim: rgba(240, 136, 62, 0.2);
    --accent-blue: #58a6ff;
    --accent-red: #f85149;
    --accent-red-dim: rgba(248, 81, 73, 0.15);

    --primary-color: var(--accent-orange);
    --primary-color-hover: #e67a2e;
    --btn-primary-bg: var(--accent-orange);
    --btn-primary-hover: #e67a2e;
    --toggle-color: var(--text-muted);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.25);
    --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.2);

    --tran-02: all 0.2s ease;
    --tran-03: all 0.3s ease;
    --tran-05: all 0.35s ease;
}

body {
    min-height: 100vh;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--tran-05);
}


/* ----- Sidebar ----- */
.sidebar .text {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--tran-03);
    white-space: nowrap;
    opacity: 1;
}

.sidebar .image {
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    padding: 16px 12px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    transition: var(--tran-05);
    z-index: 100;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.sidebar li {
    height: 48px;
    margin-top: 4px;
    list-style: none;
    display: flex;
    align-items: center;
}

.sidebar li .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    font-size: 22px;
    color: var(--text-secondary);
    transition: var(--tran-02);
}

.sidebar li .icon,
.sidebar li .text {
    color: var(--text-secondary);
    transition: var(--tran-02);
}

.sidebar header {
    position: relative;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 12px;
}

.sidebar header .image-text .image {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: transparent;
}

.sidebar > header .image-text img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(2.75);
}

.sidebar .image-text img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    object-fit: cover;
}

.sidebar header .image-text {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    box-sizing: border-box;
}

header .image-text .header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar > header .header-text .name {
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.header-text .name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-primary);
}

.header-text .membership {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar .menu {
    margin-top: 8px;
}

.sidebar li a {
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--tran-02);
    padding: 0 12px;
}

.sidebar li a:hover {
    background: var(--accent-orange-dim);
}

.sidebar li a:hover .icon,
.sidebar li a:hover .text {
    color: var(--accent-orange);
}

.sidebar .nav-link.active a {
    background: var(--accent-orange-dim);
}

.sidebar .nav-link.active .icon,
.sidebar .nav-link.active .text {
    color: var(--text-primary);
}

/* Logs dropdown */
.sidebar .nav-dropdown > a {
    display: flex;
    align-items: center;
    width: 100%;
}
.sidebar .nav-dropdown .dropdown-arrow {
    margin-left: auto;
    font-size: 18px;
    transition: var(--tran-02);
}
.sidebar .nav-dropdown.open .dropdown-arrow {
    transform: rotate(90deg);
}
.sidebar .nav-sublinks {
    list-style: none;
    padding: 0 0 4px 0;
    margin: 0 0 0 48px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.sidebar .nav-dropdown.open .nav-sublinks {
    max-height: 220px;
}
.sidebar .nav-sublinks li {
    height: 40px;
    margin-top: 0;
}
.sidebar .nav-sublinks a {
    padding-left: 12px;
    font-size: 14px;
    height: 40px;
}
.sidebar .nav-sublinks .icon {
    min-width: 36px;
    font-size: 18px;
}
.sidebar .menu-bar {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.sidebar .menu-bar .menu {
    flex: 0 0 auto;
}

.sidebar .menu-bar .bottom-content {
    flex: 0 0 auto;
    margin-top: auto;
    padding: 0;
    margin-bottom: 0;
    border-top: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
}

.sidebar .menu-bar .bottom-content .bottom-menu-links > li {
    margin-top: 0;
    list-style: none;
}

.sidebar .menu-bar .bottom-content .sidebar-logout-row {
    height: 48px;
    display: flex;
    align-items: center;
}

.sidebar .menu-bar .bottom-content li header {
    padding: 0 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
}

.sidebar .menu-bar .bottom-content li a {
    padding: 0 12px;
}

.sidebar .menu-bar .bottom-content .image-text {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .menu-bar .bottom-content .image-text .image {
    min-width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .menu-bar .bottom-content .image-text .image img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* ----- Main content ----- */
.home {
    position: relative;
    min-height: 100vh;
    left: 260px;
    width: calc(100% - 260px);
    background: var(--bg-primary);
    transition: var(--tran-05);
    padding-bottom: 40px;
}

.home > .text {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 28px 32px 16px;
    letter-spacing: -0.02em;
}

.dashboard-header {
    padding: 28px 32px 0;
    margin-bottom: 24px;
}

.dashboard-header .page-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin: 0 0 4px 0;
}

.dashboard-header .page-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

.quick-action-card {
    margin: 0 32px 28px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.quick-action-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.quick-action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
}

.quick-action-form .quick-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.quick-action-select {
    min-width: 160px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--tran-02);
}

.quick-action-select:focus {
    border-color: var(--accent-orange);
}

.quick-action-input {
    flex: 1;
    min-width: 180px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text-primary);
    background: var(--bg-secondary);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-md);
    outline: none;
    transition: var(--tran-02);
}

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

.quick-action-input:focus {
    border-color: var(--accent-orange);
}

.quick-action-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: var(--accent-orange);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--tran-02);
}

.quick-action-btn:hover {
    background: var(--primary-color-hover);
}

/* ----- Dashboard stats ----- */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
    padding: 0 32px 32px;
}

.dashboard-stats .stat-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: inherit;
    transition: var(--tran-02);
    box-shadow: var(--shadow-card);
}

.dashboard-stats .stat-card:hover {
    border-color: var(--accent-orange);
    background: var(--bg-card-hover);
}

.dashboard-stats .stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dashboard-stats .stat-card .stat-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.dashboard-stats .stat-card .stat-note {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.dashboard-stats .stat-card-muted {
    cursor: default;
    opacity: 0.9;
}

.dashboard-stats .stat-card-muted:hover {
    border-color: var(--sidebar-border);
    background: var(--bg-card);
}

/* ----- Cards (communities, servers) ----- */
.box-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px 32px;
    margin-top: 0;
}

.box-card {
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    overflow: hidden;
    transition: var(--tran-03);
}

.box-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-orange);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.box-card .main-images {
    position: relative;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 16px 0;
}

.box-card .main-images img {
    max-height: 100px;
    max-width: 100%;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.box-card .box-details {
    text-align: center;
}

.box-card .box-details .box_name {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.box-card .button {
    position: relative;
    height: 44px;
    width: 100%;
    border-radius: var(--radius-md);
    margin-top: 20px;
    overflow: hidden;
    cursor: pointer;
    background: var(--accent-orange);
    transition: var(--tran-02);
}

.box-card .button .button-layer {
    display: none;
}

.box-card .button button {
    position: relative;
    height: 100%;
    width: 100%;
    background: none;
    outline: none;
    border: none;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    transition: var(--tran-02);
}

.box-card .button:hover {
    background: var(--primary-color-hover);
    transform: translateY(-1px);
}

/* ----- Community info bar ----- */
.community-info {
    position: fixed;
    top: 20px;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    z-index: 50;
    transition: var(--tran-05);
}

.community-info .image img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.community-info .text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.community-info .name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.community-info .id {
    font-size: 12px;
    color: var(--text-muted);
}

/* ----- Tables ----- */
.table-container {
    margin: 24px 32px;
    max-width: calc(100% - 64px);
    overflow-x: auto;
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

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

.table-container th,
.table-container td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid var(--sidebar-border);
    color: var(--text-primary);
    font-size: 14px;
}

.table-container th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-container tbody tr {
    transition: var(--tran-02);
}

.table-container tbody tr:hover {
    background: var(--bg-card-hover);
}

.table-container tbody tr:last-child td {
    border-bottom: none;
}

.table-container a {
    color: var(--accent-orange);
    text-decoration: none;
    font-weight: 500;
}

.table-container a:hover {
    text-decoration: underline;
}

/* ----- Profile / user page ----- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: minmax(140px, auto);
    gap: 20px;
    padding: 24px 32px;
    color: var(--text-primary);
}

.profile-box {
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    padding: 20px;
    border-radius: var(--radius-lg);
    text-align: center;
    min-height: 140px;
    box-shadow: var(--shadow-card);
}

.identifiers-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.identifier-item {
    background: var(--bg-secondary);
    border: 1px solid var(--sidebar-border);
    padding: 12px;
    border-radius: var(--radius-md);
    text-align: left;
}

.identifier-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.identifier-value {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    word-break: break-all;
}

.discord-profile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.discord-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--accent-blue);
    margin-top: 8px;
}

.discord-username {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 12px;
}

/* ----- Login page ----- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    padding: 24px;
}

.login-page .login-bg-pattern {
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, var(--accent-orange-dim), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, var(--accent-orange-dim), transparent),
        radial-gradient(ellipse 40% 30% at 0% 80%, rgba(88, 166, 255, 0.08), transparent);
    pointer-events: none;
}

.login-card {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: var(--bg-card);
    border: 1px solid var(--sidebar-border);
    border-radius: var(--radius-xl);
    padding: 48px 40px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-card .login-logo-wrap {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--sidebar-border);
    overflow: hidden;
    background: transparent;
}

.login-card .logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(2.75);
}

.login-card .title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.login-card .subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.login-card .discord-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--btn-primary-bg);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    text-decoration: none;
    transition: var(--tran-02);
    box-shadow: 0 4px 14px rgba(240, 136, 62, 0.35);
}

.login-card .discord-button:hover {
    background: var(--btn-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 136, 62, 0.4);
}

.login-card .discord-button:active {
    transform: translateY(0);
}

.login-card .discord-button svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.login-card .hint {
    margin-top: 24px;
    font-size: 13px;
    color: var(--text-muted);
}
