/* ===== Base ===== */
* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
    background: #0b0c12;
}

.main-block{
    min-height: 100vh;
    display: flex;
    background: #0b0c12;
}

/* ===== LEFT BAR ===== */
.left-bar{
    position: relative;
    width: 260px;
    padding: 18px 16px;
    background: linear-gradient(180deg, #171a25 0%, #121522 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    overflow: hidden;
}

.lb-corner-rings{
    position: absolute;
    left: -60px;      /* рухай тут */
    top: -60px;       /* і тут */
    width: 120px;
    height: 120px;
    pointer-events: none;
    opacity: 0.8;
    z-index: 0;
}

.lb-corner-rings span{
    position: absolute;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,0.18);
    /* показуємо тільки нижньо-праву частину кола */
    clip-path: inset(50% 0 0 50%);
}

/* 5 кілець різного розміру */
.lb-corner-rings span:nth-child(1){ inset: 0px;  border-color: rgba(255,255,255,0.22); }
.lb-corner-rings span:nth-child(2){ inset: 10px; border-color: rgba(255,255,255,0.18); }
.lb-corner-rings span:nth-child(3){ inset: 20px; border-color: rgba(255,255,255,0.14); }
.lb-corner-rings span:nth-child(4){ inset: 30px; border-color: rgba(255,255,255,0.10); }
.lb-corner-rings span:nth-child(5){ inset: 40px; border-color: rgba(255,255,255,0.08); }

/* щоб контент був поверх дуг */
.lb-brand, .lb-nav, .lb-caption { position: relative; z-index: 1; }

/* верх */
.lb-caption{
    font-size: 12px;
    opacity: .7;
    margin-bottom: 14px;
    position: relative;
    z-index: 1;
}

.lb-brand{
    position: relative;
    margin-bottom: 26px;
    z-index: 1;
}

.lb-logo{
    font-size: 20px; /* якщо хочеш більшим як на першому макеті — став 42px */
    letter-spacing: 1px;
    font-weight: 700;
}

/* меню */
.lb-nav{
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.lb-item{
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.15s ease;
}

.lb-item:hover{
    background: rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.78);
}

.lb-item.active{
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.92);
}



/* ===== WORKPLACE ===== */
.workplace{
    flex: 1;
    padding: 18px 18px 0 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0; /* важливо для скролу */
}

.table-container{
    flex: 1;
    min-height: 0;
}

.table-card{
    height: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.07);
    background: rgba(22, 26, 40, 0.62);
    box-shadow: 0 10px 40px rgba(0,0,0,0.35);
    overflow: hidden;

    display: flex;
    flex-direction: column;
}

/* grid колонки як на скріні */
.table-head,
.tr{
    display: grid;
    align-items: center;

    /* адаптивні колонки: стискаються, але не ламаються */
    grid-template-columns:
    38px                 /* checkbox */
    minmax(120px, 1.2fr) /* name */
    minmax(160px, 1.6fr) /* email */
    minmax(150px, 1.3fr) /* phone */
    90px                 /* abbr */
    170px                /* status (під select) */
    70px                 /* fav */
    minmax(160px, 1.4fr) /* comment */
    110px                /* time */
    170px;               /* managers */
}

.table-head{
    height: 48px;
    background: rgba(0,0,0,0.35);
    color: rgba(255,255,255,0.85);
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.table-head > div{
    padding: 0 12px;
    white-space: nowrap;
}

.table-body{
    flex: 1;
    height: auto;        /* важливо! */
    min-height: 0;       /* важливо для scroll */
    overflow: auto;
}

/* ряд */
.tr{
    height: 40px;
    color: rgba(255,255,255,0.82);
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.tr:hover{
    background: rgba(255,255,255,0.03);
}

.td{
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
}

.td > *{
    min-width: 0; /* важливо для select/button */
}

.muted{ color: rgba(255,255,255,0.6); }

.chk{
    width: 16px;
    height: 16px;
    accent-color: #9aa4ff;
}

/* pill кнопки (як селекти/коменти) */
.pill{
    height: 24px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pill:hover{
    background: rgba(255,255,255,0.09);
}

.chev{ opacity: .8; }
.pen{ opacity: .75; }

.copy{
    opacity: .55;
    font-size: 12px;
    cursor: pointer;
}
.copy:hover{ opacity: .9; }

/* зірочка */
.star{
    width: 28px;
    height: 28px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.55);
    cursor: pointer;
}
.star.active{
    color: rgba(255,255,255,0.92);
}
.star:hover{
    background: rgba(255,255,255,0.07);
}

/* ===== BOTTOM BAR ===== */
.bottom-buttons{
    height: 54px;
    background: rgba(0,0,0,0.70);
    border-top: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px 10px 0 0;
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
}

.bottom-right{
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* трохи інші розміри для нижнього select */
.pill-select--bottom{
    height: 28px;
    border-radius: 999px;
    padding-left: 14px;
    padding-right: 30px;
    width: 150px; /* під макет */
}

/* кнопка “відправити” */
.send-btn{
    width: 34px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.send-btn:hover{
    background: rgba(255,255,255,0.10);
}

.send-btn:active{
    transform: translateY(1px);
}

.save-btn{
    height: 30px;
    padding: 0 16px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
}

.save-btn:hover{
    background: rgba(255,255,255,0.14);
}

.pill-select{
    height: 24px;
    padding: 0 28px 0 10px;           /* місце під стрілку */
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.75);
    font-size: 12px;
    cursor: pointer;
    outline: none;

    appearance: none;                  /* прибираємо дефолтну стрілку */
    -webkit-appearance: none;
    -moz-appearance: none;

    /* своя стрілка (як ▾) */
    background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.75) 50%),
    linear-gradient(135deg, rgba(255,255,255,0.75) 50%, transparent 50%);
    background-position: calc(100% - 14px) 10px, calc(100% - 9px) 10px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.pill-select:hover{
    background-color: rgba(255,255,255,0.09);
}

.pill-select:focus,
.pill-select:focus-visible{
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 0 0 3px rgba(120,130,255,0.18);
}

/* робимо стрілку трохи контрастнішою у фокусі */
.pill-select:focus{
    background-image:
            linear-gradient(45deg, transparent 50%, rgba(255,255,255,0.95) 50%),
            linear-gradient(135deg, rgba(255,255,255,0.95) 50%, transparent 50%);
}

/* СТИЛЬ ВИПАДАЮЧОГО СПИСКУ (працює не ідеально у всіх браузерах, але часто ок) */
.pill-select option{
    background: #0f1320;
    color: rgba(255,255,255,0.92);
}

/* коли option вибраний/підсвічений (де підтримується) */
.pill-select option:checked{
    background: #2b4cff;
    color: #fff;
}

.pill-select:disabled{
    opacity: 0.55;
    cursor: not-allowed;
}

/* Розтягуємо тільки те, що має бути “плашкою” */
.td .pill-select,
.td .pill.edit{
    width: 100%;
    min-width: 0;
}

/* Зірка НЕ розтягується */
.td .star{
    flex: 0 0 auto;
}

/* Щоб чекбокс був нормального розміру і по центру */
.td:first-child{
    justify-content: center;
    padding: 0;
}
.chk{
    width: 18px;
    height: 18px;
}









/* ===== Login Page ===== */
.login-page{
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 56px;
    background: radial-gradient(circle at 50% 20%, rgba(255,255,255,0.05), transparent 45%), #0b0c12;
}

.login-card{
    width: 320px;
    padding: 22px 18px 18px;
    border-radius: 12px;
    background: linear-gradient(180deg, #1a2240 0%, #2a3358 100%);
    border: 1px solid rgba(255,255,255,0.10);
    box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

.login-title{
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    letter-spacing: 2px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 16px;
}

.login-form{
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field{
    position: relative;
}

.input{
    width: 100%;
    height: 26px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.20);
    background: rgba(255,255,255,0.35);
    color: rgba(0,0,0,0.65);
    padding: 0 12px;
    font-size: 12px;
    outline: none;
}

.input::placeholder{
    color: rgba(0,0,0,0.40);
}

.input:focus{
    background: rgba(255,255,255,0.46);
    border-color: rgba(255,255,255,0.35);
    box-shadow: 0 0 0 3px rgba(120,130,255,0.20);
}

/* eye button inside password */
.field-pass .input{
    padding-right: 34px;
}

.eye-btn{
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.7;
}

.eye-btn:hover{ opacity: 1; }

.login-btn{
    margin-top: 6px;
    align-self: flex-end;
    height: 22px;
    min-width: 108px;
    border: 0;
    border-radius: 999px;
    background: rgba(255,255,255,0.35);
    color: rgba(0,0,0,0.65);
    font-size: 11px;
    letter-spacing: 1px;
    padding: 0 10px 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
}

.login-btn:hover{
    background: rgba(255,255,255,0.45);
}

.login-btn:active{
    transform: translateY(1px);
}

.login-btn .arrow{
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}

.error-text {
    margin-top: 6px;
    font-size: 13px;
    color: #e53935;
    min-height: 16px;
}



/* щоб можна було "прилипнути" футером до низу */
.left-bar{
    position: relative;
    width: 260px;
    padding: 18px 16px;
    background: linear-gradient(180deg, #171a25 0%, #121522 100%);
    border-right: 1px solid rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    overflow: hidden;

    display: flex;              /* ✅ */
    flex-direction: column;     /* ✅ */
}

/* меню займає весь вільний простір, футер іде вниз */
.lb-nav{
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    z-index: 1;

    flex: 1;
}

/* ===== LEFT BAR FOOTER ===== */
.lb-footer{
    position: relative;
    z-index: 1;
    margin-top: auto;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lb-footer-link{
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0 6px;
    text-align: right;
    font-size: 11px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
}

.lb-footer-link:hover{
    color: rgba(255,255,255,0.80);
}

.lb-footer-pill{
    width: 100%;
    height: 28px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;

    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.90);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.lb-footer-pill:hover{
    background: rgba(255,255,255,0.18);
}









.table-card--managers .table-head,
.table-card--managers .tr{
    grid-template-columns:
    38px
    minmax(180px, 1.2fr)
    minmax(220px, 1.4fr)
    minmax(240px, 1.6fr);
}

.table-card--ipwl .table-head,
.table-card--ipwl .tr{
    grid-template-columns:
    38px
    minmax(240px, 1.6fr)
    minmax(140px, 0.9fr);
}

/* нижній блок як на скріні */
.managers-bottom{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-top: 1px solid rgba(255,255,255,0.06);
    background: rgba(0,0,0,0.25);
}

.pill-btn{
    height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
}
.pill-btn:hover{ background: rgba(255,255,255,0.10); }

.pill-btn.danger{
    background: rgba(255,255,255,0.08);
}

/* якщо у тебе lb-footer-pill уже є — можна не дублювати */
.lb-footer-pill{
    width: 100%;
    height: 28px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(255,255,255,0.14);
    color: rgba(255,255,255,0.90);
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
}



/* ===== MODAL ===== */
.modal-backdrop{
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 18px;
}

.modal{
    width: min(520px, 100%);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(22, 26, 40, 0.82);
    box-shadow: 0 16px 60px rgba(0,0,0,0.55);
    overflow: hidden;
}

.modal-head{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.28);
}

.modal-title{
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.86);
    text-transform: uppercase;
}

.modal-close{
    width: 34px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
}
.modal-close:hover{ background: rgba(255,255,255,0.10); }

.modal-body{
    padding: 16px;
    display: grid;
    gap: 12px;
}

.field{
    display: grid;
    gap: 6px;
}

.field label{
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}

.input{
    height: 34px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.86);
    outline: none;
}

.input:focus{
    border-color: rgba(255,255,255,0.30);
    box-shadow: 0 0 0 3px rgba(120,130,255,0.18);
}

.modal-error{
    min-height: 18px;
    font-size: 12px;
    color: rgba(255,170,170,0.95);
    opacity: 0.95;
}

.modal-actions{
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.22);
}

.modal-btn{
    height: 30px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    letter-spacing: 1px;
    cursor: pointer;
}

.modal-btn:hover{ background: rgba(255,255,255,0.10); }
.modal-btn.primary{
    background: rgba(255,255,255,0.14);
}
.modal-btn.primary:hover{
    background: rgba(255,255,255,0.18);
}
.modal-btn:disabled{
    opacity: 0.55;
    cursor: not-allowed;
}

/* маленька кнопка генерації пароля */
.gen-row{
    display: flex;
    gap: 10px;
    align-items: center;
}
.gen-row .input{ flex: 1; }
.gen-btn{
    width: 42px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.85);
    cursor: pointer;
}
.gen-btn:hover{ background: rgba(255,255,255,0.10); }

.workplace .table-card{
    display: flex;
    flex-direction: column;
}

/* тільки body таблиць у workplace */
.workplace .table-body{
    flex: 1;
    height: auto;
    min-height: 0;
    overflow: auto;
}

.workplace .table-body{
    height: auto;
}


/* favourite button (⭐) — прибрати білий дефолт */
.table-card .fav-btn{
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    border: 1px solid rgba(255,255,255,.10);
    color: inherit;
    cursor: pointer;

    width: 34px;
    height: 34px;
    border-radius: 10px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    line-height: 1;
    padding: 0;
    opacity: .85;
}

.table-card .fav-btn:hover{
    opacity: 1;
    background: rgba(255,255,255,.06) !important;
}

.table-card .fav-btn.active{
    opacity: 1;
}

.table-card .fav-btn:focus,
.table-card .fav-btn:focus-visible{
    outline: none;
    box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}




.comment-input{
    width: 100%;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: rgba(255,255,255,.92);
    border-radius: 999px;
    padding: 8px 12px;
    outline: none;
}
.comment-input:focus{
    box-shadow: 0 0 0 2px rgba(255,255,255,.12);
}


/* ===== MANAGER TABLE OVERRIDES ===== */
.table-card--manager .table-head,
.table-card--manager .tr{
    grid-template-columns:
        minmax(120px, 1.2fr) /* name */
        minmax(160px, 1.6fr) /* email */
        minmax(150px, 1.3fr) /* phone */
        90px                 /* abbr */
        170px                /* status */
        70px                 /* fav */
        minmax(160px, 1.4fr) /* comment */
        110px;               /* time */
}

/* Бо checkbox колонки нема — повертаємо нормальне вирівнювання першої td */
.table-card--manager .td:first-child{
    justify-content: flex-start;
    padding: 0 12px;
}




.bottom-left{
    display:flex;
    align-items:center;
    gap:10px;
}
#clients-pagination{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}
#clients-pagination .pg-left,
#clients-pagination .pg-right{
    display:flex;
    align-items:center;
    gap:10px;
}
#clients-pagination .pg-muted{ opacity:.7; }
#clients-pagination .pill-btn.active{ outline: 1px solid rgba(255,255,255,.35); }
#clients-pagination .pg-dots{ opacity:.6; padding:0 4px; }
