/**
 * ImmigraSuite Admin - Agreement Templates
 * Agreement template preview, sections, fee tables, signatures, schedules
 */

/* ==========================================================================
   Agreement Preview Container
   ========================================================================== */

.is-agreement-preview {
    background-color: white;
    border-radius: 12px;
    max-height: 70vh;
    overflow-y: auto;
}

.dark .is-agreement-preview {
    background-color: rgb(31 41 55);
}

/* ==========================================================================
   Agreement Preview Header
   ========================================================================== */

.is-agreement-header {
    padding: 24px;
    margin-bottom: 24px;
    border-bottom: 2px solid rgb(229 231 235);
    background: linear-gradient(to right, rgb(249 250 251), rgb(243 244 246));
    border-radius: 12px 12px 0 0;
}

.dark .is-agreement-header {
    background: linear-gradient(to right, rgb(55 65 81), rgb(75 85 99));
    border-bottom-color: rgb(75 85 99);
}

.is-agreement-title {
    font-size: 24px;
    font-weight: 700;
    color: rgb(17 24 39);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.dark .is-agreement-title {
    color: rgb(243 244 246);
}

.is-agreement-description {
    font-size: 14px;
    color: rgb(107 114 128);
    margin: 0 0 16px 0;
}

.dark .is-agreement-description {
    color: rgb(156 163 175);
}

.is-agreement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.is-agreement-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: rgb(75 85 99);
}

.dark .is-agreement-meta-item {
    color: rgb(209 213 219);
}

.is-agreement-meta-label {
    font-weight: 600;
    color: rgb(55 65 81);
}

.dark .is-agreement-meta-label {
    color: rgb(229 231 235);
}

.is-agreement-meta-value {
    color: rgb(107 114 128);
}

.dark .is-agreement-meta-value {
    color: rgb(156 163 175);
}

.is-agreement-meta-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 500;
    background-color: rgb(59 130 246);
    color: white;
}

.is-agreement-meta-badge-success {
    background-color: rgb(34 197 94);
}

.is-agreement-meta-badge-warning {
    background-color: rgb(234 179 8);
}

/* ==========================================================================
   Agreement Section Card
   ========================================================================== */

.is-agreement-section {
    margin-bottom: 24px;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 12px;
}

.dark .is-agreement-section {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.is-agreement-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background-color: rgb(249 250 251);
    border-bottom: 1px solid rgb(229 231 235);
}

.dark .is-agreement-section-header {
    background-color: rgb(55 65 81);
    border-bottom-color: rgb(75 85 99);
}

.is-agreement-section-title {
    font-size: 16px;
    font-weight: 600;
    color: rgb(17 24 39);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dark .is-agreement-section-title {
    color: rgb(243 244 246);
}

.is-agreement-section-title-icon {
    width: 20px;
    height: 20px;
    color: rgb(107 114 128);
}

.dark .is-agreement-section-title-icon {
    color: rgb(156 163 175);
}

.is-agreement-section-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.is-agreement-section-badge-cover {
    background-color: rgb(219 234 254);
    color: rgb(29 78 216);
}

.dark .is-agreement-section-badge-cover {
    background-color: rgba(29, 78, 216, 0.2);
    color: rgb(147 197 253);
}

.is-agreement-section-badge-service {
    background-color: rgb(220 252 231);
    color: rgb(22 101 52);
}

.dark .is-agreement-section-badge-service {
    background-color: rgba(22, 163, 74, 0.2);
    color: rgb(134 239 172);
}

.is-agreement-section-badge-fees {
    background-color: rgb(254 243 199);
    color: rgb(161 98 7);
}

.dark .is-agreement-section-badge-fees {
    background-color: rgba(234, 179, 8, 0.2);
    color: rgb(253 224 71);
}

.is-agreement-section-badge-acknowledgement {
    background-color: rgb(237 233 254);
    color: rgb(91 33 182);
}

.dark .is-agreement-section-badge-acknowledgement {
    background-color: rgba(139, 92, 246, 0.2);
    color: rgb(196 181 253);
}

.is-agreement-section-badge-signature {
    background-color: rgb(254 226 226);
    color: rgb(153 27 27);
}

.dark .is-agreement-section-badge-signature {
    background-color: rgba(239, 68, 68, 0.2);
    color: rgb(252 165 165);
}

.is-agreement-section-badge-schedule {
    background-color: rgb(209 250 229);
    color: rgb(4 120 87);
}

.dark .is-agreement-section-badge-schedule {
    background-color: rgba(16, 185, 129, 0.2);
    color: rgb(110 231 183);
}

.is-agreement-section-badge-custom {
    background-color: rgb(243 244 246);
    color: rgb(55 65 81);
}

.dark .is-agreement-section-badge-custom {
    background-color: rgb(75 85 99);
    color: rgb(209 213 219);
}

.is-agreement-section-body {
    padding: 20px;
}

.is-agreement-section-content {
    font-size: 14px;
    line-height: 1.7;
    color: rgb(55 65 81);
}

.dark .is-agreement-section-content {
    color: rgb(209 213 219);
}

.is-agreement-section-content h1,
.is-agreement-section-content h2,
.is-agreement-section-content h3,
.is-agreement-section-content h4,
.is-agreement-section-content h5,
.is-agreement-section-content h6 {
    color: rgb(17 24 39);
    margin-top: 16px;
    margin-bottom: 8px;
    font-weight: 600;
}

.dark .is-agreement-section-content h1,
.dark .is-agreement-section-content h2,
.dark .is-agreement-section-content h3,
.dark .is-agreement-section-content h4,
.dark .is-agreement-section-content h5,
.dark .is-agreement-section-content h6 {
    color: rgb(243 244 246);
}

.is-agreement-section-content ul,
.is-agreement-section-content ol {
    padding-left: 24px;
    margin: 12px 0;
}

.is-agreement-section-content li {
    margin-bottom: 6px;
}

.is-agreement-section-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

.is-agreement-section-content table th,
.is-agreement-section-content table td {
    padding: 10px 12px;
    border: 1px solid rgb(229 231 235);
    text-align: left;
}

.dark .is-agreement-section-content table th,
.dark .is-agreement-section-content table td {
    border-color: rgb(55 65 81);
}

.is-agreement-section-content table th {
    background-color: rgb(249 250 251);
    font-weight: 600;
}

.dark .is-agreement-section-content table th {
    background-color: rgb(55 65 81);
}

/* ==========================================================================
   Fee Items Notice
   ========================================================================== */

.is-agreement-fee-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 16px;
    background-color: rgb(254 243 199);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: rgb(161 98 7);
}

.dark .is-agreement-fee-notice {
    background-color: rgba(234, 179, 8, 0.2);
    color: rgb(253 224 71);
}

.is-agreement-fee-notice-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.is-agreement-empty {
    padding: 32px 24px;
    text-align: center;
    background-color: rgb(254 249 195);
    border-radius: 12px;
    margin-bottom: 24px;
}

.dark .is-agreement-empty {
    background-color: rgba(234, 179, 8, 0.15);
}

.is-agreement-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: rgb(161 98 7);
}

.dark .is-agreement-empty-icon {
    color: rgb(253 224 71);
}

.is-agreement-empty-text {
    font-size: 15px;
    color: rgb(133 77 14);
    margin: 0;
}

.dark .is-agreement-empty-text {
    color: rgb(250 204 21);
}

/* ==========================================================================
   Payment Structure Table
   ========================================================================== */

.is-agreement-payments {
    margin-bottom: 24px;
}

.is-agreement-payments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-agreement-payments-header {
    color: rgb(243 244 246);
}

.is-agreement-payments-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgb(59 130 246);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.is-agreement-payments-table {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 8px;
    overflow: hidden;
}

.dark .is-agreement-payments-table {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.is-agreement-payments-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    background-color: rgb(249 250 251);
    border-bottom: 2px solid rgb(229 231 235);
    text-align: left;
}

.dark .is-agreement-payments-table th {
    color: rgb(156 163 175);
    background-color: rgb(55 65 81);
    border-bottom-color: rgb(75 85 99);
}

.is-agreement-payments-table th:last-child {
    text-align: left;
}

.is-agreement-payments-table th.is-text-right {
    text-align: right;
}

.is-agreement-payments-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: rgb(55 65 81);
    border-bottom: 1px solid rgb(229 231 235);
}

.dark .is-agreement-payments-table td {
    color: rgb(209 213 219);
    border-bottom-color: rgb(55 65 81);
}

.is-agreement-payments-table tr:last-child td {
    border-bottom: none;
}

.is-agreement-payments-table tr:hover {
    background-color: rgb(249 250 251);
}

.dark .is-agreement-payments-table tr:hover {
    background-color: rgb(55 65 81);
}

.is-agreement-payments-number {
    width: 48px;
    text-align: center;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-agreement-payments-number {
    color: rgb(243 244 246);
}

.is-agreement-payments-label {
    font-weight: 500;
    color: rgb(17 24 39);
}

.dark .is-agreement-payments-label {
    color: rgb(243 244 246);
}

.is-agreement-payments-amount {
    text-align: right;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    color: rgb(22 163 74);
}

.dark .is-agreement-payments-amount {
    color: rgb(74 222 128);
}

.is-agreement-payments-due {
    font-size: 13px;
    color: rgb(107 114 128);
}

.dark .is-agreement-payments-due {
    color: rgb(156 163 175);
}

/* ==========================================================================
   Signature Blocks
   ========================================================================== */

.is-agreement-signatures {
    margin-bottom: 24px;
}

.is-agreement-signatures-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-agreement-signatures-header {
    color: rgb(243 244 246);
}

.is-agreement-signatures-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgb(139 92 246);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.is-agreement-signatures-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 16px;
}

@media (min-width: 640px) {
    .is-agreement-signatures-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .is-agreement-signatures-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.is-agreement-signature-card {
    padding: 16px;
    background-color: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
}

.dark .is-agreement-signature-card {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

.is-agreement-signature-label {
    font-size: 15px;
    font-weight: 600;
    color: rgb(17 24 39);
    margin-bottom: 4px;
}

.dark .is-agreement-signature-label {
    color: rgb(243 244 246);
}

.is-agreement-signature-type {
    font-size: 12px;
    color: rgb(107 114 128);
    margin-bottom: 12px;
}

.dark .is-agreement-signature-type {
    color: rgb(156 163 175);
}

.is-agreement-signature-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.is-agreement-signature-field {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background-color: rgb(229 231 235);
    color: rgb(55 65 81);
}

.dark .is-agreement-signature-field {
    background-color: rgb(75 85 99);
    color: rgb(209 213 219);
}

.is-agreement-signature-field-required {
    background-color: rgb(254 226 226);
    color: rgb(153 27 27);
}

.dark .is-agreement-signature-field-required {
    background-color: rgba(239, 68, 68, 0.2);
    color: rgb(252 165 165);
}

/* ==========================================================================
   Schedules
   ========================================================================== */

.is-agreement-schedules {
    margin-bottom: 24px;
}

.is-agreement-schedules-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-agreement-schedules-header {
    color: rgb(243 244 246);
}

.is-agreement-schedules-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: rgb(16 185 129);
    color: white;
    font-size: 12px;
    font-weight: 600;
}

.is-agreement-schedule-card {
    padding: 16px;
    margin-bottom: 12px;
    background-color: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
}

.dark .is-agreement-schedule-card {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

.is-agreement-schedule-card:last-child {
    margin-bottom: 0;
}

.is-agreement-schedule-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: rgb(17 24 39);
}

.dark .is-agreement-schedule-title {
    color: rgb(243 244 246);
}

.is-agreement-schedule-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    background-color: rgb(209 250 229);
    color: rgb(4 120 87);
}

.dark .is-agreement-schedule-code {
    background-color: rgba(16, 185, 129, 0.2);
    color: rgb(110 231 183);
}

.is-agreement-schedule-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    background-color: rgb(237 233 254);
    color: rgb(91 33 182);
}

.dark .is-agreement-schedule-badge {
    background-color: rgba(139, 92, 246, 0.2);
    color: rgb(196 181 253);
}

.is-agreement-schedule-content {
    margin-top: 12px;
    padding: 16px;
    background-color: rgb(249 250 251);
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.6;
    color: rgb(55 65 81);
}

.dark .is-agreement-schedule-content {
    background-color: rgb(55 65 81);
    color: rgb(209 213 219);
}

.is-agreement-schedule-content p {
    margin: 0 0 12px 0;
}

.is-agreement-schedule-content p:last-child {
    margin-bottom: 0;
}

.is-agreement-schedule-content ul,
.is-agreement-schedule-content ol {
    margin: 8px 0;
    padding-left: 20px;
}

.is-agreement-schedule-content li {
    margin-bottom: 4px;
}

.is-agreement-schedule-na {
    margin-top: 12px;
    padding: 12px 16px;
    background-color: rgb(254 249 195);
    border-radius: 6px;
    font-size: 13px;
    color: rgb(161 98 7);
}

.dark .is-agreement-schedule-na {
    background-color: rgba(234 179 8, 0.15);
    color: rgb(253 224 71);
}

/* ==========================================================================
   Preview Body Padding
   ========================================================================== */

.is-agreement-body {
    padding: 0 24px 24px;
}

/* ==========================================================================
   Embedded Fee Tables
   ========================================================================== */

.is-fee-table-wrapper {
    margin: 20px 0;
    background-color: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 8px;
    overflow: hidden;
}

.dark .is-fee-table-wrapper {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.is-fee-table {
    width: 100%;
    border-collapse: collapse;
}

.is-fee-table thead {
    background-color: rgb(59 130 246);
}

.dark .is-fee-table thead {
    background-color: rgb(37 99 235);
}

.is-fee-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: white;
    text-align: left;
}

.is-fee-table th.is-fee-table-amount {
    text-align: right;
    width: 140px;
}

.is-fee-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: rgb(55 65 81);
    border-bottom: 1px solid rgb(229 231 235);
    vertical-align: top;
}

.dark .is-fee-table td {
    color: rgb(209 213 219);
    border-bottom-color: rgb(55 65 81);
}

.is-fee-table td.is-fee-table-amount {
    text-align: right;
    font-weight: 600;
    font-family: ui-monospace, monospace;
    white-space: nowrap;
}

.is-fee-table tbody tr:hover {
    background-color: rgb(249 250 251);
}

.dark .is-fee-table tbody tr:hover {
    background-color: rgb(55 65 81);
}

.is-fee-table-note {
    font-size: 12px;
    color: rgb(107 114 128);
    font-style: italic;
    margin-top: 4px;
}

.dark .is-fee-table-note {
    color: rgb(156 163 175);
}

.is-fee-editable {
    color: rgb(37 99 235);
}

.dark .is-fee-editable {
    color: rgb(96 165 250);
}

.is-fee-table-subtotal {
    background-color: rgb(243 244 246);
    font-weight: 600;
}

.dark .is-fee-table-subtotal {
    background-color: rgb(55 65 81);
}

.is-fee-table-subtotal td {
    border-bottom: none;
    color: rgb(17 24 39);
}

.dark .is-fee-table-subtotal td {
    color: rgb(243 244 246);
}

.is-fee-table-subtotal td.is-fee-table-amount {
    color: rgb(22 163 74);
}

.dark .is-fee-table-subtotal td.is-fee-table-amount {
    color: rgb(74 222 128);
}

.is-fee-table-empty {
    padding: 16px;
    text-align: center;
    color: rgb(107 114 128);
    background-color: rgb(249 250 251);
    border-radius: 8px;
    margin: 16px 0;
}

.dark .is-fee-table-empty {
    color: rgb(156 163 175);
    background-color: rgb(55 65 81);
}

/* ==========================================================================
   Section Footer Note (Preview)
   ========================================================================== */

.is-section-footer-note {
    margin-top: 24px;
    padding: 12px 16px;
    font-size: 12px;
    line-height: 1.5;
    color: rgb(55 65 81);
    background-color: rgb(249 250 251);
    border: 1px solid rgb(209 213 219);
    border-radius: 6px;
}

.dark .is-section-footer-note {
    color: rgb(209 213 219);
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

.is-section-footer-note sup {
    font-size: 10px;
    font-weight: 600;
    color: rgb(37 99 235);
    margin-right: 4px;
}

.dark .is-section-footer-note sup {
    color: rgb(96 165 250);
}

/* ==========================================================================
   Fee Item Footnotes (Preview)
   ========================================================================== */

.is-footnote-ref {
    font-size: 10px;
    font-weight: 600;
    color: rgb(37 99 235);
    vertical-align: super;
    margin-left: 2px;
}

.dark .is-footnote-ref {
    color: rgb(96 165 250);
}

.is-fee-item-footnotes {
    margin-top: 20px;
    padding: 16px;
    background-color: rgb(249 250 251);
    border: 1px solid rgb(209 213 219);
    border-radius: 6px;
}

.dark .is-fee-item-footnotes {
    background-color: rgb(55 65 81);
    border-color: rgb(75 85 99);
}

.is-fee-item-footnote {
    font-size: 12px;
    line-height: 1.6;
    color: rgb(55 65 81);
    margin-bottom: 8px;
}

.dark .is-fee-item-footnote {
    color: rgb(209 213 219);
}

.is-fee-item-footnote:last-child {
    margin-bottom: 0;
}

.is-fee-item-footnote sup {
    font-size: 10px;
    font-weight: 600;
    color: rgb(37 99 235);
    margin-right: 4px;
}

.dark .is-fee-item-footnote sup {
    color: rgb(96 165 250);
}

/* ==========================================================================
   Fee Summary Card (Create Agreement Form)
   ========================================================================== */

.is-fee-empty {
    padding: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
}

.dark .is-fee-empty {
    color: #9ca3af;
}

.is-fee-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    overflow: hidden;
}

.dark .is-fee-card {
    background: #111827;
    border-color: #374151;
}

/* Header */
.is-fee-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
}

.is-fee-icon {
    font-size: 1.5rem;
}

.is-fee-title {
    flex: 1;
    font-size: 1rem;
    font-weight: 600;
}

.is-fee-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Body */
.is-fee-body {
    padding: 1.25rem;
}

/* Fee Categories Grid */
.is-fee-categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 640px) {
    .is-fee-categories {
        grid-template-columns: 1fr;
    }
}

.is-fee-category {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 0.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
}

.dark .is-fee-category {
    background: #1f2937;
    border-color: #374151;
}

.is-fee-category-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.is-fee-category-content {
    flex: 1;
    min-width: 0;
}

.is-fee-category-label {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.dark .is-fee-category-label {
    color: #9ca3af;
}

.is-fee-category-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    font-family: ui-monospace, monospace;
}

.dark .is-fee-category-value {
    color: #f3f4f6;
}

/* Category Colors */
.is-fee-category--professional {
    border-left: 3px solid #3b82f6;
}

.is-fee-category--government {
    border-left: 3px solid #8b5cf6;
}

.is-fee-category--other {
    border-left: 3px solid #f59e0b;
}

/* Grand Total */
.is-fee-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.is-fee-total-label {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.is-fee-total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    font-family: ui-monospace, monospace;
}

/* Breakdown Details (Collapsible) */
.is-fee-details {
    margin-top: 0.5rem;
}

.is-fee-details-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    transition: background-color 0.15s;
}

.is-fee-details-toggle:hover {
    background: #e5e7eb;
}

.dark .is-fee-details-toggle {
    background: #1f2937;
    color: #d1d5db;
}

.dark .is-fee-details-toggle:hover {
    background: #374151;
}

.is-fee-details-icon {
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.is-fee-details[open] .is-fee-details-icon {
    transform: rotate(180deg);
}

.is-fee-details-content {
    padding: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
}

.dark .is-fee-details-content {
    background: #111827;
    border-color: #374151;
}

.is-fee-breakdown-group {
    margin-bottom: 1rem;
}

.is-fee-breakdown-group:last-child {
    margin-bottom: 0;
}

.is-fee-breakdown-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.dark .is-fee-breakdown-title {
    color: #9ca3af;
    border-bottom-color: #374151;
}

.is-fee-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    font-size: 0.8125rem;
}

.is-fee-breakdown-name {
    color: #374151;
}

.dark .is-fee-breakdown-name {
    color: #d1d5db;
}

.is-fee-breakdown-amount {
    font-weight: 600;
    font-family: ui-monospace, monospace;
    color: #111827;
}

.dark .is-fee-breakdown-amount {
    color: #f3f4f6;
}

/* Footer */
.is-fee-footer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 0.8125rem;
    color: #6b7280;
}

.dark .is-fee-footer {
    background: #0d1117;
    border-color: #374151;
    color: #9ca3af;
}

.is-fee-footer-icon {
    color: #059669;
}

/* ==========================================================================
   Case View - Agreement Status Section
   ========================================================================== */

.is-case-agreement-empty {
    text-align: center;
    padding: 32px 24px;
}

.is-case-agreement-empty-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    color: rgb(156 163 175);
}

.dark .is-case-agreement-empty-icon {
    color: rgb(107 114 128);
}

.is-case-agreement-empty-title {
    font-size: 16px;
    font-weight: 600;
    color: rgb(55 65 81);
    margin-bottom: 4px;
}

.dark .is-case-agreement-empty-title {
    color: rgb(209 213 219);
}

.is-case-agreement-empty-text {
    font-size: 14px;
    color: rgb(107 114 128);
    margin-bottom: 16px;
}

.dark .is-case-agreement-empty-text {
    color: rgb(156 163 175);
}

.is-case-agreement-create-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    background-color: rgb(59 130 246);
    color: white;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.15s;
}

.is-case-agreement-create-btn:hover {
    background-color: rgb(37 99 235);
}

.is-case-agreement-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.is-case-agreement-card {
    background-color: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
    overflow: hidden;
}

.dark .is-case-agreement-card {
    background-color: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.is-case-agreement-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid rgb(229 231 235);
}

.dark .is-case-agreement-card-header {
    border-bottom-color: rgb(55 65 81);
}

.is-case-agreement-card-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.is-case-agreement-number {
    font-size: 15px;
    font-weight: 600;
    color: rgb(59 130 246);
    text-decoration: none;
}

.is-case-agreement-number:hover {
    text-decoration: underline;
}

.dark .is-case-agreement-number {
    color: rgb(96 165 250);
}

.is-case-agreement-template {
    font-size: 13px;
    color: rgb(107 114 128);
}

.dark .is-case-agreement-template {
    color: rgb(156 163 175);
}

.is-case-agreement-dates {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 12px 16px;
}

@media (max-width: 640px) {
    .is-case-agreement-dates {
        grid-template-columns: repeat(2, 1fr);
    }
}

.is-case-agreement-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.is-case-agreement-date-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
}

.dark .is-case-agreement-date-label {
    color: rgb(156 163 175);
}

.is-case-agreement-date-value {
    font-size: 13px;
    font-weight: 500;
    color: rgb(17 24 39);
}

.dark .is-case-agreement-date-value {
    color: rgb(243 244 246);
}

.is-case-agreement-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-top: 1px solid rgb(229 231 235);
    background-color: rgb(243 244 246);
}

.dark .is-case-agreement-footer {
    border-top-color: rgb(55 65 81);
    background-color: rgb(55 65 81);
}

.is-case-agreement-package {
    font-size: 13px;
    font-weight: 500;
    color: rgb(55 65 81);
}

.dark .is-case-agreement-package {
    color: rgb(209 213 219);
}

.is-case-agreement-fee {
    font-size: 14px;
    font-weight: 700;
    color: rgb(22 163 74);
    font-family: ui-monospace, monospace;
}

.dark .is-case-agreement-fee {
    color: rgb(74 222 128);
}

/* ==========================================================================
   Styled Repeater Item Headers (Growmore Teal Theme)
   Used for: Professional Fees, Government Fees, Other Costs, Payment Structure
   ========================================================================== */

/* Repeater item container */
.is-styled-repeater .fi-fo-repeater-item {
    border: 1px solid #0097b687 !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
}

.dark .is-styled-repeater .fi-fo-repeater-item {
    border-color: #0097b6 !important;
}

/* Repeater item header - Growmore Teal theme */
.is-styled-repeater .fi-fo-repeater-item-header {
    background: #0097b687 !important;
    border-bottom: 1px solid #0097b687 !important;
}

.is-styled-repeater .fi-fo-repeater-item-header .fi-fo-repeater-item-label {
    color: #ffffff !important;
    font-weight: 600 !important;
}

/* When collapsed, round all corners */
.is-styled-repeater .fi-fo-repeater-item[data-collapsed="true"] {
    border-radius: 8px !important;
}

.is-styled-repeater .fi-fo-repeater-item[data-collapsed="true"] .fi-fo-repeater-item-header {
    border-bottom: none !important;
}

/* Dark mode */
.dark .is-styled-repeater .fi-fo-repeater-item-header {
    background: #0097b6 !important;
    border-bottom-color: #007a94 !important;
}

.dark .is-styled-repeater .fi-fo-repeater-item-header .fi-fo-repeater-item-label {
    color: #ffffff !important;
}

/* Hover effect */
.is-styled-repeater .fi-fo-repeater-item-header:hover {
    background: #00a8c9 !important;
}

.dark .is-styled-repeater .fi-fo-repeater-item-header:hover {
    background: #00a8c9 !important;
}

/* ==========================================================================
   View Agreement - Detail Cards (Signature Status)
   ========================================================================== */

.is-detail-card {
    background: rgb(249 250 251);
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
    padding: 16px;
}

.is-detail-card-green {
    background: rgb(240 253 244);
    border: 1px solid rgb(187 247 208);
    border-radius: 10px;
    padding: 16px;
}

.is-detail-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.is-detail-body {
    padding-left: 28px;
}

.dark .is-detail-card {
    background: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.dark .is-detail-card-green {
    background: rgba(34, 197, 94, 0.1);
    border-color: rgba(34, 197, 94, 0.3);
}

/* ==========================================================================
   Agency Signature Modal
   ========================================================================== */

.is-signature-modal .fi-modal-content {
    max-width: 600px !important;
}

.is-signature-modal .fi-modal-header {
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
    color: white;
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
}

.is-signature-modal .fi-modal-heading {
    color: white !important;
    font-weight: 600;
}

.is-signature-pad-wrapper {
    background: rgb(249 250 251);
    border: 2px dashed rgb(209 213 219);
    border-radius: 12px;
    padding: 20px;
    margin: 16px 0;
    text-align: center;
}

.is-signature-pad-wrapper:hover {
    border-color: #0f766e;
    background: rgb(240 253 250);
}

.is-signature-pad-canvas {
    background: white;
    border: 1px solid rgb(229 231 235);
    border-radius: 8px;
    cursor: crosshair;
    width: 100%;
    min-height: 150px;
}

.is-signature-pad-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgb(229 231 235);
}

.is-signature-pad-clear {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgb(243 244 246);
    border: 1px solid rgb(209 213 219);
    border-radius: 8px;
    color: rgb(75 85 99);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.is-signature-pad-clear:hover {
    background: rgb(229 231 235);
    color: rgb(31 41 55);
}

.is-signature-pad-hint {
    color: rgb(107 114 128);
    font-size: 0.875rem;
    flex: 1;
    text-align: right;
}

.dark .is-signature-pad-wrapper {
    background: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.dark .is-signature-pad-wrapper:hover {
    border-color: #14b8a6;
    background: rgba(20, 184, 166, 0.1);
}

.dark .is-signature-pad-canvas {
    background: rgb(17 24 39);
    border-color: rgb(55 65 81);
}

.dark .is-signature-pad-actions {
    border-color: rgb(55 65 81);
}

.dark .is-signature-pad-clear {
    background: rgb(55 65 81);
    border-color: rgb(75 85 99);
    color: rgb(209 213 219);
}

.dark .is-signature-pad-clear:hover {
    background: rgb(75 85 99);
    color: white;
}

.dark .is-signature-pad-hint {
    color: rgb(156 163 175);
}

/* ==========================================================================
   Signers List / Table (Edit Agreement)
   ========================================================================== */

.is-signers-section {
    background: white;
    border-radius: 12px;
    border: 1px solid rgb(229 231 235);
    overflow: hidden;
}

.is-signers-header {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    padding: 16px 20px;
    border-bottom: 1px solid rgb(229 231 235);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.is-signers-title {
    font-weight: 600;
    font-size: 1rem;
    color: rgb(17 24 39);
    display: flex;
    align-items: center;
    gap: 10px;
}

.is-signers-progress {
    font-size: 0.875rem;
    color: rgb(107 114 128);
    background: white;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgb(229 231 235);
}

.is-signers-table {
    width: 100%;
    border-collapse: collapse;
}

.is-signers-table th {
    background: rgb(249 250 251);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgb(107 114 128);
    border-bottom: 1px solid rgb(229 231 235);
}

.is-signers-table td {
    padding: 8px 16px;
    border-bottom: 1px solid rgb(243 244 246);
    vertical-align: middle;
}

.is-signers-table tr:last-child td {
    border-bottom: none;
}

.is-signers-table tr:hover {
    background: rgb(249 250 251);
}

.is-signer-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #0284c7;
}

.is-signer-avatar svg {
    width: 16px;
    height: 16px;
}

.is-signer-avatar-agency {
    background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
    color: #0f766e;
}

.is-signer-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.is-signer-name {
    font-weight: 600;
    color: rgb(17 24 39);
    font-size: 0.9375rem;
}

.is-signer-email {
    font-size: 0.8125rem;
    color: rgb(107 114 128);
}

.is-signer-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.is-signer-type-primary {
    background: rgb(219 234 254);
    color: rgb(30 64 175);
}

.is-signer-type-spouse {
    background: rgb(243 232 255);
    color: rgb(107 33 168);
}

.is-signer-type-dependent {
    background: rgb(254 249 195);
    color: rgb(133 77 14);
}

.is-signer-type-agent {
    background: rgb(204 251 241);
    color: rgb(17 94 89);
}

.is-signer-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.8125rem;
}

.is-signer-status svg {
    width: 14px;
    height: 14px;
}

.is-signer-status-signed {
    color: rgb(22 163 74);
}

.is-signer-status-pending {
    color: rgb(107 114 128);
}

.is-signer-status-expired {
    color: rgb(220 38 38);
}

.is-signer-signed-date {
    font-size: 0.8125rem;
    color: rgb(75 85 99);
}

.is-signer-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.is-signer-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid rgb(229 231 235);
    background: white;
    color: rgb(107 114 128);
    cursor: pointer;
    transition: all 0.2s;
}

.is-signer-action-btn:hover {
    background: rgb(249 250 251);
    color: rgb(17 24 39);
    border-color: rgb(209 213 219);
}

.is-signer-action-btn-primary {
    background: #0f766e;
    border-color: #0f766e;
    color: white;
}

.is-signer-action-btn-primary:hover {
    background: #0d6b63;
    border-color: #0d6b63;
    color: white;
}

.is-signer-sign-hint {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: #0f766e;
    font-weight: 500;
    padding: 4px 8px;
    background: rgba(15, 118, 110, 0.1);
    border-radius: 6px;
}

.dark .is-signer-sign-hint {
    color: #14b8a6;
    background: rgba(20, 184, 166, 0.15);
}

/* Dark mode for signers section */
.dark .is-signers-section {
    background: rgb(31 41 55);
    border-color: rgb(55 65 81);
}

.dark .is-signers-header {
    background: linear-gradient(135deg, rgb(31 41 55) 0%, rgb(17 24 39) 100%);
    border-color: rgb(55 65 81);
}

.dark .is-signers-title {
    color: rgb(243 244 246);
}

.dark .is-signers-progress {
    background: rgb(55 65 81);
    color: rgb(209 213 219);
    border-color: rgb(75 85 99);
}

.dark .is-signers-table th {
    background: rgb(17 24 39);
    color: rgb(156 163 175);
    border-color: rgb(55 65 81);
}

.dark .is-signers-table td {
    border-color: rgb(55 65 81);
}

.dark .is-signers-table tr:hover {
    background: rgb(17 24 39);
}

.dark .is-signer-avatar {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(56, 189, 248, 0.2) 100%);
    color: #38bdf8;
}

.dark .is-signer-avatar-agency {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.2) 0%, rgba(45, 212, 191, 0.2) 100%);
    color: #2dd4bf;
}

.dark .is-signer-name {
    color: rgb(243 244 246);
}

.dark .is-signer-email {
    color: rgb(156 163 175);
}

.dark .is-signer-type-primary {
    background: rgba(59, 130, 246, 0.2);
    color: rgb(147 197 253);
}

.dark .is-signer-type-spouse {
    background: rgba(168, 85, 247, 0.2);
    color: rgb(216 180 254);
}

.dark .is-signer-type-dependent {
    background: rgba(234, 179, 8, 0.2);
    color: rgb(253 224 71);
}

.dark .is-signer-type-agent {
    background: rgba(20, 184, 166, 0.2);
    color: rgb(94 234 212);
}

.dark .is-signer-action-btn {
    background: rgb(55 65 81);
    border-color: rgb(75 85 99);
    color: rgb(209 213 219);
}

.dark .is-signer-action-btn:hover {
    background: rgb(75 85 99);
    color: white;
}

/* ============================================================================
   Related Business Case — picking the sponsor's case
   ============================================================================
   Candidates are matched on sponsor alone, so a sponsor with several unrelated
   matters produces several rows that look alike. They used to render as bare
   case numbers, which told the reader nothing: on the reported 494 that was two
   identical buttons, both Labour Agreement (DAMA) matters, neither the
   nomination case the visa needed. Every row now leads with what the case is
   for.
   ========================================================================= */

.is-sponsor-case-empty {
    border: 1px dashed rgb(209 213 219);
    border-radius: 12px;
    background: rgb(249 250 251);
    padding: 1rem 1.25rem;
}

.dark .is-sponsor-case-empty {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
}

.is-sponsor-case-empty-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.is-sponsor-case-empty-icon {
    width: 22px;
    height: 22px;
    flex: none;
    margin-top: 2px;
    color: rgb(147 51 234);
}

.is-sponsor-case-empty-title {
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    color: rgb(31 41 55);
}

.dark .is-sponsor-case-empty-title {
    color: rgb(243 244 246);
}

.is-sponsor-case-empty-sub {
    margin: 0.15rem 0 0 0;
    font-size: 0.8rem;
    line-height: 1.45;
    color: rgb(107 114 128);
}

.dark .is-sponsor-case-empty-sub {
    color: rgb(156 163 175);
}

/* --- the candidate list --- */

.is-sponsor-case-picker {
    margin-top: 1rem;
}

.is-sponsor-case-picker-lede {
    margin: 0 0 0.6rem 0;
    font-size: 0.75rem;
    line-height: 1.45;
    color: rgb(120 113 108);
}

.dark .is-sponsor-case-picker-lede {
    color: rgb(168 162 158);
}

.is-sponsor-case-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.is-sponsor-case-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgb(229 231 235);
    border-radius: 10px;
    background: rgb(255 255 255);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.dark .is-sponsor-case-item {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
}

.is-sponsor-case-item:hover {
    border-color: rgb(165 180 252);
    box-shadow: 0 1px 3px rgb(0 0 0 / 0.06);
}

.dark .is-sponsor-case-item:hover {
    border-color: rgb(99 102 241);
    box-shadow: none;
}

.is-sponsor-case-item-main {
    min-width: 0;
    flex: 1 1 20rem;
}

.is-sponsor-case-item-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.is-sponsor-case-number {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: rgb(55 65 81);
}

.dark .is-sponsor-case-number {
    color: rgb(229 231 235);
}

.is-sponsor-case-date {
    font-size: 0.72rem;
    color: rgb(156 163 175);
}

.dark .is-sponsor-case-date {
    color: rgb(107 114 128);
}

/* What the case is FOR — the line that was missing. */
.is-sponsor-case-work {
    margin: 0.3rem 0 0 0;
    font-size: 0.82rem;
    line-height: 1.4;
    font-weight: 500;
    color: rgb(31 41 55);
}

.dark .is-sponsor-case-work {
    color: rgb(243 244 246);
}

.is-sponsor-case-meta {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin: 0.3rem 0 0 0;
    font-size: 0.75rem;
    color: rgb(107 114 128);
}

.dark .is-sponsor-case-meta {
    color: rgb(156 163 175);
}

.is-sponsor-case-meta-icon {
    width: 14px;
    height: 14px;
    flex: none;
}

.is-sponsor-case-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    flex: none;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: rgb(55 65 81);
    background: rgb(255 255 255);
    border: 1px solid rgb(209 213 219);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.15s;
}

.dark .is-sponsor-case-link-btn {
    color: rgb(229 231 235);
    background: rgb(31 41 55);
    border-color: rgb(75 85 99);
}

.is-sponsor-case-link-btn:hover {
    color: rgb(79 70 229);
    border-color: rgb(99 102 241);
    background: rgb(238 242 255);
}

.dark .is-sponsor-case-link-btn:hover {
    color: rgb(199 210 254);
    border-color: rgb(99 102 241);
    background: rgb(49 46 129);
}

.is-sponsor-case-link-icon {
    width: 15px;
    height: 15px;
    flex: none;
}

/* --- footer: the way out when none of them is right --- */

.is-sponsor-case-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgb(229 231 235);
}

.dark .is-sponsor-case-footer {
    border-top-color: rgb(55 65 81);
}

.is-sponsor-case-footer-text {
    font-size: 0.78rem;
    color: rgb(107 114 128);
}

.dark .is-sponsor-case-footer-text {
    color: rgb(156 163 175);
}

.is-sponsor-case-new-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    color: rgb(79 70 229);
    background: rgb(238 242 255);
    border: 1px solid rgb(165 180 252);
    border-radius: 7px;
    transition: all 0.15s;
}

.dark .is-sponsor-case-new-btn {
    color: rgb(199 210 254);
    background: rgb(49 46 129);
    border-color: rgb(99 102 241);
}

.is-sponsor-case-new-btn:hover {
    background: rgb(224 231 255);
}

.dark .is-sponsor-case-new-btn:hover {
    background: rgb(67 56 202);
}

.is-sponsor-case-legacy-link {
    margin-top: 1rem;
}

@media (max-width: 640px) {
    .is-sponsor-case-item {
        align-items: stretch;
    }

    .is-sponsor-case-link-btn {
        width: 100%;
        justify-content: center;
    }
}
