/* Application layout overrides. Keep vendor Bootstrap/Beyond files intact. */
body.app-shell { font-family: Arial, Helvetica, sans-serif; color: #334155; }
.app-shell.is-login { margin: 0; background: #f3f6fa; }
.app-shell.is-login #login { position: relative; top: auto !important; left: auto; transform: none; width: calc(100% - 32px); max-width: 400px; min-width: 0; height: auto; margin: clamp(50px, 17vh, 180px) auto 60px; box-sizing: border-box; border: 0; box-shadow: 0 12px 40px #1e293b18; }
.app-shell.is-login #login .inner { min-height: 0; border-color: #e2e8f0; }
.app-shell.is-login #login .logo { position: relative; left: auto; top: auto !important; margin: 30px auto 8px; max-width: 207px; width: auto; height: auto; }
.app-shell.is-login #login .formLogin { left: 0 !important; height: auto; padding: 18px 0 20px; box-sizing: border-box; }
.app-shell.is-login #login img { max-width: 100%; height: auto; }
.app-shell.is-login #login, .app-shell.is-login #login .logo, .app-shell.is-login #login .formLogin { opacity: 1; }
.app-shell.is-login #login .shadow { display: none; }
.app-shell .page-body { padding: 22px; background: #f3f6fa; min-width: 0; }
.app-shell .page-content { min-width: 0; }
.app-shell .page-header { height: auto; min-height: 56px; padding: 0 120px 0 20px; }
.app-shell .page-header .header-title { padding: 15px 0; display: block !important; }
.app-shell .page-header .header-title h1 { font: 600 17px/1.5 Arial, sans-serif; color: #334155; white-space: normal; }
.app-shell .widget { border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 2px 8px #14243b08; overflow: visible; }
.app-shell .widget > .widget-header { border-radius: 10px 10px 0 0; box-shadow: none; }
.app-shell .widget > .widget-body { border-radius: 0 0 10px 10px; box-shadow: none; padding: 16px; }
.app-shell .widget-body.no-padding { padding: 0; }
.app-shell .widget-header .widget-caption { max-width: 100%; height: auto; white-space: normal; }
.app-shell .table-toolbar { margin-bottom: 16px; line-height: 1.6; }
.app-shell .table-toolbar .form-group { margin-bottom: 10px; }
.app-shell .form-control { border-radius: 6px !important; min-height: 38px; }
.app-shell textarea.form-control { min-height: 110px; resize: vertical; }
.app-shell .form-horizontal .control-label { line-height: 1.5; }
.app-shell .btn { border-radius: 6px; min-height: 36px; }
.app-shell .select2-container { max-width: 100%; }
.app-shell .note-editor { max-width: 100%; }
.app-shell .app-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid #e2e8f0; border-radius: 8px; }
.app-shell .app-table-scroll > table { min-width: 680px; margin-bottom: 0 !important; border: 0; }
.app-shell .app-table-scroll th { background: #f1f5f9; font-weight: 600; color: #475569; }
.app-shell .app-table-scroll td, .app-shell .app-table-scroll th { vertical-align: middle; padding: 10px; line-height: 1.5; }
.app-shell .app-table-scroll td:first-child { overflow-wrap: anywhere; }
.app-table-hint { margin: 8px 0; color: #64748b; font-size: 12px; }
.app-shell .dataTables_wrapper .row { margin-left: 0; margin-right: 0; }
.app-shell .dataTables_filter input { max-width: 100%; }
.app-shell .pagination { display: flex; flex-wrap: wrap; gap: 3px; }
/* Universal Modern Stat Cards for all modules */
.app-shell .databox {
    display: flex !important;
    align-items: center !important;
    height: auto !important;
    min-height: 84px !important;
    padding: 16px 20px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 14px !important;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04) !important;
    margin-bottom: 18px !important;
    overflow: hidden !important;
    transition: transform .15s ease, box-shadow .15s ease !important;
}
.app-shell .databox:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08) !important;
}
.app-shell .databox .databox-left {
    flex: 0 0 52px !important;
    width: 52px !important;
    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 16px 0 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    border: 1px solid transparent !important;
}
/* Pastel backgrounds for all Beyond Admin stat colors */
.app-shell .databox .databox-left.bg-sky {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border-color: #bae6fd !important;
}
.app-shell .databox .databox-left.bg-palegreen {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border-color: #a7f3d0 !important;
}
.app-shell .databox .databox-left.bg-pink {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border-color: #fecdd3 !important;
}
.app-shell .databox .databox-left.bg-darkorange {
    background: #fff7ed !important;
    color: #ea580c !important;
    border-color: #ffedd5 !important;
}
.app-shell .databox .databox-left.bg-blueberry {
    background: #eff6ff !important;
    color: #2563eb !important;
    border-color: #dbeafe !important;
}
.app-shell .databox .databox-left.bg-magenta {
    background: #fdf2f8 !important;
    color: #db2777 !important;
    border-color: #fce7f3 !important;
}
.app-shell .databox .databox-left.bg-orange {
    background: #fffbeb !important;
    color: #d97706 !important;
    border-color: #fef3c7 !important;
}
.app-shell .databox .databox-left.bg-blue {
    background: #f0fdfa !important;
    color: #0d9488 !important;
    border-color: #ccfbf1 !important;
}
.app-shell .databox .databox-icon {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    text-align: center !important;
}
.app-shell .databox .databox-icon > i,
.app-shell .databox .databox-icon > .fa,
.app-shell .databox .databox-icon > .glyphicon {
    font-size: 22px !important;
    line-height: 1 !important;
    color: inherit !important;
    margin: 0 !important;
    position: static !important;
}
.app-shell .databox .databox-icon > i:before,
.app-shell .databox .databox-icon > .fa:before,
.app-shell .databox .databox-icon > .glyphicon:before {
    font-size: 22px !important;
    line-height: 1 !important;
}
.app-shell .databox .databox-right {
    flex: 1 !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
}
.app-shell .databox .databox-text {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    line-height: 1.3 !important;
    margin: 0 0 4px 0 !important;
    text-transform: none !important;
}
.app-shell .databox .databox-number {
    font-size: 26px !important;
    font-weight: 700 !important;
    line-height: 1.1 !important;
    margin: 0 !important;
    display: block !important;
    white-space: nowrap !important;
}
.app-shell .databox .databox-number.sky { color: #0284c7 !important; }
.app-shell .databox .databox-number.palegreen { color: #059669 !important; }
.app-shell .databox .databox-number.pink { color: #e11d48 !important; }
.app-shell .databox .databox-number.darkorange { color: #ea580c !important; }
.app-shell .databox .databox-number.blueberry { color: #2563eb !important; }
.app-shell .databox .databox-number.magenta { color: #db2777 !important; }
.app-shell .databox .databox-number.orange { color: #d97706 !important; }

/* Universal Toolbars across all modules */
.app-shell .table-toolbar {
    margin-bottom: 18px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.app-shell .table-toolbar a.btn-default,
.app-shell .table-toolbar a#editabledatatable_new {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    background: #03b3b2 !important;
    color: #ffffff !important;
    border: 1px solid #03b3b2 !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    box-shadow: 0 2px 6px rgba(3, 179, 178, 0.25) !important;
    text-decoration: none !important;
    transition: all .15s ease !important;
}
.app-shell .table-toolbar a.btn-default:hover,
.app-shell .table-toolbar a#editabledatatable_new:hover {
    background: #029796 !important;
    border-color: #029796 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(3, 179, 178, 0.35) !important;
}
.app-shell .table-toolbar .form-control {
    height: 38px !important;
    min-height: 38px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    transition: border-color .15s, box-shadow .15s !important;
}
.app-shell .table-toolbar .form-control:focus {
    border-color: #03b3b2 !important;
    box-shadow: 0 0 0 3px rgba(3, 179, 178, 0.15) !important;
}
.app-shell .table-toolbar .select2-container {
    min-width: 200px;
}
.app-shell .table-toolbar .select2-container .select2-choice {
    height: 38px !important;
    line-height: 36px !important;
    border-radius: 8px !important;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    padding-left: 12px !important;
    font-size: 13px !important;
}
.app-shell .table-toolbar .select2-container .select2-choice .select2-arrow {
    border-left: 0 !important;
    background: transparent !important;
    width: 26px !important;
}
.app-shell .table-toolbar button[type="submit"],
.app-shell .table-toolbar button.btn-default {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    height: 38px !important;
    min-height: 38px !important;
    padding: 0 16px !important;
    background: #1e293b !important;
    color: #ffffff !important;
    border: 1px solid #1e293b !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all .15s ease !important;
}
.app-shell .table-toolbar button[type="submit"]:hover,
.app-shell .table-toolbar button.btn-default:hover {
    background: #0f172a !important;
    border-color: #0f172a !important;
}

/* Universal Table Polish for all modules */
.app-shell table.table,
.app-shell table.dataTable {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    width: 100% !important;
    margin-bottom: 16px !important;
}
.app-shell table.table thead th,
.app-shell table.dataTable thead th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-size: 11.5px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    padding: 8px 10px !important;
    height: 38px !important;
    line-height: 1.3 !important;
    border-bottom: 2px solid #e2e8f0 !important;
    border-top: none !important;
    vertical-align: middle !important;
}
.app-shell table.table tbody td,
.app-shell table.dataTable tbody td {
    padding: 6px 10px !important;
    vertical-align: middle !important;
    border-top: 1px solid #f1f5f9 !important;
    border-left: 1px solid #f1f5f9 !important;
    color: #334155 !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
}
.app-shell table.table tbody td p,
.app-shell table.dataTable tbody td p,
.app-shell table.table tbody td label,
.app-shell table.dataTable tbody td label {
    margin: 0 !important;
}
/* Modern, Universal Checkbox Slider (Fixes detached knob/duplicate icon glitch across all tables) */
label:has(.checkbox-slider),
.status label,
.app-shell table.table td label:has(.checkbox-slider),
.app-shell table.dataTable td label:has(.checkbox-slider),
.app-shell table.table td.status label,
.app-shell table.dataTable td.status label {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    vertical-align: middle !important;
    position: relative !important;
    cursor: pointer !important;
}

input[type=checkbox].checkbox-slider {
    position: absolute !important;
    opacity: 0 !important;
    width: 50px !important;
    height: 24px !important;
    left: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    cursor: pointer !important;
    z-index: 10 !important;
}

input[type=checkbox].checkbox-slider ~ .text,
input[type=checkbox].checkbox-slider + .text {
    position: relative !important;
    display: inline-block !important;
    width: 50px !important;
    height: 24px !important;
    min-height: 24px !important;
    padding: 0 !important;
    padding-left: 0 !important;
    margin: 0 !important;
    vertical-align: middle !important;
    cursor: pointer !important;
}

/* Track */
input[type=checkbox].checkbox-slider ~ .text:before,
input[type=checkbox].checkbox-slider + .text:before {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 50px !important;
    height: 24px !important;
    line-height: 22px !important;
    border-radius: 999px !important;
    background-color: #f1f5f9 !important;
    border: 1.5px solid #cbd5e1 !important;
    color: #64748b !important;
    font-size: 10px !important;
    font-weight: 700 !important;
    font-family: inherit, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    content: "OFF" !important;
    text-align: right !important;
    padding-right: 7px !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
    margin: 0 !important;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease !important;
}

input[type=checkbox].checkbox-slider:checked ~ .text:before,
input[type=checkbox].checkbox-slider:checked + .text:before {
    background-color: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
    content: "ON" !important;
    text-align: left !important;
    padding-left: 8px !important;
    padding-right: 0 !important;
}

/* Sliding Knob */
input[type=checkbox].checkbox-slider ~ .text:after,
input[type=checkbox].checkbox-slider + .text:after {
    position: absolute !important;
    top: 3px !important;
    left: 3px !important;
    width: 18px !important;
    height: 18px !important;
    line-height: 18px !important;
    border-radius: 50% !important;
    background-color: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25) !important;
    transition: left .2s cubic-bezier(0.4, 0, 0.2, 1), transform .2s ease !important;
    display: inline-block !important;
    text-align: center !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    font-family: FontAwesome !important;
    font-size: 9px !important;
    color: #94a3b8 !important;
    content: "\f00d" !important;
}

input[type=checkbox].checkbox-slider:checked ~ .text:after,
input[type=checkbox].checkbox-slider:checked + .text:after {
    left: 29px !important;
    color: #0284c7 !important;
    content: "\f00c" !important;
}
.app-shell table.table tbody tr:hover,
.app-shell table.dataTable tbody tr:hover {
    background-color: #f8fafc !important;
}

/* Table Expand Row Toggle Button - Compact */
.app-shell .app-row-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
    min-height: 22px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 5px !important;
    background: #ffffff !important;
    color: #64748b !important;
    padding: 0 !important;
    cursor: pointer !important;
    outline: none !important;
    line-height: 1 !important;
    transition: all .15s ease !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}
.app-shell .app-row-toggle:hover {
    background: #03b3b2 !important;
    border-color: #03b3b2 !important;
    color: #ffffff !important;
    transform: scale(1.08) !important;
}
.app-shell .app-row-toggle .row-details {
    font-size: 11px !important;
    line-height: 1 !important;
}
.app-shell .app-row-toggle[aria-expanded="true"] {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    color: #ffffff !important;
}

/* Universal Action Buttons in tables - Compact */
.app-shell td.status,
.app-shell td.col-action {
    text-align: center !important;
    vertical-align: middle !important;
    white-space: nowrap !important;
    padding: 5px 6px !important;
}
.app-shell td.status a.btn,
.app-shell td.status a.btn-xs,
.app-shell td.col-action .btn-action,
.app-shell table.table tbody td .btn-xs,
.app-shell table.dataTable tbody td .btn-xs {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
    border-radius: 5px !important;
    margin: 0 2px !important;
    padding: 0 !important;
    border: 1px solid transparent !important;
    font-size: 11.5px !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: all .15s ease !important;
}
.app-shell td.status a.btn-info,
.app-shell td.status a.edit,
.app-shell td.col-action .btn-action-edit,
.app-shell table.table tbody td a.edit,
.app-shell table.dataTable tbody td a.edit {
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border-color: #bae6fd !important;
}
.app-shell td.status a.btn-info:hover,
.app-shell td.status a.edit:hover,
.app-shell td.col-action .btn-action-edit:hover,
.app-shell table.table tbody td a.edit:hover,
.app-shell table.dataTable tbody td a.edit:hover {
    color: #ffffff !important;
    background: #0284c7 !important;
    border-color: #0284c7 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}
.app-shell td.status a.btn-danger,
.app-shell td.status a.delete,
.app-shell td.col-action .btn-action-delete,
.app-shell table.table tbody td a.delete,
.app-shell table.dataTable tbody td a.delete {
    color: #dc2626 !important;
    background: #fef2f2 !important;
    border-color: #fecaca !important;
}
.app-shell td.status a.btn-danger:hover,
.app-shell td.status a.delete:hover,
.app-shell td.col-action .btn-action-delete:hover,
.app-shell table.table tbody td a.delete:hover,
.app-shell table.dataTable tbody td a.delete:hover {
    color: #ffffff !important;
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3) !important;
}

/* Prevent DataTables sorting arrow on toggle and action columns */
.app-shell table.dataTable thead th.col-toggle:after,
.app-shell table.dataTable thead th.col-action:after,
.app-shell table.dataTable thead th:last-child:empty:after,
.app-shell table.dataTable thead th.sorting_disabled:after {
    display: none !important;
    content: "" !important;
}
.app-shell table.dataTable thead th.col-toggle,
.app-shell table.dataTable tbody td.col-toggle,
.app-shell table.dataTable thead th:first-child:empty,
.app-shell table.dataTable tbody td:has(> .app-row-toggle) {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    text-align: center !important;
    vertical-align: middle !important;
    padding: 8px 4px !important;
}
.app-shell table.dataTable thead th.col-action,
.app-shell table.dataTable tbody td.col-action,
.app-shell table.dataTable thead th:last-child:empty,
.app-shell table.dataTable tbody td.status {
    width: 85px !important;
    min-width: 85px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

/* Universal Badges / Labels */
.app-shell .label {
    border-radius: 20px !important;
    padding: 4px 10px !important;
    font-weight: 600 !important;
    font-size: 12px !important;
    letter-spacing: 0.2px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}
.app-shell .label.label-success {
    background: #ecfdf5 !important;
    color: #059669 !important;
    border: 1px solid #a7f3d0 !important;
}
.app-shell .label.label-orange {
    background: #fff7ed !important;
    color: #ea580c !important;
    border: 1px solid #ffedd5 !important;
}
.app-shell .label.label-azure,
.app-shell .label.label-sky,
.app-shell .label.label-info {
    background: #e0f2fe !important;
    color: #0284c7 !important;
    border: 1px solid #bae6fd !important;
}
.app-shell .label.label-default {
    background: #f1f5f9 !important;
    color: #64748b !important;
    border: 1px solid #e2e8f0 !important;
}
.app-shell .label.label-yellow,
.app-shell .label.label-lightyellow {
    background: #fffbeb !important;
    color: #d97706 !important;
    border: 1px solid #fef3c7 !important;
}
.app-shell .label.label-pink {
    background: #fff1f2 !important;
    color: #e11d48 !important;
    border: 1px solid #fecdd3 !important;
}

/* Detail Row in expandable table */
.app-shell .app-table-detail-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 18px;
    margin: 6px 12px;
}
.app-shell .app-table-detail {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}
.app-shell .app-table-detail th {
    width: 130px;
    font-weight: 600;
    color: #475569;
    padding: 6px 10px 6px 0;
    font-size: 13px;
    border: 0 !important;
    background: transparent !important;
}
.app-shell .app-table-detail td {
    color: #0f172a;
    padding: 6px 0;
    font-size: 13px;
    border: 0 !important;
}
.app-shell .navbar .app-motto {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 235px;
    right: 560px;
    display: flex;
    align-items: center;
    padding: 0;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}
.app-shell .navbar .app-motto .app-motto-box {
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    padding: 5px 12px 5px 10px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
}
.app-shell .navbar .app-motto .app-motto-box:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}
.app-shell .navbar .app-motto .app-motto-box:active {
    transform: translateY(0);
}
.app-shell .navbar .app-motto .app-motto-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #fef08a 0%, #f59e0b 100%);
    color: #78350f;
    font-size: 11px;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.app-shell .navbar .app-motto .app-motto-text {
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: 0.15px;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.22s ease-in-out;
}
.app-shell .navbar .app-motto .app-motto-refresh {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    margin-left: 2px;
    flex-shrink: 0;
    transition: transform 0.4s ease, color 0.2s ease;
}
.app-shell .navbar .app-motto .app-motto-box:hover .app-motto-refresh {
    color: #ffffff;
    transform: rotate(180deg);
}
.app-nav-toggle { display: none; }
.app-nav-backdrop { display: none; }
.app-shell :focus-visible { outline: 3px solid #2175c7; outline-offset: 3px; }
@media (min-width: 881px) {
    .app-shell .navbar .navbar-brand { padding-left: 36px; }
    .app-shell .app-table-hint { display: none; }
}
@media (max-width: 1200px) {
    .app-shell .navbar .app-motto { display: none; }
}
@media (max-width: 880px) {
    .app-shell .navbar, .app-shell .navbar .navbar-inner { min-height: 56px; height: 56px; }
    .app-shell .navbar .navbar-header { height: 56px; }
    .app-shell .navbar .navbar-header.pull-right { position: absolute; top: 0; right: 8px; width: auto; height: 56px; }
    .app-shell .navbar .navbar-brand { margin-left: 50px; padding: 7px 8px; height: 56px; }
    .app-shell .navbar .navbar-brand img { max-height: 40px; width: auto; }
    .app-shell .navbar .navbar-container { padding: 0 8px; }
    .app-shell .navbar .navbar-account { position: static !important; height: 56px !important; width: auto !important; }
    .app-shell .navbar .navbar-account .account-area { position: static !important; height: 56px; width: auto !important; margin: 0; padding: 0; }
    .app-shell .navbar .navbar-account .account-area > li { display: none; }
    .app-shell .navbar .navbar-account .account-area > li:last-child { display: block; }
    .app-shell .navbar .navbar-account .account-area .login-area { height: 56px !important; padding-top: 12px; }
    .app-shell .navbar .navbar-account .setting, .app-shell .navbar .navbar-account .setting-container { display: none !important; }
    .app-shell .navbar .navbar-account .account-area .login-area .avatar { margin-right: 0; }
    .app-shell .navbar .navbar-account .account-area .login-area .avatar img { width: 30px; height: 30px; object-fit: cover; }
    .app-nav-toggle { display: flex; align-items: center; justify-content: center; position: absolute; z-index: 1210; left: 12px; top: 7px; width: 42px; height: 42px; border: 1px solid #ffffff70; background: #ffffff18; color: white; border-radius: 8px; font-size: 23px; cursor: pointer; }
    .app-shell #sidebar, .app-shell #sidebar.hide { display: block !important; position: fixed; top: 56px; left: 0; bottom: 0; width: 260px; transform: translateX(-105%); transition: transform .2s ease; background: white; z-index: 1200; overflow-y: auto; overscroll-behavior: contain; box-shadow: 8px 0 30px #14243b20; }
    .app-shell #sidebar::before { display: none; }
    .app-shell #sidebar .sidebar-menu { width: 100%; overflow: visible !important; }
    .app-shell #sidebar .sidebar-menu > li > a { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
    .app-shell.app-nav-open { overflow: hidden; }
    .app-shell.app-nav-open #sidebar { transform: translateX(0); }
    .app-shell.app-nav-open .app-nav-backdrop { display: block; position: fixed; inset: 56px 0 0; border: 0; background: #14243b66; z-index: 1190; }
    .app-shell .page-content, .app-shell #sidebar.hide ~ .page-content { margin-left: 0 !important; }
    .app-shell .page-header { min-height: 54px; padding: 0 54px 0 16px; }
    .app-shell .page-header .header-buttons { height: 54px; }
    .app-shell .page-header .header-buttons a { height: 54px; line-height: 54px; }
    .app-shell .page-header .header-buttons .fullscreen, .app-shell .page-header .header-buttons .sidebar-toggler { display: none; }
    .app-shell .page-body { padding: 16px; }
    .app-shell .page-header .header-title h1 { font-size: 15px; }
}
@media (max-width: 600px) {
    .app-shell .page-body { padding: 12px; }
    .app-shell .page-body > .row { margin-left: -6px; margin-right: -6px; }
    .app-shell .page-body > .row > [class*="col-"] { padding-left: 6px; padding-right: 6px; }
    .app-shell .widget > .widget-body { padding: 12px; }
    .app-shell .widget-body.no-padding { padding: 0; }
    /* Auto-hide empty databoxes (where text is empty or blank) */
    .app-shell .databox:has(.databox-number:empty) { display: none !important; }
    .app-shell .app-stat-cell:has(.databox-number:empty) { display: none !important; }

    .app-shell .app-stat-cell { width: 50% !important; padding-left: 4px !important; padding-right: 4px !important; }
    .app-shell .databox {
        display: flex !important;
        flex-direction: row !important;
        height: auto !important;
        min-height: 60px !important;
        margin-bottom: 8px !important;
        border-radius: 10px !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
        border: 1px solid #e2e8f0 !important;
        overflow: hidden !important;
        background: #ffffff !important;
    }
    .app-shell .databox .databox-left {
        flex-basis: 36px !important;
        width: 36px !important;
        min-width: 36px !important;
        min-height: 60px !important;
        padding: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    .app-shell .databox .databox-left .databox-icon { font-size: 16px !important; }
    .app-shell .databox .databox-right {
        width: calc(100% - 36px) !important;
        min-height: 60px !important;
        padding: 6px 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
    }
    .app-shell .databox .databox-number { font-size: 16px !important; font-weight: 700 !important; line-height: 1.2 !important; }
    .app-shell .databox .databox-text {
        font-size: 11px !important;
        line-height: 1.2 !important;
        margin-bottom: 2px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .app-shell .form-control, .app-shell .select2-container .select2-choice { font-size: 16px !important; }
    .app-shell .dataTables_length, .app-shell .dataTables_filter, .app-shell .dataTables_info, .app-shell .dataTables_paginate { text-align: left !important; float: none !important; margin: 8px 0; }
    .app-shell .comment .row { flex-wrap: wrap; }
    .app-shell .comment .row > div { max-width: 100%; }
    .app-shell.is-login #login .inner { box-sizing: border-box; }
    .app-shell.is-login #login .shadow { display: none; }

    /* Family module stat cards & actions */
    .family-stat-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        margin-bottom: 14px !important;
    }
    .family-stat-grid .databox { margin-bottom: 0 !important; }
    .family-actions-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 12px !important;
    }
    .family-search-form {
        display: flex !important;
        width: 100% !important;
        gap: 6px !important;
    }
    .family-search-input-wrap { flex: 1 !important; }
    .family-actions-group .btn-group {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
    }
    .family-actions-group .btn-group a.btn {
        flex: 1 !important;
        text-align: center !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 38px !important;
        font-size: 12px !important;
        border-radius: 8px !important;
    }
}

/* ==========================================================================
   MOBILE & RESPONSIVE DATA TABLE SYSTEM
   ========================================================================== */
.app-table-scroll,
.table-responsive {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    margin-bottom: 16px !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    background: #ffffff !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    position: relative !important;
}

@media (max-width: 991px) {
    .app-shell .app-table-scroll > table.table,
    .app-shell .table-responsive > table.table,
    .app-shell .widget-body > table.table {
        margin-bottom: 0 !important;
        min-width: 760px !important;
    }
}

@media (max-width: 768px) {
    .app-shell .app-table-scroll > table.table,
    .app-shell .table-responsive > table.table,
    .app-shell .widget-body > table.table {
        min-width: 820px !important;
    }
    
    .app-shell table.table th,
    .app-shell table.table td {
        padding: 9px 12px !important;
        font-size: 13px !important;
        line-height: 1.45 !important;
        vertical-align: middle !important;
    }
    
    .app-shell table.table th {
        font-weight: 700 !important;
        font-size: 12px !important;
        text-transform: uppercase !important;
        letter-spacing: 0.3px !important;
        background: #f8fafc !important;
        color: #475569 !important;
        white-space: nowrap !important;
    }

    .app-shell table.table td.date,
    .app-shell table.table th.date,
    .app-shell table.table .badge,
    .app-shell table.table .label,
    .app-shell table.table .status {
        white-space: nowrap !important;
    }

    .app-shell table.table .btn-xs,
    .app-shell table.table .btn-default,
    .app-shell table.table .btn-group .btn {
        min-height: 32px !important;
        min-width: 32px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
        margin: 2px !important;
    }
}

/* Enhanced Mobile Table Scroll Hint Badge */
.app-table-hint {
    display: none;
}
@media (max-width: 880px) {
    .app-table-hint:not([hidden]) {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        font-size: 11.5px !important;
        font-weight: 600 !important;
        color: #0284c7 !important;
        background: #f0f9ff !important;
        border: 1px dashed #7dd3fc !important;
        padding: 5px 12px !important;
        border-radius: 20px !important;
        margin: 0 0 10px 0 !important;
        animation: hintPulse 2.5s infinite;
    }
    @keyframes hintPulse {
        0%, 100% { transform: translateX(0); }
        50% { transform: translateX(3px); }
    }
}

/* ==========================================================================
   MOBILE TOOLBAR & FILTER FORMS
   ========================================================================== */
@media (max-width: 880px) {
    .app-shell .table-toolbar.app-list-toolbar,
    .app-shell .table-toolbar {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 14px !important;
        padding: 0 !important;
    }
    .app-shell .table-toolbar > [class*="col-"] {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .app-shell .table-toolbar .row {
        margin: 0 !important;
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        align-items: center !important;
    }
    
    .app-shell .table-toolbar #editabledatatable_new,
    .app-shell .table-toolbar a.btn,
    .app-shell .table-toolbar .btn-default,
    .app-shell .table-toolbar .btn-primary {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        min-height: 40px !important;
        padding: 8px 18px !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
        background: #0ea5e9 !important;
        color: #ffffff !important;
        border: none !important;
        box-shadow: 0 2px 6px rgba(14, 165, 233, 0.28) !important;
    }
    .app-shell .table-toolbar a.btn:active,
    .app-shell .table-toolbar #editabledatatable_new:active {
        transform: translateY(1px) !important;
    }

    .app-shell .table-toolbar form.app-filter-form,
    .app-shell .table-toolbar form[name="search"] {
        display: flex !important;
        width: 100% !important;
        gap: 8px !important;
        align-items: center !important;
        margin: 0 !important;
    }
    .app-shell .table-toolbar form [class*="col-"] {
        width: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    .app-shell .table-toolbar form [class*="col-"]:first-child,
    .app-shell .table-toolbar form .form-group {
        flex: 1 !important;
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    .app-shell .table-toolbar form .form-control {
        height: 40px !important;
        border-radius: 8px !important;
        font-size: 14px !important;
        border: 1px solid #cbd5e1 !important;
        padding: 8px 12px !important;
        width: 100% !important;
    }
    .app-shell .table-toolbar form button[type="submit"] {
        height: 40px !important;
        min-width: 65px !important;
        border-radius: 8px !important;
        font-size: 13.5px !important;
        font-weight: 600 !important;
        background: #1e293b !important;
        color: #ffffff !important;
        border: none !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* Mobile Form Usability */
    .app-shell .form-horizontal .form-group {
        margin-left: 0 !important;
        margin-right: 0 !important;
        margin-bottom: 14px !important;
    }
    .app-shell .form-horizontal .control-label {
        text-align: left !important;
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-bottom: 4px !important;
        font-weight: 600 !important;
        font-size: 13px !important;
        color: #334155 !important;
    }
    .app-shell .form-horizontal [class*="col-sm-"] {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    .app-shell .btn-submit,
    .app-shell form button[type="submit"] {
        min-height: 44px !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        border-radius: 8px !important;
    }

    /* Pagination on Mobile */
    .app-shell .pagination {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 4px !important;
        justify-content: center !important;
        margin: 14px 0 !important;
    }
    .app-shell .pagination > li > a,
    .app-shell .pagination > li > span {
        padding: 6px 12px !important;
        font-size: 13px !important;
        min-height: 36px !important;
        min-width: 36px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 6px !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    .app-shell #sidebar { transition: none; }
    .app-shell .bg-flashing { animation: none; }
}

/* ==========================================================================
   Host & Domain Module Custom Styles (.host-*)
   ========================================================================== */
.host-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.host-stat-grid .databox {
    margin-bottom: 0 !important;
}
@media (max-width: 1200px) {
    .host-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
@media (max-width: 768px) {
    .host-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 480px) {
    .host-stat-grid {
        grid-template-columns: 1fr;
    }
}

/* Rate Notice Banner */
.host-notice-banner {
    display: flex;
    align-items: center;
    background: #f0fdfa;
    border: 1px solid #ccfbf1;
    border-radius: 10px;
    padding: 10px 16px;
    margin-bottom: 16px;
    color: #0f766e;
    font-size: 13px;
    line-height: 1.5;
}
.host-notice-banner i {
    font-size: 16px;
    margin-right: 10px;
    color: #0d9488;
    flex-shrink: 0;
}
.host-notice-banner code {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* Toolbar */
.host-toolbar {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: wrap !important;
    gap: 12px !important;
    margin-bottom: 16px !important;
    padding-bottom: 14px !important;
    border-bottom: 1px solid #f1f5f9 !important;
}
.host-toolbar-left {
    display: flex;
    align-items: center;
}
.host-toolbar-right {
    display: flex;
    align-items: center;
}
.host-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
}
.host-search-input-wrap {
    position: relative;
    width: 280px;
}
.host-search-input-wrap .form-control {
    height: 38px !important;
    border-radius: 8px !important;
    padding-left: 14px !important;
    padding-right: 34px !important;
    border: 1px solid #cbd5e1 !important;
    font-size: 13px !important;
}
.host-search-input-wrap .form-control:focus {
    border-color: #03b3b2 !important;
    box-shadow: 0 0 0 3px rgba(3, 179, 178, 0.15) !important;
}
.host-search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
}
.host-btn-add {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    height: 38px !important;
    padding: 0 16px !important;
    background: #03b3b2 !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #03b3b2 !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(3, 179, 178, 0.25) !important;
    transition: all .15s ease !important;
}
.host-btn-add:hover {
    background: #029796 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 10px rgba(3, 179, 178, 0.35) !important;
    color: #ffffff !important;
}
.host-btn-search {
    display: inline-flex !important;
    align-items: center !important;
    height: 38px !important;
    padding: 0 16px !important;
    background: #1e293b !important;
    color: #ffffff !important;
    border-radius: 8px !important;
    border: 1px solid #1e293b !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    transition: all .15s ease !important;
}
.host-btn-search:hover {
    background: #0f172a !important;
    color: #ffffff !important;
}
.host-btn-reset {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 38px !important;
    height: 38px !important;
    padding: 0 !important;
    background: #f1f5f9 !important;
    color: #64748b !important;
    border-radius: 8px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 14px !important;
}
.host-btn-reset:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

/* Service Cell */
.host-service-cell {
    vertical-align: middle !important;
}
.host-service-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}
.host-service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    min-width: 24px;
    border-radius: 6px;
    font-size: 12px;
}
.host-icon-domain { background: #eff6ff; color: #2563eb; }
.host-icon-host { background: #f0fdf4; color: #16a34a; }
.host-icon-vps { background: #f5f3ff; color: #7c3aed; }
.host-icon-ssl { background: #fffbeb; color: #d97706; }
.host-icon-mail { background: #fdf2f8; color: #db2777; }

.host-service-names {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.host-main-domain {
    font-size: 12.5px;
    font-weight: 600;
    color: #0f172a !important;
    text-decoration: none !important;
    word-break: break-all;
    transition: color .15s;
    line-height: 1.25;
}
.host-main-domain:hover {
    color: #03b3b2 !important;
    text-decoration: underline !important;
}
.host-email-sub {
    font-size: 10.5px;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    line-height: 1.2;
}
.host-alias-badge {
    display: inline-block;
    padding: 1px 5px;
    font-size: 9.5px;
    font-weight: 600;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    margin-right: 3px;
}

/* Expiry / End Date column */
.host-end-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.host-end-date {
    font-size: 12px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.2;
}
.host-diff-badge {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10.5px;
    font-weight: 600;
    border-radius: 9999px;
    width: fit-content;
    line-height: 1.2;
}
.host-diff-expired { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.host-diff-danger { background: #fff1f2; color: #e11d48; border: 1px solid #fecdd3; }
.host-diff-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.host-diff-safe { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.host-diff-inactive { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* Price Column */
.host-price-cell {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.host-price-total {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.host-price-breakdown {
    font-size: 11px;
    color: #64748b;
}

/* Provider / Specs Column */
.host-ncc-cell {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.host-ncc-tag {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
}
.host-storage-text {
    font-size: 12px;
    color: #334155;
    margin-left: 4px;
}
.host-start-date {
    font-size: 11px;
    color: #94a3b8;
}

/* Expiring Highlight Rows */
tr.host-expiring-row,
table.dataTable tbody tr.host-expiring-row {
    background-color: #fff9f5 !important;
}
tr.host-expiring-row td:first-child,
table.dataTable tbody tr.host-expiring-row td:first-child {
    border-left: 3px solid #f97316 !important;
}
.host-exp-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    background: #ea580c;
    color: #ffffff;
    margin-bottom: 4px;
}

/* ==========================================================================
   Family & Memorial Module Custom Styles (.family-*)
   ========================================================================== */
.family-hero-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.family-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
@media (max-width: 992px) {
    .family-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 576px) {
    .family-stat-grid {
        grid-template-columns: 1fr;
    }
}

.family-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.family-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.family-stat-card.card-gio { border-left: 4px solid #b45309; }
.family-stat-card.card-sn { border-left: 4px solid #0284c7; }
.family-stat-card.card-urgent { border-left: 4px solid #ea580c; background: #fffaf5; }
.family-stat-card.card-today { border-left: 4px solid #059669; }

.family-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.card-gio .family-stat-icon { background: #fef3c7; color: #b45309; }
.card-sn .family-stat-icon { background: #e0f2fe; color: #0284c7; }
.card-urgent .family-stat-icon { background: #ffedd5; color: #ea580c; }
.card-today .family-stat-icon { background: #d1fae5; color: #059669; }

.family-stat-info {
    flex: 1;
    min-width: 0;
}
.family-stat-num {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
}
.family-stat-label {
    font-size: 12px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-top: 2px;
}
.family-stat-sub {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Upcoming notification banner */
.family-alert-card {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 20px;
}
.family-alert-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
}
.family-alert-body {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.family-alert-item {
    background: #ffffff;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.family-alert-item.is-today {
    border-color: #ef4444;
    background: #fef2f2;
}
.family-alert-countdown {
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
}
.family-alert-countdown.c-today { background: #fee2e2; color: #dc2626; }
.family-alert-countdown.c-urgent { background: #ffedd5; color: #c2410c; }
.family-alert-countdown.c-soon { background: #e0f2fe; color: #0369a1; }

/* Tabs */
.family-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 20px;
    padding-bottom: 0;
}
.family-tab-btn {
    border: none;
    background: transparent;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    border-radius: 8px 8px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    position: relative;
    bottom: -2px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}
.family-tab-btn:hover {
    color: #0f172a;
    background: #f8fafc;
}
.family-tab-btn.active {
    color: #0284c7;
    border-bottom-color: #0284c7;
    background: #ffffff;
    font-weight: 700;
}
.family-tab-badge {
    display: inline-block;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #475569;
}
.family-tab-btn.active .family-tab-badge {
    background: #e0f2fe;
    color: #0284c7;
}

/* Event Badges & Cells */
.family-countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 9999px;
    white-space: nowrap;
}
.family-countdown-badge.today {
    background: #ef4444;
    color: #ffffff;
    animation: familyPulse 1.5s infinite;
}
.family-countdown-badge.urgent {
    background: #ea580c;
    color: #ffffff;
}
.family-countdown-badge.soon {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.family-countdown-badge.normal {
    background: #f1f5f9;
    color: #475569;
}

@keyframes familyPulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.6); }
    70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.family-lunar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
}
.family-solar-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 7px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    background: #e0f2fe;
    color: #0369a1;
}

.family-event-title {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}
.family-rel-tag {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
}
.family-loc-text {
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.family-note-text {
    font-size: 11px;
    color: #64748b;
    background: #f8fafc;
    border-left: 2px solid #cbd5e1;
    padding: 3px 6px;
    margin-top: 4px;
    border-radius: 2px;
}

/* Form Type Selector */
.family-type-selector {
    display: flex;
    gap: 16px;
}
.family-type-option {
    cursor: pointer;
    position: relative;
    padding-left: 0 !important;
    margin-right: 0 !important;
    flex: 1;
}
.family-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.family-type-card {
    display: flex;
    flex-direction: column;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    transition: all 0.2s ease;
}
.family-type-card i {
    font-size: 22px;
    margin-bottom: 6px;
}
.family-type-card.type-gio i { color: #b45309; }
.family-type-card.type-sn i { color: #0284c7; }
.family-type-card strong {
    font-size: 14px;
    color: #0f172a;
    margin-bottom: 2px;
}
.family-type-card small {
    font-size: 11px;
    color: #64748b;
}
.family-type-option input[type="radio"]:checked + .family-type-card {
    border-color: #0284c7;
    background: #f0f9ff;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.12);
}
.family-type-option input[type="radio"]:checked + .family-type-card.type-gio {
    border-color: #b45309;
    background: #fffbeb;
    box-shadow: 0 4px 12px rgba(180, 83, 9, 0.12);
}

.family-quick-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}
.family-quick-tags .tag-rel {
    cursor: pointer;
    font-size: 11px;
    border-radius: 4px;
}
.family-quick-tags .tag-rel:hover {
    background: #e0f2fe;
    border-color: #7dd3fc;
    color: #0284c7;
}

/* Upcoming Banner */
.family-upcoming-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 1px solid #fed7aa;
    border-left: 4px solid #ea580c;
    border-radius: 8px;
    padding: 10px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(234, 88, 12, 0.08);
}
.family-upcoming-icon {
    font-size: 20px;
    color: #ea580c;
    flex-shrink: 0;
}
.family-upcoming-text {
    font-size: 13px;
    color: #7c2d12;
    line-height: 1.5;
}
.family-upcoming-title {
    font-weight: 700;
    color: #9a3412;
}
.family-pill-urgent {
    display: inline-block;
    background: #ea580c;
    color: #ffffff;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 9999px;
    font-size: 11px;
}

/* Toolbar & Navigation */
.family-nav-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 16px;
}
.family-nav-toolbar .family-tabs {
    border-bottom: none;
    margin-bottom: 0;
}
.family-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.family-search-form {
    display: flex;
    align-items: center;
    gap: 6px;
}
.family-search-input-wrap {
    position: relative;
}
.family-search-input {
    height: 32px !important;
    padding: 4px 10px 4px 28px !important;
    font-size: 12px !important;
    border-radius: 6px !important;
    border: 1px solid #cbd5e1 !important;
    width: 220px;
}
.family-search-icon {
    position: absolute;
    left: 9px;
    top: 9px;
    font-size: 12px;
    color: #94a3b8;
}
.family-btn-search {
    height: 32px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: #0284c7;
    color: #ffffff;
    border: none;
}
.family-btn-search:hover {
    background: #0369a1;
    color: #ffffff;
}
.family-btn-reset {
    height: 32px;
    padding: 0 10px;
    font-size: 12px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}
.family-btn-add {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: #ea580c;
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.family-btn-add:hover {
    background: #c2410c;
    color: #ffffff;
}
.family-btn-add-sn {
    height: 32px;
    padding: 0 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    background: #0284c7;
    color: #ffffff;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.family-btn-add-sn:hover {
    background: #0369a1;
    color: #ffffff;
}

/* Tab header & descriptions */
.family-tab-header {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
}
.family-tab-desc {
    font-size: 12px;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Empty State */
.family-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px dashed #cbd5e1;
    margin: 20px 0;
}
.family-empty-icon {
    font-size: 40px;
    color: #94a3b8;
    margin-bottom: 12px;
}
.family-empty-state h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 6px;
}
.family-empty-state p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 16px;
}

/* Table Enhancements */
.family-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.family-table th {
    background: #f8fafc !important;
    color: #475569 !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border-bottom: 2px solid #e2e8f0 !important;
    padding: 10px 12px !important;
}
.family-table td {
    padding: 9px 12px !important;
    font-size: 13px !important;
    vertical-align: middle !important;
    border-color: #f1f5f9 !important;
}
.family-table tr.family-row-highlight {
    background-color: #fffaf5 !important;
}
.family-table tr.family-row-highlight td:first-child {
    border-left: 3px solid #ea580c !important;
}

.family-name-cell {
    display: flex;
    align-items: center;
    gap: 10px;
}
.family-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}
.family-icon-gio { background: #fef3c7; color: #b45309; }
.family-icon-sn { background: #e0f2fe; color: #0284c7; }
.family-icon-le { background: #fef9c3; color: #a16207; }

.family-name-text strong {
    font-size: 13px;
    color: #0f172a;
    display: block;
    line-height: 1.3;
}
.family-relation-pill {
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    background: #f1f5f9;
    color: #475569;
    margin-top: 2px;
}
.family-solar-wrap {
    display: flex;
    flex-direction: column;
}
.family-solar-date {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
}
.family-badge-today {
    background: #dc2626 !important;
    color: #ffffff !important;
    font-weight: 700;
}
.family-badge-urgent {
    background: #ea580c !important;
    color: #ffffff !important;
    font-weight: 700;
}
.family-badge-warning {
    background: #fef3c7 !important;
    color: #b45309 !important;
    border: 1px solid #fde68a;
    font-weight: 700;
}
.family-badge-normal {
    background: #f1f5f9 !important;
    color: #475569 !important;
}
.family-location-text {
    font-size: 12px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 4px;
}
.family-note-preview {
    font-size: 12px;
    color: #64748b;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.family-dow-badge {
    display: inline-block;
    padding: 1px 7px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 4px;
    background: #e2e8f0;
    color: #334155;
    margin-bottom: 2px;
    white-space: nowrap;
}
.family-dow-badge.is-weekend {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
}





