.contract-flow-section {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    color: rgba(226, 232, 240, 0.95);
}

.contract-flow-hero {
    margin-bottom: 2rem;
}

.contract-flow-hero .title {
    color: #f8fafc;
}

.contract-flow-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-bottom: 2rem;
}

.contract-flow-grid--triple {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.contract-flow-grid--double {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

@media screen and (min-width: 1024px) {
    .contract-flow-grid--triple {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .contract-flow-grid--double {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.contract-flow-card {
    background: rgba(10, 18, 35, 0.92);
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 18px;
    padding: 1.5rem;
    box-shadow: 0 20px 48px rgba(2, 6, 23, 0.5);
}

.sign-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.sign-checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sign-checkbox-list .checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
}

.contract-flow-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #38bdf8;
    font-weight: 600;
}

.contract-flow-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.contract-flow-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid rgba(59, 130, 246, 0.12);
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(15, 23, 42, 0.85), rgba(2, 6, 23, 0.9));
}

.contract-flow-list li span {
    color: rgba(224, 231, 255, 0.78);
    font-size: 0.9rem;
}

.contract-flow-list li strong {
    color: #f8fafc;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.signature-pad-wrapper {
    background: rgba(2, 6, 23, 0.9);
    border: 1px dashed rgba(148, 163, 184, 0.45);
    border-radius: 16px;
    padding: 1.25rem;
}

.signature-canvas {
    width: 100%;
    height: 220px;
    background: rgba(15, 23, 42, 0.85);
    border-radius: 12px;
    border: 1px solid rgba(37, 99, 235, 0.4);
}

.signature-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.75rem;
}

.signature-actions button {
    border: 1px solid rgba(248, 113, 113, 0.6);
    color: rgba(248, 113, 113, 0.9);
}

.timeline {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.timeline-step {
    flex: 1 1 160px;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(59, 130, 246, 0.25);
    background: rgba(15, 23, 42, 0.65);
    text-align: center;
}

.timeline-step.is-active {
    border-color: rgba(94, 234, 212, 0.8);
    box-shadow: 0 0 25px rgba(94, 234, 212, 0.35);
}

.timeline-step.is-completed {
    border-color: rgba(34, 197, 94, 0.8);
    background: rgba(22, 163, 74, 0.15);
}

.timeline-step strong {
    display: block;
    font-size: 0.95rem;
    color: #e0f2fe;
    margin-bottom: 0.25rem;
}

.timeline-lightning {
    font-size: 0.78rem;
    color: #fef3c7;
    margin-top: 0.25rem;
    word-break: break-all;
}

.hash-display {
    background: rgba(12, 20, 38, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    font-family: \"JetBrains Mono\", \"Fira Code\", monospace;
    font-size: 0.85rem;
    word-break: break-all;
}

.milestone-detail-list {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.milestone-detail-list li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    font-size: 0.85rem;
    color: rgba(226, 232, 240, 0.9);
}

.milestone-detail-list strong {
    color: #93c5fd;
}

@media (max-width: 768px) {
    .milestone-detail-list li {
        display: block;
    }

    .milestone-detail-list li > * {
        display: block;
        width: 100%;
        line-height: 1.45;
        margin-top: 0.15rem;
    }

    .milestone-detail-list li > *:first-child {
        margin-top: 0;
    }
}

.hash-display .markdown-content {
    font-family: 'Pretendard', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
}

.hash-display .markdown-content p:last-child {
    margin-bottom: 0;
}

.worklog-preview {
    background: rgba(248, 250, 252, 0.95);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    color: #0f172a;
    font-size: 0.95rem;
    box-shadow: 0 15px 32px rgba(15, 23, 42, 0.1);
}

.worklog-preview .markdown-content,
.worklog-preview.markdown-content {
    background: transparent;
    color: inherit;
    line-height: 1.6;
}

.worklog-preview .markdown-content p,
.worklog-preview.markdown-content p {
    margin: 0 0 0.75rem;
}

.worklog-preview .markdown-content p:last-child,
.worklog-preview.markdown-content p:last-child {
    margin-bottom: 0;
}

.worklog-preview strong {
    color: #111827;
}

.signature-payment-grid {
    display: grid;
    gap: 1.25rem;
}

@media screen and (min-width: 1024px) {
    .signature-payment-grid {
        grid-template-columns: minmax(0, 1fr) minmax(320px, 0.95fr);
        align-items: start;
    }
}

.lightning-payment-card {
    border: 1px solid rgba(14, 165, 233, 0.45);
    border-radius: 18px;
    padding: 1.25rem;
    background: rgba(2, 11, 24, 0.95);
    box-shadow: inset 0 0 28px rgba(14, 165, 233, 0.08);
}

.lightning-payment-wrapper h3 {
    font-size: 1.1rem;
    margin-bottom: 0.85rem;
    color: #38bdf8;
    font-weight: 600;
}

.lightning-payment-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.lightning-payment-label {
    font-size: 1rem;
    font-weight: 600;
    color: #fdf7c0;
}

.lightning-payment-amount {
    font-size: 1.35rem;
    color: #fdf7c0;
    letter-spacing: 0.02em;
}

.lightning-payment-amount strong {
    color: inherit;
}

.lightning-policy-block {
    margin-bottom: 0.75rem;
}

.lightning-policy-list {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.9rem;
    color: rgba(248, 250, 252, 0.92);
}

.lightning-policy-list strong {
    color: #fdfcc9;
}

.lightning-policy-desc {
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.9);
}

.lightning-status {
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 12px;
    padding: 0.75rem;
    font-size: 0.9rem;
    color: rgba(224, 242, 254, 0.95);
    margin-bottom: 0.75rem;
    background: rgba(15, 23, 42, 0.7);
}

.lightning-note {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.lightning-invoice {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

@media screen and (min-width: 768px) {
    .lightning-invoice {
        flex-direction: row;
    }
}

.lightning-invoice-qr {
    text-align: center;
}

.lightning-invoice-qr img {
    width: 100%;
    max-width: 240px;
    border-radius: 12px;
    background: #fff;
}

.lightning-countdown {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.8);
}

.lightning-invoice-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lightning-invoice-textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(59, 130, 246, 0.35);
    background: rgba(8, 12, 24, 0.9);
    color: rgba(248, 250, 252, 0.9);
    font-size: 0.85rem;
}

.lightning-id-note {
    font-size: 0.85rem;
    color: rgba(248, 250, 252, 0.85);
    margin: 0.35rem 0 0.75rem;
}

.lightning-wallet-btn {
    margin-top: 0.35rem;
    display: none;
}

.lightning-mini-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.lightning-mini-actions .button {
    flex: 1 1 140px;
}

.lightning-mini-actions--secondary {
    margin-top: 0.75rem;
}

.share-url-display {
    color: #f8fafc;
    border-color: rgba(94, 234, 212, 0.55);
    box-shadow: 0 0 24px rgba(45, 212, 191, 0.25);
    background: radial-gradient(
        circle at 10% 20%,
        rgba(15, 118, 110, 0.35),
        rgba(15, 23, 42, 0.95)
    );
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    min-height: 3.25rem;
}

.share-url-link {
    color: #ecfeff;
    text-decoration: none;
    width: 100%;
    word-break: break-all;
}

.share-url-link:hover,
.share-url-link:focus {
    color: #5eead4;
    text-decoration: underline;
}

@media screen and (max-width: 768px) {
    .lightning-wallet-btn {
        display: inline-flex;
    }
}

.signature-record {
    background: rgba(11, 21, 40, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 0.85rem;
}

.signature-record-img {
    width: 100%;
    max-height: 200px;
    object-fit: contain;
    border-radius: 10px;
    border: 1px solid rgba(94, 234, 212, 0.25);
    background: rgba(2, 6, 23, 0.85);
    padding: 0.4rem;
}

.modal-template-body ul {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: 0.85rem;
}

.modal-template-body ol {
    list-style: decimal;
    padding-left: 1.5rem;
    margin-bottom: 0.85rem;
}

.modal-template-body li {
    margin-bottom: 0.35rem;
    color: rgba(226, 232, 240, 0.92);
}

.contract-flow-card label.checkbox {
    color: rgba(248, 250, 252, 0.92);
    font-weight: 500;
    transition: color 0.2s ease;
}

.contract-flow-card label.checkbox:hover,
.contract-flow-card label.checkbox:focus-within {
    color: #5eead4;
}

.invite-alert {
    background: rgba(251, 146, 60, 0.12);
    border: 1px solid rgba(251, 146, 60, 0.45);
    border-radius: 14px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
    color: #fdba74;
}

.email-status-list {
    list-style: none;
    margin: 0;\n    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.email-status-list li {
    background: rgba(2, 6, 23, 0.9);
    border: 1px solid rgba(59, 130, 246, 0.25);
    border-radius: 12px;
    padding: 0.85rem 1rem;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.contract-library-table-wrapper {
    overflow-x: auto;
}

.contract-library-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

.contract-library-table th,
.contract-library-table td {
    padding: 0.85rem;
    border-bottom: 1px solid rgba(51, 65, 85, 0.4);
}

.contract-library-table th {
    text-align: left;
    color: rgba(148, 163, 184, 0.95);
    font-weight: 600;
}

.contract-library-table td a {
    color: #38bdf8;
    text-decoration: underline;
}

@media (max-width: 768px) {
    .signature-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    .timeline-step {
        flex: 1 1 100%;
    }
    .contract-library-table-wrapper {
        overflow-x: visible;
    }
    .contract-library-table {
        min-width: 0;
        border-collapse: separate;
    }
    .contract-library-table thead {
        display: none;
    }
    .contract-library-table tbody,
    .contract-library-table tr,
    .contract-library-table td {
        display: block;
        width: 100%;
    }
    .contract-library-table tr {
        margin-bottom: 1rem;
        border: 1px solid rgba(59, 130, 246, 0.25);
        border-radius: 12px;
        padding: 0.85rem 1rem;
        background: rgba(15, 23, 42, 0.6);
    }
    .contract-library-table td {
        border: 0;
        padding: 0.35rem 0;
        text-align: right;
    }
    .contract-library-table td {
        padding: 0.65rem 0;
    }
    .contract-library-table td::before {
        content: attr(data-label);
        font-weight: 600;
        float: left;
        text-transform: none;
        color: rgba(148, 163, 184, 0.95);
        margin-right: 0.75rem;
    }
}
