/* ===== GLOBAL STANDARD CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
    --sky: #0ea5e9;
    --sky-dark: #0284c7;
    --rose: #f43f5e;
    --rose-dark: #e11d48;
    --emerald: #10b981;
    --amber: #f59e0b;
    --slate-900: #0f172a;
    --slate-600: #475569;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;
    --slate-100: #f1f5f9;
    --slate-50: #f8fafc;
}

/* Page Container */
.page-container {
    font-family: 'Manrope', system-ui, sans-serif;
    min-height: 100vh;
    background:
        radial-gradient(ellipse at 0% 0%, rgba(14, 165, 233, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 8px 32px 32px 32px;
}

/* Breadcrumb */
.std-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 16px 0 12px;
    font-size: 13px;
    font-weight: 500;
}
.std-breadcrumb a {
    color: var(--slate-400);
    text-decoration: none;
    transition: color 0.2s;
}
.std-breadcrumb a:hover { color: var(--sky); }
.std-breadcrumb svg { width: 14px; height: 14px; color: var(--slate-400); }
.std-breadcrumb .current { color: var(--slate-900); font-weight: 600; }

/* Page Header */
.std-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 16px;
}
.std-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.std-header-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--sky), var(--sky-dark));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}
.std-header-icon svg {
    width: 26px;
    height: 26px;
    color: white;
}
.std-header-icon.rose {
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.25);
}
.std-header-icon.emerald {
    background: linear-gradient(135deg, var(--emerald), #059669);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}
.std-header-icon.amber {
    background: linear-gradient(135deg, var(--amber), #d97706);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}
.std-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}
.std-header p {
    font-size: 13px;
    color: var(--slate-600);
    margin: 2px 0 0 0;
}

/* Cards */
.std-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--slate-200);
    box-shadow: 0 4px 24px -4px rgba(0,0,0,0.06);
    overflow: hidden;
    width: 100%;
}
.std-card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--slate-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.std-card-body {
    padding: 24px;
}

/* Buttons */
.std-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.std-btn-primary {
    background: linear-gradient(135deg, var(--sky), var(--sky-dark));
    color: white;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}
.std-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}
.std-btn-secondary {
    background: white;
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}
.std-btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}
.std-btn-danger {
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: white;
}
.std-btn svg {
    width: 18px;
    height: 18px;
}

/* Tables */
.std-table {
    width: 100%;
    border-collapse: collapse;
}
.std-table th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-200);
}
.std-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--slate-900);
    border-bottom: 1px solid var(--slate-100);
}
.std-table tr:hover td {
    background: var(--slate-50);
}
.std-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.std-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
}
.std-badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}
.std-badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}
.std-badge-danger {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}
.std-badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}

/* Forms */
.std-form-group {
    margin-bottom: 20px;
}
.std-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 8px;
}
.std-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: white;
    transition: all 0.2s;
}
.std-input:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.std-select {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: white;
    cursor: pointer;
}

/* Stats Cards */
.std-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.std-stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid var(--slate-200);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.std-stat-label {
    font-size: 13px;
    color: var(--slate-600);
    margin-bottom: 8px;
}
.std-stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--slate-900);
}

/* Empty State */
.std-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--slate-500);
}
.std-empty svg {
    width: 48px;
    height: 48px;
    color: var(--slate-300);
    margin-bottom: 16px;
}
.std-empty p {
    font-size: 14px;
    margin: 0;
}

/* Search Box */
.std-search {
    position: relative;
}
.std-search input {
    width: 100%;
    padding: 10px 16px 10px 44px;
    font-size: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: var(--slate-50);
}
.std-search svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--slate-400);
}

/* Actions */
.std-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.std-action-btn {
    padding: 8px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--slate-400);
    cursor: pointer;
    transition: all 0.2s;
}
.std-action-btn:hover {
    background: var(--slate-100);
    color: var(--slate-600);
}
.std-action-btn.edit:hover { color: var(--sky); }
.std-action-btn.delete:hover { color: var(--rose); }
.std-action-btn svg {
    width: 18px;
    height: 18px;
}

/* Modal */
.std-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
    padding: 20px;
}
.std-modal {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.std-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--slate-100);
}
.std-modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}
.std-modal-body {
    padding: 24px;
}
.std-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--slate-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Pagination */
.std-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 20px;
}
.std-pagination a, .std-pagination span {
    padding: 8px 14px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    color: var(--slate-600);
}
.std-pagination a:hover {
    background: var(--slate-100);
}
.std-pagination .active {
    background: var(--sky);
    color: white;
}

/* Alert */
.std-alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.std-alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #059669;
}
.std-alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #d97706;
}
.std-alert-danger {
    background: rgba(244, 63, 94, 0.1);
    border: 1px solid rgba(244, 63, 94, 0.2);
    color: #e11d48;
}
.std-alert-info {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: #0284c7;
}
.std-alert svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== EXTENDED STANDARD CSS ===== */

/* Filter Form */
.std-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.std-filter-search {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.std-filter-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--slate-400);
}
.std-filter-search .std-input {
    padding-left: 42px;
}

/* User Cell */
.std-user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}
.std-user-name {
    font-weight: 600;
    color: var(--slate-900);
}
.std-user-sub {
    font-size: 12px;
    color: var(--slate-500);
}

/* Icon Box */
.std-icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.std-icon-box svg {
    width: 20px;
    height: 20px;
}
.std-icon-box.indigo {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}
.std-icon-box.sky {
    background: rgba(14, 165, 233, 0.1);
    color: var(--sky);
}
.std-icon-box.emerald {
    background: rgba(16, 185, 129, 0.1);
    color: var(--emerald);
}
.std-icon-box.rose {
    background: rgba(244, 63, 94, 0.1);
    color: var(--rose);
}
.std-icon-box.amber {
    background: rgba(245, 158, 11, 0.1);
    color: var(--amber);
}

/* Contact Cell */
.std-contact-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--slate-600);
}
.std-contact-cell div {
    display: flex;
    align-items: center;
    gap: 6px;
}
.std-contact-cell svg {
    width: 14px;
    height: 14px;
    color: var(--slate-400);
}

/* Stat Cell */
.std-stat-cell {
    text-align: center;
}
.std-stat-cell .std-stat-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
}

/* Header Icon Colors */
.std-header-icon.indigo {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}
.std-header-icon.purple {
    background: linear-gradient(135deg, #a855f7, #9333ea);
    box-shadow: 0 4px 12px rgba(168, 85, 247, 0.25);
}

/* Button Text */
.std-btn-text {
    background: transparent;
    color: var(--slate-500);
    padding: 8px 12px;
    border: none;
}
.std-btn-text:hover {
    color: var(--slate-700);
    background: var(--slate-100);
}

/* Select */
.std-select {
    padding: 10px 14px;
    font-size: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 10px;
    background: white;
    color: var(--slate-900);
    cursor: pointer;
    min-width: 140px;
}
.std-select:focus {
    outline: none;
    border-color: var(--sky);
}

/* Textarea */
.std-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--slate-200);
    border-radius: 12px;
    background: white;
    resize: vertical;
    min-height: 100px;
}
.std-textarea:focus {
    outline: none;
    border-color: var(--sky);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Form Grid */
.std-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}
@media (max-width: 640px) {
    .std-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Form Error */
.std-form-error {
    font-size: 12px;
    color: var(--rose);
    margin-top: 4px;
}

/* Form Hint */
.std-form-hint {
    font-size: 12px;
    color: var(--slate-500);
    margin-top: 4px;
}

/* Required */
.std-required {
    color: var(--rose);
}

/* Card Footer */
.std-card-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--slate-100);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Button Success/Warning/Danger */
.std-btn-success {
    background: linear-gradient(135deg, var(--emerald), #059669);
    color: white;
}
.std-btn-warning {
    background: linear-gradient(135deg, var(--amber), #d97706);
    color: white;
}
.std-btn-danger {
    background: linear-gradient(135deg, var(--rose), var(--rose-dark));
    color: white;
}

/* Action Button Colors */
.std-action-btn-view:hover { color: var(--sky); background: rgba(14, 165, 233, 0.1); }
.std-action-btn-edit:hover { color: var(--amber); background: rgba(245, 158, 11, 0.1); }
.std-action-btn-success:hover { color: var(--emerald); background: rgba(16, 185, 129, 0.1); }
.std-action-btn-danger:hover { color: var(--rose); background: rgba(244, 63, 94, 0.1); }

/* Badge Colors Extended */
.std-badge-info {
    background: rgba(14, 165, 233, 0.1);
    color: #0284c7;
}
.std-badge-secondary {
    background: var(--slate-100);
    color: var(--slate-600);
}
.std-badge-default {
    background: var(--slate-100);
    color: var(--slate-600);
}

/* Stats Card Colors */
.std-stat-card.emerald { border-left: 4px solid var(--emerald); }
.std-stat-card.sky { border-left: 4px solid var(--sky); }
.std-stat-card.rose { border-left: 4px solid var(--rose); }
.std-stat-card.amber { border-left: 4px solid var(--amber); }
.std-stat-card.indigo { border-left: 4px solid #6366f1; }
.std-stat-card.purple { border-left: 4px solid #a855f7; }

/* Stat Card Icon */
.std-stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.std-stat-icon svg {
    width: 24px;
    height: 24px;
}
.std-stat-icon.emerald { background: rgba(16, 185, 129, 0.1); color: var(--emerald); }
.std-stat-icon.sky { background: rgba(14, 165, 233, 0.1); color: var(--sky); }
.std-stat-icon.rose { background: rgba(244, 63, 94, 0.1); color: var(--rose); }
.std-stat-icon.amber { background: rgba(245, 158, 11, 0.1); color: var(--amber); }
.std-stat-icon.indigo { background: rgba(99, 102, 241, 0.1); color: #6366f1; }

/* Hide on Mobile */
@media (max-width: 768px) {
    .hide-mobile { display: none !important; }
}

/* Info List */
.std-info-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.std-info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--slate-100);
}
.std-info-item:last-child { border-bottom: none; }
.std-info-label {
    font-size: 13px;
    color: var(--slate-500);
}
.std-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-900);
}

/* Info Box */
.std-info-box {
    background: var(--slate-50);
    border-radius: 12px;
    padding: 16px;
}

/* Main Grid Layout */
.std-main-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}
@media (max-width: 1024px) {
    .std-main-grid {
        grid-template-columns: 1fr;
    }
}

/* Admin List */
.std-admin-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.std-admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--slate-50);
    border-radius: 10px;
}
.std-admin-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Avatar */
.std-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--sky), var(--sky-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}
.std-avatar-large {
    width: 64px;
    height: 64px;
    font-size: 24px;
}

/* Detail Header */
.std-detail-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

/* Detail Section */
.std-detail-section {
    margin-bottom: 24px;
}
.std-detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--slate-900);
    margin-bottom: 16px;
}

/* Detail Grid */
.std-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 640px) {
    .std-detail-grid {
        grid-template-columns: 1fr;
    }
}
.std-detail-item {
    background: var(--slate-50);
    padding: 16px;
    border-radius: 12px;
}
.std-detail-item label {
    display: block;
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 4px;
}
.std-detail-item span {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-900);
}

/* Checkbox & Radio */
.std-checkbox-label,
.std-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: var(--slate-700);
}
.std-checkbox-label input,
.std-radio-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--sky);
}

/* Radio Group */
.std-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Grid Layout */
.std-grid {
    display: grid;
    gap: 20px;
}
.std-grid-2 { grid-template-columns: repeat(2, 1fr); }
.std-grid-3 { grid-template-columns: repeat(3, 1fr); }
.std-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1024px) {
    .std-grid-3, .std-grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .std-grid-2, .std-grid-3, .std-grid-4 { grid-template-columns: 1fr; }
}

/* Sidebar Layout */
.std-grid-sidebar {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
}
@media (max-width: 1024px) {
    .std-grid-sidebar { grid-template-columns: 1fr; }
}

/* Blocks Grid */
.std-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}
.std-block-card {
    background: white;
    border-radius: 16px;
    border: 1px solid var(--slate-200);
    padding: 20px;
    transition: all 0.2s;
}
.std-block-card:hover {
    border-color: var(--sky);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.1);
}

/* Resident Box */
.std-resident-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: var(--slate-50);
    border-radius: 12px;
}
.std-resident-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sky);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}
.std-resident-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--slate-900);
    margin: 0;
}
.std-resident-info p {
    font-size: 13px;
    color: var(--slate-500);
    margin: 2px 0 0 0;
}

/* Dues List */
.std-dues-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
}
.std-due-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    background: var(--slate-50);
    border-radius: 8px;
}
.std-due-item.selected {
    background: rgba(14, 165, 233, 0.1);
    border: 1px solid var(--sky);
}

/* Filter Row */
.std-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
}

/* Table Wrap */
.std-table-wrap {
    overflow-x: auto;
}

/* Modal Success */
.std-modal-success .std-modal-header {
    background: linear-gradient(135deg, var(--emerald), #059669);
}

/* Empty Icon */
.std-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--slate-300);
}
.std-empty-sm {
    padding: 30px 20px;
}
.std-empty-sm .std-empty-icon {
    width: 40px;
    height: 40px;
}

/* Stat Mini */
.std-stat-mini {
    text-align: center;
    padding: 12px;
}
.std-stat-mini-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
}
.std-stat-mini-label {
    font-size: 12px;
    color: var(--slate-500);
    margin-top: 4px;
}

/* Header Actions */
.std-header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Card Compact */
.std-card-compact .std-card-body {
    padding: 16px;
}

/* Form Actions */
.std-form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--slate-100);
    margin-top: 20px;
}

/* Form Row */
.std-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
@media (max-width: 640px) {
    .std-form-row { grid-template-columns: 1fr; }
}

/* Switch Toggle */
.std-switch {
    position: relative;
    width: 44px;
    height: 24px;
}
.std-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.std-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--slate-200);
    border-radius: 24px;
    transition: 0.3s;
}
.std-switch-slider:before {
    position: absolute;
    content: ;
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}
.std-switch input:checked + .std-switch-slider {
    background: var(--sky);
}
.std-switch input:checked + .std-switch-slider:before {
    transform: translateX(20px);
}

/* Toggle Wrapper */
.std-toggle-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--slate-50);
    border-radius: 12px;
}
.std-toggle-wrapper.active {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.std-toggle-wrapper.disabled {
    opacity: 0.6;
}
.std-toggle-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.std-toggle-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
}
.std-toggle-icon svg {
    width: 20px;
    height: 20px;
    color: var(--slate-500);
}
.std-toggle-text strong {
    display: block;
    font-size: 14px;
    color: var(--slate-900);
}
.std-toggle-text span {
    font-size: 12px;
    color: var(--slate-500);
}


/* ===== ORGANIZATIONS PAGE STYLES ===== */

/* Page Inner */
.page-inner {
    max-width: 100%;
}

/* Breadcrumb (Organizations Style) */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 4.5px;
    font-size: 13px;
    margin-bottom: 12px;
}
.breadcrumb a { color: #64748b; text-decoration: none; }
.breadcrumb a:hover { color: #0ea5e9; }
.breadcrumb svg { width: 12px; height: 12px; }
.breadcrumb-current { color: #0f172a; font-weight: 500; }

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
}
.page-title h1 {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}
.page-title p {
    font-size: 10px;
    color: #64748b;
    margin: 2px 0 0 0;
}
.page-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Organization Icon Big */
.org-icon-big {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.org-icon-big svg {
    width: 24px;
    height: 24px;
    color: #4f46e5;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #4f46e5;
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary:hover { background: #4338ca; }
.btn-primary svg { width: 16px; height: 16px; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: white;
    color: #475569;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-secondary:hover { background: #f8fafc; }
.btn-secondary svg { width: 16px; height: 16px; }

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #dc2626;
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-danger:hover { background: #b91c1c; }
.btn-danger svg { width: 16px; height: 16px; }

.btn-primary-sm {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #4f46e5;
    color: white;
    font-size: 12px;
    font-weight: 500;
    border-radius: 6px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-primary-sm:hover { background: #4338ca; }
.btn-primary-sm svg { width: 14px; height: 14px; }

.btn-filter {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-filter:hover { background: #f8fafc; }

.btn-clear {
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-clear:hover { color: #475569; }

.btn-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}
.btn-link:hover { color: #4338ca; }
.btn-link svg { width: 14px; height: 14px; }

/* Filter Card */
.filter-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.filter-input-wrap {
    flex: 1;
    min-width: 200px;
    position: relative;
}
.filter-input-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
}
.filter-input {
    width: 100%;
    padding: 8px 10px 8px 34px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
}
.filter-input:focus { border-color: #4f46e5; }
.filter-select {
    padding: 8px 12px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    min-width: 140px;
}
.filter-select:focus { border-color: #4f46e5; }

/* Table Card & Data Table */
.table-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.table-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table thead {
    background: #f8fafc;
}
.data-table th {
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e2e8f0;
}
.data-table td {
    padding: 10px 14px;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover {
    background: #f8fafc;
}

/* Organization Info */
.org-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.org-icon {
    width: 36px;
    height: 36px;
    background: #eef2ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.org-icon svg {
    width: 18px;
    height: 18px;
    color: #4f46e5;
}
.org-name {
    font-weight: 600;
    color: #0f172a;
}
.org-person {
    font-size: 11px;
    color: #64748b;
    margin-top: 1px;
}

/* Site Info */
.site-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-icon {
    width: 32px;
    height: 32px;
    background: #d1fae5;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.site-icon svg {
    width: 16px;
    height: 16px;
    color: #059669;
}
.site-name {
    font-weight: 500;
    color: #0f172a;
}
.site-location {
    font-size: 11px;
    color: #64748b;
}

/* Contact Info */
.contact-info {
    font-size: 12px;
    color: #64748b;
}
.contact-info div {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}
.contact-info svg {
    width: 12px;
    height: 12px;
}

/* Stat Cell */
.stat-cell {
    text-align: center;
}
.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}
.stat-label {
    font-size: 10px;
    color: #64748b;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 6px;
}
.badge-success {
    background: #dcfce7;
    color: #166534;
}
.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}
.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

/* Actions */
.actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
.action-btn {
    padding: 6px;
    color: #64748b;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    transition: all 0.2s;
}
.action-btn:hover {
    background: #f1f5f9;
    color: #4f46e5;
}
.action-btn svg {
    width: 16px;
    height: 16px;
}
.action-link {
    padding: 4px;
    color: #94a3b8;
    transition: color 0.2s;
}
.action-link:hover {
    color: #4f46e5;
}
.action-link svg {
    width: 16px;
    height: 16px;
}

/* Pagination Wrap */
.pagination-wrap {
    padding: 12px 14px;
    border-top: 1px solid #e2e8f0;
}

/* Empty State */
.empty-state {
    padding: 40px 20px;
    text-align: center;
}
.empty-icon {
    width: 48px;
    height: 48px;
    background: #f1f5f9;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}
.empty-icon svg {
    width: 24px;
    height: 24px;
    color: #94a3b8;
}
.empty-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 4px;
}
.empty-desc {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 12px;
}

/* Alert */
.alert {
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
    font-size: 13px;
}
.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.stat-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.stat-card-inner {
    display: flex;
    align-items: center;
    gap: 10px;
}
.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.stat-icon svg {
    width: 18px;
    height: 18px;
}
.stat-icon.indigo { background: #eef2ff; }
.stat-icon.indigo svg { color: #4f46e5; }
.stat-icon.emerald { background: #d1fae5; }
.stat-icon.emerald svg { color: #059669; }
.stat-icon.amber { background: #fef3c7; }
.stat-icon.amber svg { color: #d97706; }
.stat-icon.purple { background: #f3e8ff; }
.stat-icon.purple svg { color: #9333ea; }

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 12px;
}

/* Info Card */
.info-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    margin-bottom: 12px;
}
.card-title {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-title a {
    font-size: 12px;
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}
.card-title a:hover { color: #4338ca; }

/* Info List */
.info-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.info-item label {
    display: block;
    font-size: 10px;
    font-weight: 500;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.info-item p {
    font-size: 13px;
    color: #0f172a;
    margin: 0;
}

/* Admin List */
.admin-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.admin-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    background: #f8fafc;
    border-radius: 8px;
}
.admin-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-avatar {
    width: 32px;
    height: 32px;
    background: #eef2ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #4f46e5;
}
.admin-name {
    font-size: 13px;
    font-weight: 500;
    color: #0f172a;
}
.admin-email {
    font-size: 11px;
    color: #64748b;
}
.admin-remove {
    padding: 4px;
    color: #94a3b8;
    background: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}
.admin-remove:hover {
    color: #dc2626;
    background: #fee2e2;
}
.admin-remove svg {
    width: 14px;
    height: 14px;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.form-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 12px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
.form-card-subtitle {
    font-size: 11px;
    color: #64748b;
    margin: -8px 0 12px 0;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.full-width {
    grid-column: span 2;
}
.form-label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 4px;
}
.form-label .required {
    color: #ef4444;
}
.form-input {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}
.form-input:focus {
    border-color: #4f46e5;
}
.form-input.error {
    border-color: #ef4444;
}
.form-textarea {
    padding: 8px 10px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    outline: none;
    resize: vertical;
    min-height: 60px;
    transition: border-color 0.2s;
}
.form-textarea:focus {
    border-color: #4f46e5;
}
.form-error {
    font-size: 11px;
    color: #ef4444;
    margin-top: 2px;
}
.form-helper {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}
.checkbox-input {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    accent-color: #4f46e5;
}
.checkbox-label {
    font-size: 13px;
    color: #374151;
}
.checkbox-helper {
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal-header {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}
.modal-body {
    padding: 16px;
}
.modal-footer {
    padding: 12px 16px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .filter-form {
        flex-direction: column;
    }
    .filter-input-wrap {
        width: 100%;
    }
    .data-table {
        font-size: 12px;
    }
    .data-table th,
    .data-table td {
        padding: 8px 10px;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .header-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.full-width {
        grid-column: span 1;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-actions a,
    .form-actions button {
        width: 100%;
        text-align: center;
    }
}
