/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Layout */
body {
    font-family: 'Figtree';
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 220px;
    background: #ffffff;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
}

/* Logo / Title */
.sidebar h2 {
    color: #3b82f6;
    margin-bottom: 25px;
    font-size: 30px;
}

/* Menu */
.menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgb(111, 111, 111);
    text-decoration: none;
    padding: 7px 8px;
    margin-bottom: 2px;
    border-radius: 8px;
    transition: background 0.2s, color 0.2s, padding-left 0.2s;
    font-weight: 100;
    font-size: 14px;
}

.menu a:hover,
.menu a.active {
    background: #6366f1;
    padding-left: 12px;
    color: white;
}

.menu a:hover .nav-icon svg,
.menu a.active .nav-icon svg {
    stroke: white;
}

.nav-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    opacity: 0.6;
}

.menu a:hover .nav-icon {
    opacity: 1;
}

.menu h4 {
    display: flex;
    align-items: center;
    gap: 7px;
}

.menu h4 .nav-icon {
    opacity: 0.45;
}

/* Logout */
.logout {
    background: rgb(255, 91, 91);
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    text-decoration: none;
    color: white;
}

/* ===== GLOBAL HEADER ===== */
.topheader {
    position: fixed;
    top: 0;
    left: 220px;
    right: 0;
    height: 56px;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    margin: 6px 8px;
    border-radius: 6px;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 7px 14px;
    min-width: 260px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.header-search:focus-within {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.1);
    background: white;
}

.header-search-icon {
    font-size: 13px;
    color: #9ca3af;
    flex-shrink: 0;
}

.header-search-input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: #333;
    padding: 0;
    margin: 0;
    width: 100%;
    display: block;
}

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

.header-kbd {
    font-size: 11px;
    color: #aaa;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1px 6px;
}

.header-right {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar-wrap {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    user-select: none;
}

.avatar-circle.small {
    width: 30px;
    height: 30px;
    font-size: 13px;
    flex-shrink: 0;
}

.avatar-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 300;
    overflow: hidden;
}

.avatar-dropdown.show {
    display: block;
}

.avatar-menu-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
}

.avatar-menu-name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
}

.avatar-menu-role {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
}

.avatar-menu-divider {
    height: 1px;
    background: #f0f0f0;
}

.avatar-menu-item {
    display: block;
    padding: 11px 16px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    transition: background 0.15s;
}

.avatar-menu-item:hover {
    background: #f9fafb;
}

.avatar-logout {
    color: #ef4444;
}

/* Content */
.content {
    flex: 1;
    padding: 66px 24px 30px;
    background: #0000000d;
    overflow-y: auto;
    height: 100vh;
}

/* Table */
table {
    margin-top: 8px;
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

th {
    font-weight: 200;
    padding: 20px 5px 20px 25px;
    position: sticky;
    top: 0;
    background: #fff;
    color: #15151bb3;
    z-index: 2;
    text-align: left;
    filter: drop-shadow(0px 4px 1px rgba(0,0,0,0.10));
}

td {
    padding: 10px 25px;
    border-top: 1px solid #ddd;
    text-align: left;
    color: #2f2b3db3;
    font-weight: 400;
    font-size: 15px;
}

/* Form */

.regis {
    padding: 10px;
    margin-bottom: 20px;
}

input {
    display:grid;
    width: 25%;
    padding: 15px;
    margin-bottom: 6px;
}

select {
    color: #6c6c6c;
    display:grid;
    width: 25%;
    padding: 15px;
    margin: 20px 0px 20px 0px;
}


button {
    display: block;
    width: 25%;
    padding: 15px;
    background: #6366f1;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.addnewfamily {
    margin-left: 20px;
    display: block;
    width: 10%;
    padding: 15px;
    background: #6366f1;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.active {
    background: #6366f1;
}

td a {
    text-decoration: none;
    margin: 0 5px;
    font-size: 15px;
}

h4 {
    color: #a6a6a6;
    margin-bottom: 10px;
    margin-top: 40px;
    font-weight: 400;
}

.profile-box {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 400px;
}

.profile-box p {
    margin: 10px 0;
}

.custom-dropdown {
    position: relative;
    width: 25%;
    margin: 20px 0px;
}

.dropdown-selected {
    font-size:small;
    color: #6c6c6c;
    padding: 15px;
    border: 1px solid #6b6b6b;
    border-radius: 4px;
    cursor: pointer;
    background: white;
}

.dropdown-menu {
    display: none;
    position: absolute;
    width: 50%;
    background: white;
    border: 1px solid #b2b2b2;
    border-radius: 6px;
    margin-top: 5px;
    z-index: 10;
}

.dropdown-menu.show {
    display: block;
}

#searchInput {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #eee;
    outline: none;
}

.dropdown-items {
    max-height: 150px;
    overflow-y: auto;
}

.item {
    padding: 10px;
    cursor: pointer;
}

.item:hover {
    background: #f1f5f9;
}


/* ===== PROFILE PAGE ===== */

.profile-page {
    display: flex;
    gap: 25px;
    padding: 25px;
}

/* LEFT CARD */
.profile-card {
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.avatar {
    width: 90px;
    height: 90px;
    background: #bfe3e8;
    border-radius: 50%;
    line-height: 90px;
    font-size: 28px;
    font-weight: bold;
    margin: auto;
}

.profile-card h2 {
    margin: 12px 0;
}

/* STATUS */
.badge.active {
    background: #22c55e;
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 13px;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    background: #f3f4f6;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 40px 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 32px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.login-card h2 {
    font-size: 22px;
    font-weight: 700;
    color: #111;
    margin-bottom: 4px;
}

.login-card .login-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 28px;
}

.login-card .login-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.login-card .login-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.login-card .login-field input {
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #111;
    background: #fafafa;
    outline: none;
    transition: border-color 0.15s;
    width: 100%;
}

.login-card .login-field input:focus {
    border-color: #6366f1;
    background: white;
}

.login-card .login-btn {
    display: block;
    width: 100%;
    margin-top: 8px;
    padding: 11px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.login-card .login-btn:hover { background: #4f46e5; }

.login-error {
    font-size: 13px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 9px 12px;
    margin-bottom: 16px;
}

/* STATS */
.stats {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.stats div strong {
    font-size: 18px;
}

.details {
    margin-top: 20px;
    text-align: left;
    font-size: 14px;
    color: #555;
}

/* RIGHT SIDE */
.profile-content {
    flex: 1;
}

/* TABS */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.tabs button {
    padding: 10px 15px;
    border-radius: 10px;
    border: none;
    background: #eee;
    cursor: pointer;
}

.tabs .active {
    background: #6366f1;
    color: white;
}

/* MEMBERS BOX */
.members-box {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* BUTTON */
.add-btn {
    background: #6366f1;
    color: white;
    padding: 8px 14px;
    border-radius: 10px;
    text-decoration: none;
}

/* TABLE */
.members-box table {
    width: 100%;
    margin-top: 15px;
    border-collapse: collapse;
}

.members-box th {
    text-align: left;
    padding: 12px;
    color: #252525;
    font-weight: 500;
}

.members-box td {
    padding: 12px;
    border-top: 1px solid #eee;
}

/* STUDENT NAME */
.student-name {
    color: #4f46e5;
    font-weight: 500;
}

/* STATUS */
.status {
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 12px;
    color: white;
}

.status.active {
    background: #22c55e;
}

.status.suspended {
    background: #ef4444;
}

/* OPTIONS */
.options {
    width: 30px;
    height: 30px;
    background: #0b8800;
    color: white;
    text-align: center;
    line-height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

/* Top bar: stats + Add button */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 20px 10px 5px;
    margin-bottom: 6px;
}

/* Top bar: stats + Add button */
.display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 20px 10px 0;
    margin-bottom: 6px;
}


.stots-card {
    display: flex;
    flex-wrap: wrap;
    gap: 3%;
    padding: 20px;
    flex: 1;
}

.stot-item {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    width: auto !important;
    max-width: fit-content !important;
    flex: 0 0 auto !important;
    color: #2f2b3db3;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: background 0.15s;
}

.stot-item:hover {
    background: #f3f4f6;
}

.stot-item.stat-active {
    background: #eef2ff;
    font-weight: 600;
}
.stot-item strong {
    font-weight: 500;
    margin-left: 3px;
}

/* الدائرة */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* الألوان */
.stot-item.all .dot       { background: #6366f1; }
.stot-item.new-lead .dot  { background: #a78bfa; }
.stot-item.lead .dot      { background: #818cf8; }
.stot-item.trial .dot     { background: #f59e0b; }
.stot-item.new .dot       { background: #3b82f6; }
.stot-item.ctive .dot     { background: #22c55e; }
.stot-item.suspended .dot { background: #ef4444; }
.stot-item.left .dot      { background: #6b7280; }

/* ── Lead pipeline dots ──────────────────────────────────────── */
.stot-item.lead-new .dot           { background: #a78bfa; }
.stot-item.lead-followup .dot      { background: #3b82f6; }
.stot-item.lead-interested .dot    { background: #22c55e; }
.stot-item.lead-notinterested .dot { background: #ef4444; }
.stot-item.lead-noanswer .dot      { background: #9ca3af; }

/* ── Lead status badges ──────────────────────────────────────── */
.lead-badge-new           { background: #f5f3ff; color: #7c3aed; }
.lead-badge-followup      { background: #eff6ff; color: #2563eb; }
.lead-badge-interested    { background: #f0fdf4; color: #16a34a; }
.lead-badge-notinterested { background: #fef2f2; color: #dc2626; }
.lead-badge-noanswer      { background: #f3f4f6; color: #6b7280; }


.search-box {
    position: relative;
    width: 100%;
}

.search-box input {
    width: 100%;
    padding: 20px 12px 20px 40px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    outline: none;
    font-size: 14px;
    background: #ffffff;
    transition: 0.3s;
}

/* focus */
.search-box input:focus {
    border-color: #9c9dfb;
    background: white;
}

/* icon */
.search-icon {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    font-size: 14px;
    color: #9ca3af;
}

/* ===== CONTROLS BAR (search + per-page + add button) ===== */
.controls-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 6px 0;
    background-color: white;
    padding: 10px 5px 10px 25px;
    border-radius: 6px;
}

.controls-bar .search-box {
    flex: 1;
}

.controls-bar .search-box input {
    padding: 10px 12px 10px 38px;
    margin: 0;
}

.controls-right {
    display: flex;
    align-items: center;
    gap: 50px;
    flex-shrink: 0;
}

.per-page-select {
    padding: 9px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #555;
    background: white;
    cursor: pointer;
    width: auto;
    margin: 0;
}

/* ===== SORT LINKS ===== */
th a.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

th a.sort-link:hover {
    color: #6366f1;
}

.sort-icon {
    font-size: 11px;
    color: #ccc;
}

.sort-icon.on {
    color: #6366f1;
}

/* ===== PAGINATION ===== */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 4px;
    font-size: 13px;
    color: #888;
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    color: #555;
    background: white;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: 0.15s;
}

.page-btn:hover {
    background: #f3f4f6;
    border-color: #d0d7de;
}

.page-btn.page-current {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
    font-weight: 600;
    cursor: default;
}

.page-btn.disabled {
    color: #ccc;
    border-color: #f0f0f0;
    background: white;
    cursor: default;
    pointer-events: none;
}

.page-btn.dots {
    border: none;
    background: none;
    color: #aaa;
    cursor: default;
    pointer-events: none;
}


/* ===== MODAL — reset global button/input styles ===== */

/* Override global "button { background:#6366f1; display:block; width:25% }" inside modal */
.modal button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0;
    background: none;
    color: #333;
    border: none;
    border-radius: 0;
    font-size: 14px;
}

/* Override global "input { display:grid; width:25%; margin:20px 0 }" inside modal */
.modal input,
.modal select {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    box-sizing: border-box;
}

/* Checkbox reset inside modal */
.modal input[type="checkbox"] {
    display: inline-block;
    width: 16px;
    height: 16px;
    padding: 0;
    margin: 0;
    border: none;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ===== MODAL ===== */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.35);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    width: 760px;
    max-height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.modal .modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
    width: auto;
    padding: 4px 8px;
    border-radius: 4px;
}

.modal .modal-close:hover {
    color: #333;
    background: #f3f4f6;
}

/* ===== TABS ===== */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 24px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 16px;
    font-size: 14px;
    color: #888;
    cursor: pointer;
    width: auto;
    margin-bottom: -1px;
    transition: 0.2s;
    border-radius: 0;
}

.tab-btn.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    font-weight: 500;
    background: none;
}

/* ===== TAB CONTENT ===== */
.tab-content {
    overflow-y: auto;
    flex: 1;
}

/* ===== FORM SECTIONS ===== */
.form-section {
    border-bottom: 1px solid #f0f0f0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    user-select: none;
}

.section-header:hover {
    background: #fafafa;
}

.chevron {
    font-size: 11px;
    color: #aaa;
}

.section-body {
    padding: 4px 24px 20px;
}

/* ===== FORM GRID ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.modern-form input,
.modern-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: white;
    outline: none;
    transition: border-color 0.2s;
    margin: 0;
}

.modern-form input:focus,
.modern-form select:focus {
    border-color: #6366f1;
}

/* ===== RECOMMENDATION ===== */
.recommendation-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
}

.rec-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    cursor: pointer;
}

.rec-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    cursor: pointer;
}

.recommendation-row select {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    color: #aaa;
    background: #fafafa;
    outline: none;
    margin: 0;
    width: auto;
}

.recommendation-row select:not([disabled]) {
    color: #333;
    background: white;
    border-color: #6366f1;
}

/* ===== MODAL FOOTER ===== */
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #f0f0f0;
    margin-top: 8px;
}

.modal .btn-cancel {
    background: #f3f4f6;
    color: #555;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

.modal .btn-cancel:hover {
    background: #e5e7eb;
}

.modal .btn-save {
    background: #6366f1;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    width: auto;
}

.modal .btn-save:hover {
    background: #4f46e5;
}

/* ===== ADD BUTTON ===== */
.add-btn {
    width: auto;
    background: #6366f1;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}
/* ===== PROFILE PAGE (view_user.php) ===== */

/* Header */
.pf-header {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
    gap: 16px;
}

.pf-header-left {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.pf-avatar-lg {
    width: 64px;
    height: 64px;
    background: #6366f1;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
}

.pf-header-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.pf-header-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pf-name {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.pf-type-badge {
    background: #ede9fe;
    color: #6366f1;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}

.pf-status-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pf-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.pf-dot-active        { background: #22c55e; }
.pf-dot-suspended     { background: #ef4444; }
.pf-dot-left          { background: #6b7280; }
.pf-dot-on-hold       { background: #f59e0b; }
.pf-dot-pending       { background: #f59e0b; }
.pf-dot-new           { background: #6366f1; }
.pf-dot-new-lead      { background: #a78bfa; }
.pf-dot-lead          { background: #818cf8; }
.pf-dot-trial         { background: #f59e0b; }

.pf-status-text {
    font-size: 13px;
    color: #6b7280;
}

.pf-edit-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0;
    width: 130px;
    height: 38px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}

.pf-edit-btn:hover {
    background: #e5e7eb;
}

.pf-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.pf-suspend-btn {
    background: #fff0f0;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 0;
    width: 130px;
    height: 38px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s;
}
.pf-suspend-btn:hover { background: #fee2e2; }

/* Suspend modal body */
.suspend-body {
    padding: 8px 0;
}
.suspend-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 28px;
    border-bottom: 1px solid #f3f4f6;
}
.suspend-check-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    flex-shrink: 0;
    width: 200px;
    user-select: none;
}
.suspend-check-label input[type="radio"] { display: none; }
.suspend-check-box {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}
.suspend-check-label input[type="radio"]:checked ~ .suspend-check-box {
    background: #6366f1;
    border-color: #6366f1;
}
.suspend-check-label input[type="radio"]:checked ~ .suspend-check-box::after {
    content: '';
    width: 5px;
    height: 9px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg) translateY(-1px);
    display: block;
}
.suspend-check-text {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}
.suspend-tag {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
}
.suspend-tag-temp { background: #fef3c7; color: #b45309; }
.suspend-tag-perm { background: #fee2e2; color: #b91c1c; }
.suspend-inline-select {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 13px;
    color: #374151;
    background: #fff;
    height: 42px;
}
.suspend-inline-select:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}
.suspend-note {
    padding: 18px 28px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.suspend-note label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}
.suspend-note textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 13px;
    color: #374151;
    resize: vertical;
    font-family: inherit;
    box-sizing: border-box;
}

.btn-danger {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #dc2626 !important;
}
.btn-danger:hover { background: #b91c1c !important; }

/* Two-column body */
.pf-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

/* Left: info panel */
.pf-info-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pf-field {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f3f4f6;
}

.pf-field:last-of-type {
    border-bottom: none;
}

.pf-field-icon {
    font-size: 16px;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    margin-top: 1px;
}

.pf-field-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pf-field-label {
    font-size: 11px;
    color: #9ca3af;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.pf-field-value {
    font-size: 13px;
    color: #111827;
    font-weight: 500;
    word-break: break-word;
}

/* Stats strip */
.pf-stats-strip {
    display: flex;
    gap: 0;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 16px;
}

.pf-stat {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: #fafafa;
    border-right: 1px solid #e5e7eb;
}

.pf-stat:last-child {
    border-right: none;
}

.pf-stat strong {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
}

.pf-stat span {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 2px;
}

/* Right: tabs panel */
.pf-tabs-panel {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: visible;
}

.pf-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
    padding: 0 20px;
    gap: 4px;
}

.pf-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    margin-bottom: -1px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: auto;
    border-radius: 0;
    transition: color 0.15s;
}

.pf-tab:hover {
    color: #374151;
}

.pf-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
    background: none;
}

.pf-tab-content {
    padding: 20px;
}

/* Table toolbar */
.pf-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.pf-table-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

/* Members table */
.pf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.pf-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.pf-table td {
    padding: 12px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: middle;
}

.pf-table tr:last-child td {
    border-bottom: none;
}

.pf-member-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pf-member-avatar {
    width: 32px;
    height: 32px;
    background: #ede9fe;
    color: #6366f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.pf-member-name {
    font-weight: 500;
    color: #111827;
}

/* Status badges */
.pf-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.pf-badge-active     { background: #dcfce7; color: #16a34a; }
.pf-badge-suspended  { background: #fee2e2; color: #dc2626; }
.pf-badge-left       { background: #f3f4f6; color: #374151; }
.pf-badge-on-hold    { background: #fef9c3; color: #ca8a04; }
.pf-badge-pending    { background: #fef9c3; color: #ca8a04; }
.pf-badge-new        { background: #ede9fe; color: #6366f1; }
.pf-badge-new-lead   { background: #f5f3ff; color: #7c3aed; }
.pf-badge-lead       { background: #eef2ff; color: #4f46e5; }
.pf-badge-trial      { background: #fef3c7; color: #d97706; }

.pf-row-actions {
    font-size: 18px;
    color: #9ca3af;
    cursor: pointer;
    text-align: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pf-row-actions:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Table footer */
.pf-table-footer {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 12px;
    text-align: right;
}

/* Placeholder tabs */
.pf-placeholder {
    color: #9ca3af;
    font-size: 13px;
    text-align: center;
    padding: 40px 0;
}

/* ===== ROW ACTIONS DROPDOWN ===== */
.actions-cell {
    width: 48px;
    text-align: center;
    padding-right: 25px !important;
}

.row-actions-wrap {
    position: relative;
    display: inline-block;
}

.row-dots-btn {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 18px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}

.row-dots-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.row-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.10);
    min-width: 130px;
    z-index: 1000;
    overflow: visible;
}

.row-actions-wrap.open .row-dropdown {
    display: block;
}

.row-dd-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    transition: background 0.12s;
    white-space: nowrap;
}

.row-dd-item:hover {
    background: #f3f4f6;
}

.row-dd-suspend {
    color: #f59e0b;
}
.row-dd-suspend:hover { background: #fffbeb; }

.row-dd-delete {
    color: #ef4444;
    border-top: 1px solid #f3f4f6;
}
.row-dd-delete:hover { background: #fef2f2; }

/* ===== INVOICE BADGES ===== */
.inv-type-due      { background: #dbeafe; color: #1d4ed8; }
.inv-type-overdue  { background: #fef9c3; color: #b45309; }
.inv-type-lost     { background: #f3f4f6; color: #6b7280; }
.inv-status-paid     { background: #dcfce7; color: #16a34a; }
.inv-status-due      { background: #dbeafe; color: #1d4ed8; }
.inv-status-late     { background: #fee2e2; color: #dc2626; }
.inv-status-upcoming { background: #f0fdf4; color: #15803d; }

/* ===== STAFF ===== */
.staff-active   { background: #dcfce7; color: #16a34a; }
.staff-inactive { background: #f3f4f6; color: #6b7280; }

/* Salary status */
.sal-status-paid   { background: #dcfce7; color: #16a34a; }
.sal-status-unpaid { background: #fef9c3; color: #b45309; }

/* Online / offline dot */
.staff-dot {
    display: inline-block;
    width: 9px; height: 9px;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    flex-shrink: 0;
}
.dot-online  { background: #22c55e; box-shadow: 0 0 0 2px #dcfce7; }
.dot-offline { background: #d1d5db; }

/* Check-in / check-out button in header */
.checkin-btn {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    line-height: 1.4;
    width: auto;
    transition: opacity 0.15s;
}
.checkin-btn:hover { opacity: 0.85; }
.checkin-btn.online  { background: #dcfce7; color: #15803d; }
.checkin-btn.offline { background: #fee2e2; color: #dc2626; }

/* Work schedule rows */
.schedule-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13px;
}
.schedule-row:last-child { border-bottom: none; }
.schedule-row > label {
    width: 100px;
    display: flex;
    align-items: center;
    gap: 7px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}
.schedule-row input[type=time] {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    color: #374151;
    background: white;
}
.schedule-row input[type=time]:disabled {
    background: #f9fafb;
    color: #d1d5db;
    border-color: #f3f4f6;
}
.schedule-row span { color: #9ca3af; font-size: 12px; }

/* Permissions checkbox grid */
.perms-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
}
.perm-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
}
.perm-item input[type=checkbox] {
    width: 15px; height: 15px;
    cursor: pointer;
    accent-color: #6366f1;
}

/* Access denied page */
.access-denied-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}
.access-denied-box {
    text-align: center;
    padding: 48px 40px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 24px rgba(0,0,0,0.07);
    max-width: 400px;
    width: 100%;
}
.access-denied-icon { font-size: 48px; margin-bottom: 16px; }
.access-denied-box h2 { font-size: 20px; font-weight: 600; color: #111; margin-bottom: 8px; }
.access-denied-box p  { color: #6b7280; margin-bottom: 24px; font-size: 14px; }

/* ===== HOURS REPORT — INLINE EDIT ===== */
.hours-input {
    width: 72px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    color: #374151;
    background: transparent;
    text-align: center;
    display: inline-block;
    transition: border-color 0.15s, background 0.15s;
}
.hours-input:hover  { border-color: #e5e7eb; background: #f9fafb; }
.hours-input:focus  { border-color: #6366f1; background: white; outline: none; }
.hours-input.hours-saved  { border-color: #22c55e !important; background: #f0fdf4 !important; }
.hours-input.hours-error  { border-color: #ef4444 !important; background: #fef2f2 !important; }
.hours-input.hours-locked { background: #f9fafb; color: #d1d5db; cursor: not-allowed; }
.hours-input:disabled     { background: #f9fafb; color: #d1d5db; cursor: not-allowed; border-color: transparent; }
