/* Panel-specific additions on top of app.css */

.form-grid {
    max-width: 960px;
}

/* Profile Info Summary Stack */
.profile-info-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
}

.profile-info-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.profile-info-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

/* Sidebar user profile link with chevron */
.sidebar-user-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 6px 8px;
    margin: -4px -6px;
    border-radius: var(--radius);
    transition: background-color 0.15s ease;
    cursor: pointer;
}

.sidebar-user-link:hover {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-user-chevron {
    margin-left: auto;
    color: #64748b;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.sidebar-user-link:hover .sidebar-user-chevron {
    color: #f1f5f9;
    transform: translateX(2px);
}

/* Phone Chips (Side by Side in Padded Rounded Rectangle) */
.phone-chips-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.phone-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px 4px 12px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phone-chip:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.12);
}

.phone-chip-input {
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.875rem;
    color: var(--text);
    width: 155px;
    padding: 2px 0;
}

.phone-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 5px;
    border-radius: 4px;
    color: #94a3b8;
    cursor: pointer;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.phone-chip-remove:hover {
    background-color: var(--danger-light);
    color: var(--danger);
}

/* User permission matrix */
.permission-table { table-layout: fixed; width: 100%; min-width: 640px; }
.permission-table .permission-col { width: 140px; }
.permission-table th,
.permission-table td { text-align: center; vertical-align: middle; }
.permission-table .permission-account { text-align: left; }
.permission-head { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.permission-table input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; }
.permission-table input[type="checkbox"]:disabled { cursor: not-allowed; }

/* In-page tabs use the admin panel's sub-tabs look. */
button.sub-tab { background: none; border: 0; border-bottom: 2px solid transparent; font-family: inherit; cursor: pointer; }

/* On / off switch (a button, so the state only changes once the model does). */
.switch { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; font: inherit; color: var(--text); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }
.switch-track { position: relative; width: 40px; height: 22px; border-radius: 999px; background: #cbd5e1; transition: background 0.15s ease; }
.switch-thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s ease; }
.switch.on .switch-track { background: var(--success); }
.switch.on .switch-thumb { transform: translateX(18px); }
.switch-label { font-size: 0.875rem; font-weight: 600; min-width: 36px; text-align: left; }

/* Keep agency and profile form fields on separate rows. */
.agency-details .form-grid,
.profile-details .form-grid {
    grid-template-columns: minmax(0, 1fr);
}

.agency-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 24px;
    align-items: start;
}

.agency-details-grid > .card {
    min-width: 0;
}

/* Profile 2x2 Layout: 2 columns (Left: Hesap & İletişim, Right: Vergi & Banka) */
.profile-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

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

.profile-col {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
}

.profile-col > .card {
    min-width: 0;
}

/* Checkbox / radio rows and grouped fields in forms */
.field-group {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.field-group-title {
    font-weight: 600;
    font-size: 0.875rem;
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    cursor: pointer;
}

.check input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.coverage-row {
    display: grid;
}
