/* Add Server — compact form */

.page-add-server .cd-main .breadcrumb {
    margin-bottom: 14px;
}

.as-guest-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 11px 16px;
    margin-bottom: 14px;
    background: var(--ac05);
    border: 1px solid var(--ac15);
    border-radius: 10px;
}
.as-guest-banner p {
    margin: 0;
    font-size: 0.81rem;
    color: var(--text2);
    line-height: 1.45;
}
.as-guest-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.as-card {
    padding: 18px 20px 20px;
}
.as-card .alert {
    margin-bottom: 12px;
}

.as-form .form-g {
    margin-bottom: 0;
}
.as-form .form-g > label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 0;
}
.as-form .form-g input,
.as-form .form-g select,
.as-form .form-g textarea {
    width: 100%;
    box-sizing: border-box;
}
.as-form textarea {
    min-height: 80px;
    resize: vertical;
}

.as-section {
    margin-bottom: 14px;
}
.as-section:last-of-type {
    margin-bottom: 0;
}

.as-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text2);
    margin-bottom: 8px;
}

/* Label + hint on one row */
.as-lbl-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 7px;
}
.as-lbl-row label,
.as-lbl-row .as-lbl {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text2);
    margin: 0;
}
.as-hint {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    flex-shrink: 0;
}
.as-tag-count.as-tag-ok {
    color: #58b58e;
}
.as-tag-count.as-tag-warn {
    color: #c9a962;
}

.as-games {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}
.as-game {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    background: var(--bg1);
    min-height: 44px;
}
.as-game:hover {
    border-color: var(--muted);
}
.as-game.active {
    border-color: var(--ac);
    background: var(--ac10);
}
.as-game img {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    flex-shrink: 0;
}
.as-game span {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text2);
}
.as-game.active span {
    color: var(--ac);
}

.as-row-ip {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 12px;
    align-items: start;
}
.as-row-gm {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}
.as-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    align-items: start;
}

.as-select-sm {
    display: none;
}

.as-dd {
    position: relative;
}
.as-dd-chosen {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    min-height: 38px;
    box-sizing: border-box;
    background: var(--bg1);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.82rem;
    color: var(--text);
}
.as-dd-chosen:hover {
    border-color: var(--muted);
}
.as-dd-chosen > span:first-child,
.as-dd-chosen > img + span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.as-dd-arrow {
    margin-left: auto;
    color: var(--muted);
    font-size: 0.7rem;
    flex-shrink: 0;
}
.as-dd-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 4px;
    z-index: 60;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}
.as-dd-search {
    padding: 6px 10px;
    position: sticky;
    top: 0;
    background: var(--bg2);
    z-index: 1;
    border-bottom: 1px solid var(--border);
}
.as-dd-search input {
    width: 100%;
    padding: 6px 10px;
    font-size: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg1);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
}
.as-dd-search input:focus {
    border-color: var(--ac);
}
.as-dd-opts {
    max-height: 280px;
    overflow-y: auto;
}
.as-dd-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text2);
    transition: background 0.1s;
}
.as-dd-opt:hover {
    background: var(--bg3);
    color: var(--text);
}
.as-dd-opt.active {
    background: var(--ac10);
    color: var(--ac);
}
.as-dd-flag-ph {
    display: inline-flex;
    width: 16px;
    height: 12px;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--muted);
    flex-shrink: 0;
}

.tag-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 0;
}
.tag-pill {
    background: var(--bg1);
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.12s;
    font-family: inherit;
}
.tag-pill:hover:not(:disabled) {
    border-color: var(--ac15);
    color: var(--text2);
}
.tag-pill.on {
    background: var(--ac10);
    border-color: var(--ac15);
    color: var(--ac);
}
.tag-pill:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.as-submit {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}
.as-submit .btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    font-size: 0.86rem;
    font-weight: 700;
    gap: 7px;
}
.as-submit-login {
    display: flex;
    width: 100%;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .as-row-ip,
    .as-row-gm,
    .as-row-2 {
        grid-template-columns: 1fr;
    }
    .as-games {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
    }
    .as-game {
        padding: 8px 4px;
        gap: 4px;
        min-height: 40px;
    }
    .as-game img {
        width: 20px;
        height: 20px;
    }
    .as-game span {
        font-size: 0.65rem;
    }
    .as-card {
        padding: 14px;
    }
}
