.ticket-dashboard {
    flex-grow: 1;
    background-color: #191a1d;
    padding: 40px 20px;
    display: flex;
    justify-content: center;
}

.dashboard-container {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 480px 1fr;
    gap: 24px;
    align-items: start;
}

.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-card {
    background-color: #25262a;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: transparent;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: transparent;
    flex-shrink: 0;
}

.profile-info {
    display: flex;
    flex-direction: column;
}

.profile-name {
    color: #cecfd0;
    font-size: 1.1rem;
    font-weight: 700;
}

.profile-discord-id {
    color: #7e848b;
    font-size: 0.8rem;
}

.create-ticket-card {
    background-color: #25262a;
    border-radius: 8px;
    padding: 24px;
}

.card-title {
    color: #cecfd0;
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 20px;
}

.stacked-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stacked-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
}

.stacked-form label {
    color: #9a9ea4;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stacked-form select,
.stacked-form textarea,
.stacked-form input[type="text"] {
    background-color: #191a1d;
    border: none;
    color: #babdbf;
    border-radius: 4px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: 0.95rem;
    width: 100%;
    box-sizing: border-box;
    resize: none;
}

.stacked-form select:focus,
.stacked-form textarea:focus,
.stacked-form input[type="text"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px #5865F2;
}

.btn-submit {
    background-color: #5865F2;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    padding: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
    margin-top: 8px;
}

.btn-submit:hover {
    background-color: #4752c4;
}

.btn-submit:disabled {
    background-color: #36373c;
    color: #7e848b;
    cursor: not-allowed;
}

.dashboard-content {
    background-color: #25262a;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.view-header {
    padding: 24px;
    border-bottom: 1px solid #191a1d;
}

.view-header h2 {
    color: #cecfd0;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.ticket-list {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticket-item {
    background-color: #191a1d;
    border-radius: 4px;
    padding: 16px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.15s ease;
}

.ticket-item:hover {
    background-color: #18181b;
}

.ticket-item-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ticket-item-title {
    color: #cecfd0;
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.ticket-item-meta {
    color: #7e848b;
    font-size: 0.85rem;
}

.badge-discord {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-discord.open {
    background-color: #23a559;
    color: #ffffff;
}

.badge-discord.closed {
    background-color: #6d7079;
    color: #ffffff;
}

#ticket-chat-view {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    /* flex-wrap: wrap; */
}

.btn-back {
    background: transparent;
    border: none;
    color: #9a9ea4;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.btn-back:hover {
    background-color: #191a1d;
    color: #cecfd0;
}

.chat-content {
    flex-grow: 1;
    overflow-y: auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chat-content::-webkit-scrollbar {
    width: 8px;
}

.chat-content::-webkit-scrollbar-thumb {
    background: #16171a;
    border-radius: 4px;
}

.discord-message {
    display: flex;
    gap: 16px;
    padding: 2px 16px 2px 8px;
}

.discord-message:hover {
    background-color: #2a2b30;
    border-radius: 0.4rem;
}

.discord-message-body {
    display: flex;
    flex-direction: column;
}

.discord-message-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 4px;
}

.discord-username {
    color: #cecfd0;
    font-weight: 500;
    font-size: 1rem;
}

.discord-timestamp {
    color: #7e848b;
    font-size: 0.75rem;
}

.discord-text {
    color: #babdbf;
    font-size: 1rem;
    line-height: 1.375rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.chat-footer {
    padding: 16px 24px;
    background-color: #25262a;
}

.discord-input-container {
    background-color: #303136;
    border-radius: 8px;
    display: flex;
    padding: 10px 16px;
}

.discord-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    color: #babdbf;
    font-size: 1rem;
}

.discord-input-container input:focus {
    outline: none;
}

.discord-input-container button {
    background: transparent;
    border: none;
    color: #9a9ea4;
    cursor: pointer;
    font-size: 1.2rem;
}

.discord-input-container button:hover {
    color: #babdbf;
}

@media (max-width: 992px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
}

/* Přístupovou hlášku vykresluje admin-nav.js do .dashboard-container, který je
   tady dvousloupcový grid — uvnitř gate z něj musí být obyčejný blok. */
.admin-gate-wrap .dashboard-container {
    display: block;
}

.badge-staff {
    background-color: #ca0707;
    color: white;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 6px;
    vertical-align: middle;
    font-weight: 700;
    text-align: center;
}

.discord-message.staff-msg {
    background-color: rgba(88, 101, 242, 0.08);
    border-left: 3px solid #ffffff;
    border-radius: 0 4px 4px 0;
    padding-left: 13px;
}

.chat-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-claim {
    background-color: #f39c12;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.btn-claim:hover {
    background-color: #e67e22;
}

.btn-close-ticket {
    background-color: #ed4245;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 5px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.2s;
}

.btn-close-ticket:hover {
    background-color: #c9383b;
}