﻿
/* Contacts sidebar (Friends as sidebar - Phase 1) */
.csb {
    width: 280px;
    min-width: 280px;
    background: var(--bg1);
    border-right: 1px solid var(--brd);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.csb-hdr {
    padding: 14px 16px 0;
    flex-shrink: 0;
}

.csb-hdr-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.csb-title {
    font-family: var(--fd), sans-serif;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--t1);
}

.csb-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--t3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
}

.csb-add-btn:hover {
    background: var(--bg3);
    color: var(--t1);
}

.csb-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    border-radius: 9px;
    padding: 8px 12px;
    margin-bottom: 10px;
    cursor: text;
}

.csb-search input {
    background: none;
    border: none;
    outline: none;
    font-family: var(--fb), sans-serif;
    font-size: 13px;
    color: var(--t1);
    width: 100%;
}

.csb-search input::placeholder {
    color: var(--t3);
}

.csb-search-icon {
    font-size: 13px;
    color: var(--t3);
    flex-shrink: 0;
}

.ctabs {
    display: flex;
    gap: 2px;
    padding: 0 16px 10px;
    flex-shrink: 0;
}

.ctab {
    flex: 1;
    padding: 6px 8px;
    border-radius: 7px;
    border: none;
    background: transparent;
    color: var(--t3);
    font-family: var(--fm), monospace;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    text-transform: uppercase;
    position: relative;
}

.ctab.on {
    background: var(--bg3);
    color: var(--t1);
}

.ctab:hover:not(.on) {
    color: var(--t2);
}

.ctab-badge {
    position: absolute;
    top: 2px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--warn);
}

.clist {
    flex: 1;
    overflow-y: auto;
    padding: 0 8px 8px;
}

.clist::-webkit-scrollbar {
    width: 3px;
}

.clist::-webkit-scrollbar-thumb {
    background: var(--bg4);
    border-radius: 2px;
}

.clist-empty {
    padding: 16px;
    text-align: center;
    font-size: 13px;
    color: var(--t3);
}

.clabel {
    font-family: var(--fm), monospace;
    font-size: 10px;
    color: var(--t3);
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 10px 8px 4px;
}

.citem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .12s;
    position: relative;
}

.citem:hover {
    background: var(--bg3);
}

.citem.active {
    background: var(--bg4);
}

.citem.active .cnm {
    color: var(--t1);
}


.cav {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd), sans-serif;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    position: relative;
}

.cav .dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 3px solid var(--bg1);
}

.cav .dot.on {
    background: var(--a2);
}

.cav .dot.dnd {
    background: var(--red);
}

.cinfo {
    flex: 1;
    min-width: 0;
}

.cnm {
    font-family: var(--fd), sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--t2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .12s;
}

.citem:hover .cnm {
    color: var(--t1);
}

.csub {
    font-family: var(--fb), sans-serif;
    font-size: 11px;
    color: var(--t3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 1px;
}

.cbdg {
    background: var(--red);
    color: #fff;
    font-family: var(--fm), monospace;
    font-size: 10px;
    font-weight: 700;
    border-radius: 8px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    flex-shrink: 0;
}

.cpend {
    background: rgba(255, 165, 2, .15);
    border: 1px solid rgba(255, 165, 2, .3);
    color: var(--warn);
    font-family: var(--fm), monospace;
    font-size: 10px;
    border-radius: 6px;
    padding: 2px 7px;
    flex-shrink: 0;
}

.citem-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.upanel {
    padding: 8px 10px;
    border-top: 1px solid var(--brd);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.upav {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00e5a0, #00b37a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd), sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #0a0b0f;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

.upav .dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 3px solid var(--bg1);
}

.uinfo {
    flex: 1;
    min-width: 0;
}

.unm {
    font-family: var(--fd), sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--t1);
    line-height: 1;
}

.utag {
    font-family: var(--fm), monospace;
    font-size: 12px;
    color: var(--t3);
}

.uicn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    background: transparent;
    border: none;
    color: var(--t3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .15s;
    flex-shrink: 0;
    text-decoration: none;
}

.uicn:hover {
    background: var(--bg3);
    color: var(--t1);
}

.uicn.active {
    color: var(--acc);
}


.main-nav-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.friends-home-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 48px 24px;
    text-align: center;
}

.friends-home-placeholder .friends-home-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: var(--bg3);
    border: 1px solid var(--brd);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 2rem;
    color: var(--t3);
}

.friends-home-placeholder h2 {
    font-family: var(--fd), sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--t1);
    margin: 0 0 8px;
}

.friends-home-placeholder p {
    font-size: 14px;
    color: var(--t2);
    margin: 0;
}

/* Contacts / Channel sidebar */
.channel-sidebar {
    width: 260px;
    min-width: 260px;
    background: var(--bg1);
    padding: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--brd);
    flex-shrink: 0;
}

.channel-header {
    padding: 16px 16px 12px;
    border-bottom: 1px solid var(--brd);
}

.channel-guild-name {
    font-size: 15px;
    font-weight: 600;
    margin: 0;
    color: var(--t1);
    font-family: var(--fd), sans-serif;
}

.btn-invite {
    width: 100%;
    padding: 8px 12px;
    margin: 10px 0 4px;
    font-size: 13px;
    font-weight: 500;
    background: var(--acc);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}

.btn-invite:hover:not(:disabled) {
    background: #5a9fff;
    box-shadow: 0 0 12px var(--accg);
}

.btn-invite:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.channel-section {
    margin-bottom: 4px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 10px 16px 4px;
}

.section-header:hover .section-add-btn {
    opacity: 1;
}

.section-label {
    font-size: 11px;
    color: var(--t3);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-family: var(--fb), sans-serif;
}

.section-add-btn {
    width: 18px;
    height: 18px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
    background: transparent;
    color: var(--t3);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s, background 0.15s;
}

.section-add-btn:hover {
    color: var(--t1);
    background: var(--bg3);
}

.channel-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    margin: 1px 8px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--t2);
    font-size: 14px;
    font-family: var(--fb), sans-serif;
    transition: background 0.12s, color 0.12s;
}

.channel-item:hover {
    background: var(--bg3);
    color: var(--t1);
    text-decoration: none;
}

.channel-item.active {
    background: rgba(61, 139, 255, 0.12);
    color: var(--acc);
}

.channel-item.active .channel-icon {
    color: var(--acc);
    opacity: 1;
}

.channel-item .channel-icon {
    opacity: 0.5;
    font-size: 15px;
    color: var(--t3);
    transition: color 0.12s, opacity 0.12s;
}

.channel-icon-text {
    font-weight: 600;
}

.channel-icon-voice {
    font-size: 14px;
}

.channel-voice {
    color: var(--t2);
}

.channel-voice:hover {
    color: var(--t1);
    text-decoration: none;
}

.presence-section {
    margin-top: auto;
    padding: 12px 12px 8px;
    border-top: 1px solid var(--brd);
}

.presence-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 6px;
    font-size: 13px;
    color: var(--t2);
    border-radius: 6px;
    transition: background 0.12s;
}

.presence-item:hover {
    background: var(--bg3);
}

.main-content {
    flex: 1;
    background: var(--bg2);
    color: var(--t1);
    overflow-x: hidden;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.main-full {
    padding: 2rem;
}


.welcome-screen {
    padding: 3rem 2rem;
    text-align: center;
    max-width: 480px;
    margin: 0 auto;
}

.welcome-screen .welcome-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--acc);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 0 24px var(--accg);
}

.welcome-screen h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--t1);
    font-weight: 700;
    font-family: var(--fd), sans-serif;
}

.welcome-screen p {
    color: var(--t2);
    margin-bottom: 0.5rem;
}

.welcome-screen .hint {
    font-size: 0.9rem;
    color: var(--t3);
}

.welcome-screen .btn-primary {
    display: inline-block;
    padding: 10px 20px;
    background: var(--acc);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    margin-right: 0.5rem;
    font-weight: 500;
    transition: background 0.15s, box-shadow 0.15s;
}

.welcome-screen .btn-primary:hover {
    background: #5a9fff;
    box-shadow: 0 0 12px var(--accg);
}

.status-dot {
    width: 8px;
    height: 8px;
    min-width: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.online {
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
}


/* Friend list pending actions (ContactItem) */
.btn-accept {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 229, 160, 0.1);
    color: var(--a2);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s;
}

.btn-accept:hover {
    background: var(--a2);
    color: #0a0b0f;
}

.btn-decline {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 68, 68, 0.08);
    color: var(--red);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.12s;
}

.btn-decline:hover {
    background: var(--red);
    color: #fff;
}

.back-link {
    color: var(--t3);
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    transition: color 0.12s;
}

.back-link:hover {
    color: var(--t1);
    text-decoration: none;
}

.invite-layout {
    padding: 2rem;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.invite-layout h1 {
    font-family: var(--fd), sans-serif;
    font-weight: 700;
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--t1);
}

.invite-card {
    background: var(--bg2);
    border: 1px solid var(--brd);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.guild-icon-large {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--acc), #a855f7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--fd), sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #fff;
}

.invite-card h2 {
    margin: 0 0 20px;
    font-family: var(--fd), sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: var(--t1);
}

.invite-layout .error {
    color: var(--red);
    font-size: 13px;
}