body {
    padding: 20px;
    font-family: 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
}

.container {
    max-width: 850px;
    margin: auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #1a73e8;
    margin-top: 0;
    border-bottom: 2px solid #e8f0fe;
    padding-bottom: 10px;
}

.field {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.required::after {
    content: " *";
    color: #d93025;
}

textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
}

.password-wrapper {
    position: relative;
    width: 100%;
    display: block;
}

.password-wrapper input {
    padding-right: 40px !important;
    width: 100%;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    user-select: none;
    color: #5f6368;
    font-size: 20px !important;
    z-index: 10;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    pointer-events: auto;
}

.password-toggle:hover {
    color: #1a73e8;
    opacity: 1;
}

/* Hide default browser password visibility toggle */
input::-ms-reveal,
input::-ms-clear {
    display: none;
}

textarea {
    font-family: 'Segoe UI', sans-serif;
    resize: vertical;
    font-size: 13px;
}

#patents {
    height: 180px;
}

#npls {
    height: 120px;
}

.section-title {
    font-size: 12px;
    font-weight: bold;
    color: #5f6368;
    text-transform: uppercase;
    margin: 25px 0 10px 0;
    letter-spacing: 0.8px;
    border-left: 3px solid #1a73e8;
    padding-left: 8px;
}

.field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
    user-select: none;
}

.switch-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    color: #9aa0a6;
    letter-spacing: 0.5px;
}

.switch-label.active {
    color: #1a73e8;
}

.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #dadce0;
    transition: .3s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #1a73e8;
}

input:checked+.slider:before {
    transform: translateX(16px);
}

.checkbox-container {
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.checkbox-item {
    display: flex;
    align-items: flex-start;
    font-size: 12px;
    color: #3c4043;
    cursor: pointer;
    margin-bottom: 10px;
    line-height: 1.4;
}

.checkbox-item input {
    margin-top: 2px;
    margin-right: 12px;
    cursor: pointer;
    flex-shrink: 0;
}

.or-divider {
    font-weight: bold;
    font-size: 10px;
    color: #1a73e8;
    margin: -5px 0 10px 30px;
    text-transform: uppercase;
}

.flex-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.flex-row>div {
    flex: 1;
}

#status {
    margin-top: 20px;
    padding: 15px;
    border-radius: 4px;
    display: none;
    font-size: 14px;
    line-height: 1.5;
}

.duplicate-warning {
    margin-top: 10px;
    padding: 10px;
    background: #fff4e5;
    border: 1px solid #ff9800;
    color: #663c00;
    font-size: 12px;
    border-radius: 4px;
}

.generation-options {
    margin: 16px 0 8px 0;
}

.fee-warning-card {
    margin-top: 15px;
    padding: 15px;
    background: #fff5f5;
    border: 2px solid #d32f2f;
    color: #b71c1c;
    font-size: 13px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    display: flex;
    align-items: flex-start;
}

.fee-warning-card::before {
    content: "⚠️";
    margin-right: 10px;
    font-size: 18px;
}

.loading {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #1a73e8;
}

.error {
    color: #d93025;
    background: #fce8e6;
    border: 1px solid #d93025;
}

.success {
    color: #188038;
    background: #e6f4ea;
    border: 1px solid #188038;
}

#submitBtn.btn-primary {
    background: #1a73e8 !important;
    color: white !important;
    border: none;
    padding: 0 24px;
    height: 48px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    margin-top: 10px;
    transition: background-color 0.2s;
}

#submitBtn.btn-primary:disabled {
    background: #f1f3f4 !important;
    color: #70757a !important;
    cursor: not-allowed !important;
    border: 1px solid #dadce0 !important;
}

.smart-list-view {
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #f1f3f4;
    padding: 10px;
}

.smart-list-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: white;
    padding: 8px 10px;
    margin-bottom: 8px;
    border: 1px solid #e8eaed;
    border-radius: 4px;
}

.smart-input-box {
    flex-grow: 1;
}

.smart-input-box input,
.smart-input-box textarea {
    width: 100%;
    padding: 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.smart-list-row label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 11px;
    color: #1a73e8;
    font-weight: 800;
    white-space: nowrap;
    padding-top: 8px;
}

.smart-list-row label.disabled-label {
    color: #9aa0a6;
    cursor: not-allowed;
}

.hidden {
    display: none;
}

.smart-instruction {
    font-size: 11px;
    color: #1a73e8;
    margin-bottom: 6px;
    font-weight: bold;
}

.validation-warning {
    background: #fff4e5;
    border: 1px solid #ff9800;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 13px;
}

.validation-warning h4 {
    margin: 0 0 10px 0;
    color: #e65100;
}

.validation-warning ul {
    margin: 0 0 15px 20px;
    padding: 0;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: white;
    color: #5f6368;
    border: 1px solid #dadce0;
    padding: 0 16px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.btn-warning {
    background: #ff9800;
    color: white;
    border: none;
    padding: 0 16px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.btn-success {
    background: #188038;
    color: white;
    border: none;
    padding: 0 24px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    margin-top: 15px;
    width: 100%;
    transition: background-color 0.2s;
}

.auth-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    padding: 10px 20px;
    border-bottom: 1px solid #e8eaed;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    font-size: 13px;
}

#assoc-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 13px;
    resize: none;
    font-family: inherit;
}

.brand-title {
    color: #1a73e8;
    font-size: 24px;
    font-weight: 850;
    margin: 0;
    letter-spacing: -0.8px;
    display: flex;
    align-items: center;
}

.auth-links {
    display: flex;
    align-items: center;
}

.user-info {
    margin-right: 15px;
    color: #5f6368;
}

.billing-link {
    color: #1a73e8;
    font-weight: bold;
    text-decoration: none;
    margin-right: 15px;
}

.billing-link:hover {
    text-decoration: underline;
}

/* Dashboard Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    color: #1a73e8;
    font-weight: bold;
    cursor: pointer;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-right: 15px;
    border-right: 1px solid #e8eaed;
}

.dropdown-trigger:hover {
    background: #f1f3f4;
}

.dropdown-trigger .material-symbols-outlined {
    font-size: 18px;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    border-radius: 8px;
    overflow: visible;
    /* Changed to visible to allow pseudo-element bridge */
    border: 1px solid #e8eaed;
}

.dropdown-item:first-child {
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.dropdown-item:last-child {
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Add a transparent bridge between trigger and content */
.dropdown-content::before {
    content: "";
    position: absolute;
    top: -15px;
    /* Cover the gap */
    left: 0;
    right: 0;
    height: 15px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 12px 16px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #3c4043;
    font-size: 13px;
    transition: background 0.2s;
    cursor: pointer;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #1a73e8;
}

.dropdown-item .material-symbols-outlined {
    font-size: 20px;
    color: #5f6368;
}

.dropdown-item:hover .material-symbols-outlined {
    color: #1a73e8;
}

.dropdown-divider {
    height: 1px;
    background-color: #e8eaed;
    margin: 4px 0;
}

.btn-auth {
    background: #4285f4;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-auth:hover {
    background: #357ae8;
}

.auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.auth-overlay h3 {
    color: #1a73e8;
    margin-bottom: 20px;
}

.auth-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    width: 350px;
    text-align: center;
}

.auth-input-group {
    margin-bottom: 15px;
    text-align: left;
}

.auth-input-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
}

.auth-input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #9aa0a6;
    font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e8eaed;
}

.auth-divider:not(:empty)::before {
    margin-right: .25em;
}

.auth-divider:not(:empty)::after {
    margin-left: .25em;
}

.btn-auth-email {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 24px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    width: 100%;
    margin-bottom: 10px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-footer {
    margin-top: 15px;
    font-size: 12px;
    color: #5f6368;
}

.auth-footer a {
    color: #1a73e8;
    text-decoration: none;
    font-weight: bold;
}

.profile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.profile-card {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 550px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: #fff;
    border-bottom: 2px solid #e8f0fe;
    z-index: 10;
}

.profile-title-group h3 {
    margin: 0;
    color: #1a73e8;
    font-size: 20px;
}

.profile-actions {
    display: flex;
    gap: 10px;
}

.profile-actions button {
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
}

.profile-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 30px 30px 30px;
}

.profile-skeleton {
    position: absolute;
    top: 77px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 25px 30px 30px;
    background: white;
    overflow: hidden;
}

.profile-skeleton-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.credit-skeleton {
    width: 100%;
    height: 78px;
    border-radius: 8px;
    background: linear-gradient(90deg, #e8eaed 25%, #f1f3f4 50%, #e8eaed 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.close-btn {
    cursor: pointer;
    font-size: 24px;
    color: #5f6368;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
}

.close-btn:hover {
    color: #202124;
}

.profile-section {
    margin-bottom: 25px;
}

.profile-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #1a73e8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.full-width {
    grid-column: span 2;
}

.credit-display {
    background: #e8f0fe;
    padding: 15px;
    border-radius: 8px;
    margin: 25px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.credit-count {
    font-size: 24px;
    font-weight: bold;
    color: #1a73e8;
}

.credit-label {
    font-size: 13px;
    color: #5f6368;
    font-weight: 600;
}

.buy-btn-small {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 16px;
    height: 32px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.profile-link {
    color: #1a73e8;
    font-weight: bold;
    text-decoration: none;
    margin-right: 15px;
    padding-right: 15px;
    border-right: 1px solid #e8eaed;
}

.profile-link:hover {
    text-decoration: underline;
}

.alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.alert-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 400px;
    max-width: 90%;
    text-align: center;
    animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Attorney Management Styles */
.attorney-list {
    margin-top: 15px;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    overflow: hidden;
}

.attorney-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #fff;
    border-bottom: 1px solid #eee;
    gap: 15px;
}

.attorney-item:last-child {
    border-bottom: none;
}

.attorney-item.primary {
    background: #f8faff;
    border-left: 4px solid #1a73e8;
}

.attorney-info {
    flex: 1;
}

.attorney-name {
    font-weight: 600;
    font-size: 14px;
    color: #3c4043;
}

.attorney-reg {
    font-size: 12px;
    color: #5f6368;
}

.attorney-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-icon {
    font-size: 18px !important;
    cursor: pointer;
    color: #5f6368;
    transition: color 0.2s;
}

.action-icon:hover {
    color: #1a73e8;
}

.action-icon.delete:hover {
    color: #d93025;
}

.btn-add-inline {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px dashed #1a73e8;
    padding: 8px;
    width: 100%;
    margin-top: 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-add-inline:hover {
    background: #d2e3fc;
}

.primary-badge {
    font-size: 10px;
    background: #e8f0fe;
    color: #1a73e8;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}


.alert-title {
    margin-top: 0;
    color: #1a73e8;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 15px;
}

.alert-message {
    color: #3c4043;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 25px;
    text-align: left;
}

.alert-btn {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 24px;
    height: 38px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    min-width: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.alert-btn:hover {
    background: #1765cc;
}

.legal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.legal-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.1);
    width: 500px;
    max-width: 90%;
    text-align: center;
    border: 1px solid #e8eaed;
}

.legal-card h3 {
    color: #1a73e8;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 850;
}

.legal-card p {
    color: #5f6368;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 30px;
}

.legal-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 35px;
}

.legal-links a {
    display: block;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #1a73e8;
    font-weight: 600;
    text-decoration: none;
    transition: 0.2s;
    border: 1px solid #e8eaed;
}

.legal-links a:hover {
    background: #e8f0fe;
    border-color: #1a73e8;
    transform: translateY(-2px);
}

.btn-accept {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 0 40px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    width: 100%;
    transition: 0.2s;
}

.btn-accept:hover {
    background: #1557b0;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

.legal-footer {
    margin-top: 20px;
    font-size: 12px;
    color: #9aa0a6;
}

.history-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    display: none;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(2px);
}

.history-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 700px;
    max-width: 95%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e8f0fe;
}

.history-header h3 {
    margin: 0;
    color: #1a73e8;
    font-size: 20px;
}

.history-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

.history-search-bar input {
    height: 40px;
    margin: 0;
}

.history-results {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

.history-item {
    border: 1px solid #e8eaed;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
    transition: box-shadow 0.2s;
}

.history-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.history-meta {
    font-size: 13px;
}

.history-date {
    font-weight: bold;
    color: #1a73e8;
    margin-bottom: 4px;
}

.history-app {
    color: #5f6368;
    display: flex;
    gap: 15px;
}

.copy-all-btn {
    background: #f1f3f4;
    color: #1a73e8;
    border: 1px solid #dadce0;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.copy-all-btn:hover {
    background: #e8f0fe;
}

.history-refs-list {
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    font-size: 11px;
    max-height: 120px;
    overflow-y: auto;
    color: #3c4043;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.no-history-msg {
    text-align: center;
    color: #9aa0a6;
    margin-top: 40px;
    font-size: 14px;
}

.pat-row-inputs {
    display: flex;
    gap: 10px;
    width: 100%;
}

.pat-row-inputs .ref-input {
    flex: 2;
}

.pat-row-inputs .rel-input {
    flex: 1;
}

.app-footer {
    text-align: center;
    padding: 20px;
    color: #5f6368;
    font-size: 13px;
    margin-top: 20px;
}

/* Related App Chips Styling */
.related-app-chip {
    background: white;
    border: 1px solid #dadce0;
    border-radius: 4px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    min-width: 140px;
    position: relative;
    transition: all 0.2s;
}

.related-app-chip:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chip-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.chip-header {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chip-type {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    border-radius: 3px;
    padding: 1px 4px;
}

.chip-group-label {
    font-size: 10px;
    color: #5f6368;
    background: #f1f3f4;
    padding: 1px 4px;
    border-radius: 3px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chip-app-num {
    font-weight: 600;
    font-size: 13px;
    color: #3c4043;
}


/* Color Coding */
.chip-manual {
    border-left: 3px solid #1a73e8; /* Blue */
}
.chip-manual .chip-type {
    color: #1a73e8;
    background: #e8f0fe;
}

.chip-parent {
    border-left: 3px solid #a142f4; /* Purple */
}
.chip-parent .chip-type {
    color: #a142f4;
    background: #f3e8fd;
}

.chip-child {
    border-left: 3px solid #009688; /* Teal */
}
.chip-child .chip-type {
    color: #009688;
    background: #e0f2f1;
}

.chip-default {
    border-left: 3px solid #5f6368;
}

/* Disabled State */
.chip-disabled {
    background: #f8f9fa;
    border-color: #e8eaed;
    color: #9aa0a6;
    border-left-color: #dadce0;
    cursor: not-allowed;
}

.chip-disabled .chip-app-num {
    color: #9aa0a6;
}

.chip-disabled .chip-type {
    background: #e8eaed;
    color: #9aa0a6;
}

.btn-xs {
    font-size: 11px;
    height: 24px;
    padding: 0 8px;
    width: auto;
    margin: 0;
}

.action-icon {
    font-size: 16px; 
    color: #9aa0a6; 
    cursor: pointer; 
    transition: color 0.2s;
}
.action-icon:hover {
    color: #1a73e8;
}

.assoc-app-pill {
    background: #e8f0fe; 
    color: #1967d2; 
    padding: 2px 6px; 
    border-radius: 12px; 
    font-size: 11px; 
    font-weight: 600;
}

/* Custom Combobox Dropdown */
.combobox-wrapper {
    position: relative;
    width: 100%;
}

.combobox-wrapper input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    padding-right: 30px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
}

.combobox-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #5f6368;
    font-size: 12px;
    user-select: none;
    line-height: 1;
    padding: 4px;
}

.combobox-arrow:hover {
    color: #1a73e8;
}

.combobox-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 180px;
    overflow-y: auto;
    background: white;
    border: 1px solid #dadce0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    z-index: 100;
}

.combobox-dropdown.open {
    display: block;
}

.combobox-option {
    padding: 8px 12px;
    font-size: 14px;
    color: #3c4043;
    cursor: pointer;
    transition: background 0.15s;
}

.combobox-option:hover,
.combobox-option.highlighted {
    background: #e8f0fe;
    color: #1a73e8;
}

.combobox-no-options {
    padding: 8px 12px;
    font-size: 13px;
    color: #9aa0a6;
    font-style: italic;
}

/* Skeleton Loading Overlay */
.skeleton-overlay {
    position: absolute;
    inset: 0;
    background: white;
    z-index: 100;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 1px solid #dadce0;
}

.skeleton-row {
    display: flex;
    gap: 20px;
}

.skeleton-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-label {
    width: 40%;
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8eaed 25%, #f1f3f4 50%, #e8eaed 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-input {
    width: 100%;
    height: 38px;
    border-radius: 4px;
    background: linear-gradient(90deg, #e8eaed 25%, #f1f3f4 50%, #e8eaed 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    animation-delay: 0.15s;
}

.skeleton-input.short {
    width: 48%;
}

.skeleton-hint {
    text-align: center;
    font-size: 12px;
    color: #9aa0a6;
    margin-top: 2px;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
