/* ==========================================================================
   Know Your Taxation Circle - Stylesheet
   Meghalaya Taxation Portal | Commissionerate of Taxes
   ========================================================================== */

/* Sub-Hero / Breadcrumb Strip */
.kyc-page-header {
    background: linear-gradient(135deg, #090d16 0%, #0f172a 60%, #1e293b 100%);
    color: #ffffff;
    padding: 2.25rem 0 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.kyc-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 60%);
    pointer-events: none;
}

.kyc-breadcrumb {
    font-size: 0.8rem;
    font-weight: 500;
    color: #94a3b8;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kyc-breadcrumb a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.15s ease;
}

.kyc-breadcrumb a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.kyc-breadcrumb-separator {
    color: #64748b;
    font-size: 0.7rem;
}

.kyc-page-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.kyc-page-subtitle {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 0;
    max-width: 750px;
    line-height: 1.55;
}

/* Master Section Layout */
.know-your-circle-section {
    padding: 2rem 0 3.5rem;
    background-color: var(--lumo-body-bg, #f8fafc);
}

.kyc-master-panel {
    background: #ffffff;
    border-radius: var(--lumo-border-radius-l, 12px);
    border: 1px solid var(--lumo-border-color, #e2e8f0);
    box-shadow: var(--lumo-box-shadow-s, 0 1px 3px 0 rgba(0, 0, 0, 0.04));
    padding: 2.25rem;
    transition: box-shadow 0.2s ease;
    margin-top: -3.5rem;
    position: relative;
    z-index: 10;
}

.kyc-header-strip {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--lumo-border-color, #e2e8f0);
}

.kyc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.725rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
    background: #eff6ff;
    padding: 0.35rem 0.75rem;
    border-radius: var(--lumo-border-radius-pill, 9999px);
    border: 1px solid #bfdbfe;
    margin-bottom: 0.6rem;
}

.kyc-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--lumo-heading-color, #0f172a);
    letter-spacing: -0.02em;
    margin-bottom: 0.4rem;
}

.kyc-subtitle {
    font-size: 0.925rem;
    color: var(--lumo-secondary-text, #64748b);
    margin-bottom: 0;
    max-width: 680px;
    line-height: 1.5;
}

.kyc-stat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kyc-stat-chip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.55rem 0.85rem;
    border-radius: var(--lumo-border-radius-m, 8px);
}

.kyc-stat-chip-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0f172a;
    color: #ffffff;
    font-size: 0.85rem;
}

.kyc-stat-chip-num {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1;
}

.kyc-stat-chip-lbl {
    font-size: 0.7rem;
    color: #64748b;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.03em;
}

/* Controls Bar */
.kyc-controls-bar {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--lumo-border-radius-m, 8px);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.kyc-search-wrap {
    position: relative;
}

.kyc-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    font-size: 0.9rem;
}

.kyc-search-input {
    padding-left: 2.75rem;
    padding-right: 2.5rem;
    height: 44px;
    border-radius: var(--lumo-border-radius-s, 6px);
    border: 1px solid #cbd5e1;
    font-size: 0.925rem;
    background: #ffffff;
    transition: all 0.15s ease;
}

.kyc-search-input:focus {
    border-color: #0f172a;
    box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.1);
    outline: none;
}

.kyc-search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    line-height: 1;
}

.kyc-search-clear:hover {
    color: #0f172a;
}

/* Category Pills */
.kyc-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.kyc-cat-pill {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 0.825rem;
    font-weight: 600;
    padding: 0.4rem 0.85rem;
    border-radius: var(--lumo-border-radius-pill, 9999px);
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.kyc-cat-pill:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #94a3b8;
}

.kyc-cat-pill.active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.kyc-cat-pill .badge-count {
    font-size: 0.7rem;
    padding: 0.12rem 0.45rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.2);
}

.kyc-cat-pill:not(.active) .badge-count {
    background: #e2e8f0;
    color: #475569;
}

/* View Switcher */
.kyc-view-toggle {
    display: inline-flex;
    background: #e2e8f0;
    padding: 3px;
    border-radius: var(--lumo-border-radius-s, 6px);
}

.kyc-view-btn {
    border: none;
    background: transparent;
    padding: 0.35rem 0.75rem;
    border-radius: calc(var(--lumo-border-radius-s, 6px) - 2px);
    font-size: 0.825rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
}

.kyc-view-btn.active {
    background: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Locality Quick Chips */
.kyc-quick-chips-wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px dashed #e2e8f0;
}

.kyc-quick-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 0.25rem;
}

.kyc-quick-tag {
    font-size: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    user-select: none;
}

.kyc-quick-tag:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Circle Cards Grid */
.kyc-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: var(--lumo-border-radius-m, 8px);
    padding: 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.kyc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #cbd5e1;
    transition: background 0.2s ease, width 0.2s ease;
}

.kyc-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--lumo-box-shadow-hover, 0 10px 20px -5px rgba(0, 0, 0, 0.06));
    transform: translateY(-2px);
}

.kyc-card:hover::before {
    background: #0f172a;
    width: 5px;
}

.kyc-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.kyc-code-badge {
    font-size: 0.725rem;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.55rem;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.kyc-location-badge {
    font-size: 0.75rem;
    font-weight: 600;
    color: #0f172a;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.kyc-circle-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--lumo-heading-color, #0f172a);
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kyc-officer-sub {
    font-size: 0.775rem;
    color: #64748b;
    margin-bottom: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.kyc-jurisdiction-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: var(--lumo-border-radius-s, 6px);
    padding: 0.85rem;
    margin-bottom: 0.85rem;
    font-size: 0.84rem;
    color: #334155;
    line-height: 1.55;
    max-height: 110px;
    overflow-y: auto;
    scrollbar-width: thin;
}

.kyc-landmark-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.kyc-landmark-chip {
    font-size: 0.7rem;
    font-weight: 500;
    background: #f1f5f9;
    color: #475569;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    border: 1px solid #e2e8f0;
}

.kyc-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.kyc-details-btn {
    font-size: 0.775rem;
    font-weight: 600;
    color: #0f172a;
    background: transparent;
    border: 1px solid #cbd5e1;
    padding: 0.35rem 0.75rem;
    border-radius: var(--lumo-border-radius-xs, 4px);
    transition: all 0.15s ease;
    cursor: pointer;
}

.kyc-details-btn:hover {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

.kyc-copy-btn {
    font-size: 0.75rem;
    color: #64748b;
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    padding: 0.35rem 0.55rem;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.kyc-copy-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #e2e8f0;
}

/* Highlighted match styling */
.kyc-highlight {
    background: #fef08a;
    color: #854d0e;
    font-weight: 700;
    padding: 0 2px;
    border-radius: 2px;
}

/* Table View Styling */
.kyc-table-wrap {
    overflow-x: auto;
    border: 1px solid #e2e8f0;
    border-radius: var(--lumo-border-radius-m, 8px);
}

.kyc-table {
    margin-bottom: 0;
    font-size: 0.875rem;
    width: 100%;
}

.kyc-table thead th {
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.85rem 1rem;
    border: none;
    white-space: nowrap;
}

.kyc-table tbody td {
    padding: 1rem;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    line-height: 1.5;
}

.kyc-table tbody tr:hover {
    background: #f8fafc;
}

/* Empty State */
.kyc-empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
}

.kyc-empty-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Modal for Circle Details */
#circleDetailModal .modal-content {
    border-radius: 12px;
    border: 1px solid #cbd5e1;
}

#circleDetailModal .kyc-modal-header-badge {
    font-size: 0.75rem;
    font-weight: 700;
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    padding: 0.25rem 0.6rem;
    border-radius: 9999px;
}

@media (max-width: 768px) {
    .kyc-page-title {
        font-size: 1.5rem;
    }

    .kyc-master-panel {
        padding: 1.25rem;
    }

    .kyc-header-strip {
        gap: 1rem;
    }
}