/* =====================================
   TEAMLEAD CREATE — LAYOUT & ANIMATION
===================================== */

.tl-create-wrapper {
    max-width: 960px;
    animation: tlFadeUp 0.35s ease-out;
}

/* CARD */

.tl-create-card {
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
    padding: 20px 20px 22px;
    background: radial-gradient(circle at 0 0, #eff6ff 0, #ffffff 45%, #f9fafb 100%);
}

/* HERO */

.tl-create-hero {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.tl-create-avatar-wrapper {
    position: relative;
    margin-right: 14px;
}

.tl-create-avatar-ring {
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 2px solid rgba(59, 130, 246, 0.35);
    opacity: 0.7;
    animation: tlPulseRing 1.5s infinite ease-out;
}

.tl-create-avatar {
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: conic-gradient(from 220deg, #3b82f6, #8b5cf6, #ec4899, #3b82f6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f9fafb;
    font-weight: 700;
    font-size: 18px;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.5);
}

.tl-create-hero-text {
    flex: 1;
}

.tl-create-hero-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #6b7280;
    margin-bottom: 2px;
}

.tl-create-hero-title {
    font-size: 19px;
    font-weight: 600;
    margin: 0 0 3px;
    color: #111827;
}

.tl-create-hero-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 6px;
}

.tl-create-hero-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tl-create-chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(15, 23, 42, 0.03);
    color: #4b5563;
}

.tl-create-chip-dot {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    margin-right: 5px;
}

.tl-create-chip-dot.dot-blue {
    background: linear-gradient(135deg, #3b82f6, #60a5fa);
}

.tl-create-chip-dot.dot-green {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

/* FORM GRID */

.tl-create-form {
    margin-top: 4px;
}

.tl-create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 14px;
}

/* COLUMN */

.tl-create-column {
    min-width: 0;
}

/* SECTION */

.tl-section {
    background: rgba(255,255,255,0.9);
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 12px 12px 10px;
    margin-bottom: 10px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.03);
}

.tl-section-header {
    margin-bottom: 8px;
}

.tl-section-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.tl-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    color: #111827;
}

.tl-section-subtitle {
    font-size: 12px;
    color: #6b7280;
}

/* FORM ELEMENTS */

.tl-form-group {
    margin-bottom: 10px;
}

.tl-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}

.tl-field-hint {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

.tl-input {
    width: 100%;
    padding: 9px 11px;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    background: #ffffff;
    font-size: 14px;
    transition:
        border 0.15s ease,
        box-shadow 0.15s ease,
        background 0.15s ease,
        transform 0.05s ease;
}

.tl-input::placeholder {
    color: #9ca3af;
}

.tl-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
    background: #ffffff;
    transform: translateY(-1px);
}

/* CABINETS */

.tl-cabinets-count-badge {
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    background: rgba(37, 99, 235, 0.06);
    color: #1e3a8a;
    white-space: nowrap;
}

.tl-cabinets-count-badge strong {
    font-weight: 600;
}

/* Сітка для багатьох кабінетів */

.tl-cabinets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

/* легкий скрол */

.tl-cabinets-grid::-webkit-scrollbar {
    width: 6px;
}

.tl-cabinets-grid::-webkit-scrollbar-track {
    background: transparent;
}

.tl-cabinets-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 999px;
}

/* Тайл кабінету */

.tl-cabinet-tile {
    position: relative;
    display: block;
    cursor: pointer;
    text-decoration: none;
}

.tl-cabinet-tile input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tl-cabinet-tile-inner {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #f9fafb, #ffffff);
    padding: 8px 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.08s ease,
        background 0.15s ease;
}

.tl-cabinet-tile:hover .tl-cabinet-tile-inner {
    border-color: #cbd5f5;
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.16);
    transform: translateY(-1px);
}

.tl-cabinet-tile-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tl-cabinet-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #eff6ff;
    background: radial-gradient(circle at 30% 0, #60a5fa, #4f46e5);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.5);
}

.tl-cabinet-text {
    display: flex;
    flex-direction: column;
}

.tl-cabinet-name {
    font-size: 13px;
    font-weight: 500;
    color: #111827;
}

.tl-cabinet-slug {
    font-size: 11px;
    color: #6b7280;
}

/* checked state */

.tl-cabinet-tile input[type="checkbox"]:checked + .tl-cabinet-tile-inner {
    border-color: #3b82f6;
    background: radial-gradient(circle at 0 0, rgba(59, 130, 246, 0.12), #ffffff 55%);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px) scale(1.01);
}

/* ACTIONS */

.tl-create-actions {
    display: flex;
    gap: 10px;
    margin-top: 14px;
    justify-content: flex-end;
}

.tl-btn-main,
.tl-btn-secondary {
    border-radius: 999px;
    padding: 9px 18px;
    font-weight: 500;
}

.tl-btn-main {
    box-shadow: 0 10px 22px rgba(59, 130, 246, 0.35);
    transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.tl-btn-main:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(59, 130, 246, 0.45);
}

.tl-btn-secondary {
    border-radius: 999px;
}

/* ANIMATIONS */

@keyframes tlFadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tlPulseRing {
    0% {
        transform: scale(0.9);
        opacity: 0.75;
    }
    60% {
        transform: scale(1.05);
        opacity: 0;
    }
    100% {
        transform: scale(1.15);
        opacity: 0;
    }
}

/* RESPONSIVE */

@media (max-width: 991.98px) {
    .tl-create-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .tl-section-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .tl-cabinets-grid {
        max-height: 320px;
    }
}

@media (max-width: 575.98px) {

    .tl-create-card {
        padding: 14px;
        border-radius: 14px;
    }

    .tl-create-hero {
        align-items: flex-start;
        margin-bottom: 14px;
    }

    .tl-create-hero-title {
        font-size: 17px;
    }

    .tl-create-hero-subtitle {
        font-size: 12px;
    }

    .tl-create-hero-chips {
        gap: 3px;
    }

    .tl-cabinets-grid {
        grid-template-columns: minmax(0, 1fr);
        max-height: 300px;
    }

    .tl-create-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .tl-create-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
