@import url("https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #f0f4fb;
    --bg-2: #e7eef8;
    --surface: #ffffff;
    --surface-2: #f7faff;
    --surface-3: #edf3ff;
    --text: #162233;
    --text-soft: #5d6c7d;
    --primary: #0f75b8;
    --primary-2: #15b8a6;
    --accent: #ff8a3d;
    --danger: #d14557;
    --success: #189b61;
    --border: #d4dfef;
    --shadow-sm: 0 6px 18px rgba(20, 48, 85, 0.08);
    --shadow-md: 0 16px 36px rgba(20, 48, 85, 0.12);
}

[data-theme="dark"] {
    --bg: #0f1726;
    --bg-2: #162236;
    --surface: #172338;
    --surface-2: #1d2c43;
    --surface-3: #22344f;
    --text: #edf3ff;
    --text-soft: #aebed0;
    --primary: #40a8df;
    --primary-2: #45d1bf;
    --accent: #ffaf6c;
    --danger: #ff7384;
    --success: #45cb89;
    --border: #2d415f;
    --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 20px 40px rgba(0, 0, 0, 0.32);
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: "Nunito", "Segoe UI", "Trebuchet MS", "Verdana", sans-serif;
}
a { color: inherit; }

html.yd-modal-open,
body.yd-modal-open {
    overflow: hidden !important;
    overscroll-behavior: none;
}

.yd-shell {
    min-height: 100vh;
    background:
        radial-gradient(circle at 2% 5%, rgba(255, 138, 61, 0.16), transparent 25%),
        radial-gradient(circle at 95% 2%, rgba(15, 117, 184, 0.24), transparent 38%),
        radial-gradient(circle at 40% 100%, rgba(21, 184, 166, 0.15), transparent 32%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}

.yd-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 18px;
    position: sticky;
    top: 0;
    z-index: 9990;
    background: rgba(241, 246, 252, 0.94);
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    border-bottom: 1px solid rgba(198, 211, 228, 0.86);
    box-shadow: 0 1px 6px rgba(20, 48, 85, 0.06), 0 1px 0 rgba(255,255,255,0.72) inset;
    transition: box-shadow 0.2s ease, background 0.2s ease;
}

[data-theme="dark"] .yd-topbar {
    background: rgba(15, 23, 38, 0.84);
    border-bottom-color: rgba(45, 65, 95, 0.8);
    box-shadow: 0 2px 18px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255,255,255,0.04) inset;
}

.yd-top-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

[data-theme="dark"] .yd-top-actions {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.yd-top-identity-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: min(620px, calc(100vw - 200px));
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

[data-theme="dark"] .yd-top-identity-card {
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.yd-top-identity-media {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
}

.yd-top-brand-text {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.yd-top-brand-title {
    min-width: 0;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0.4px;
    background: linear-gradient(135deg, #1f2b4b, #2c73b7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yd-top-brand-subtitle {
    color: #5f6f88;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: 0.8px;
    line-height: 1.12;
    opacity: 0.78;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .yd-top-brand-title {
    background: linear-gradient(135deg, #f4f8ff, #93c7ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .yd-top-brand-subtitle {
    color: #b5c9e5;
    opacity: 0.85;
}

.yd-top-user-context {
    min-width: 0;
    max-width: min(350px, 34vw);
    display: grid;
    gap: 2px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
}

.yd-top-user-company,
.yd-top-user-name {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    min-height: 18px;
    padding: 0;
    border-radius: 0;
    border: 0;
    background: transparent;
    color: #184a79;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yd-top-user-name {
    color: #0f5b84;
    font-weight: 700;
}

[data-theme="dark"] .yd-top-user-context {
    border-color: transparent;
    background: transparent;
}

[data-theme="dark"] .yd-top-user-company,
[data-theme="dark"] .yd-top-user-name {
    border-color: transparent;
    background: transparent;
    color: #dbebff;
}

[data-theme="dark"] .yd-top-user-name {
    color: #d8f5ff;
}

.yd-logo-btn {
    border: 0;
    background: transparent;
    padding: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

.yd-icon-btn {
    min-height: 42px;
    min-width: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease, border-color 0.18s ease;
}

.yd-icon-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(64, 168, 223, 0.4);
    box-shadow: 0 8px 20px rgba(20, 48, 85, 0.14), 0 0 0 3px rgba(64, 168, 223, 0.1);
}

.yd-icon-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: var(--shadow-sm);
}

.yd-user-item.yd-user-subscription {
    background: linear-gradient(135deg, #e8f7ff, #d9f4ff);
    color: #0a5f8f;
    font-weight: 800;
}

.yd-user-item.yd-user-subscription:hover {
    background: linear-gradient(135deg, #d3f0ff, #bde9ff);
}

.yd-subscription-sheet {
    border: 1px solid var(--border);
}

.yd-subscription-body {
    display: grid;
    gap: 12px;
}

.yd-subscription-status-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
    padding: 12px;
}

.yd-subscription-status-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-soft);
}

.yd-subscription-status-value {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text);
}

.yd-subscription-status-badges {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yd-subscription-status-meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-soft);
}

.yd-subscription-plan-box {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    background: var(--surface);
    display: grid;
    gap: 8px;
}

.yd-subscription-plan-box label {
    font-size: 14px;
    font-weight: 700;
}

.yd-subscription-price-note {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-subscription-package-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.yd-subscription-package-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    padding: 10px;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.yd-subscription-package-logo-wrap {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid rgba(148, 163, 184, 0.35);
    overflow: hidden;
}

.yd-subscription-package-logo-wrap.is-corporate {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.yd-subscription-package-logo {
    width: 34px;
    height: 34px;
    object-fit: contain;
    display: block;
}

.yd-subscription-package-logo.is-corporate {
    filter: brightness(0) invert(1);
}

.yd-subscription-package-content {
    flex: 1;
    min-width: 0;
}

.yd-subscription-package-card:hover {
    border-color: rgba(64, 168, 223, 0.45);
    box-shadow: 0 8px 20px rgba(20, 48, 85, 0.12);
    transform: translateY(-1px);
}

.yd-subscription-package-card.is-selected {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.18);
}

.yd-subscription-package-card.is-disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.yd-subscription-package-card.is-disabled:hover {
    border-color: var(--border);
    box-shadow: none;
    transform: none;
}

.yd-subscription-package-name {
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

.yd-subscription-package-price {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-soft);
}

.yd-subscription-package-price span {
    font-size: 12px;
    color: var(--text-soft);
    opacity: 0.9;
}

.yd-subscription-package-warning {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #b45309;
}

.yd-subscription-preview-sheet,
.yd-subscription-confirm-sheet {
    border: 1px solid var(--border);
}

.yd-subscription-preview-body,
.yd-subscription-confirm-body {
    display: grid;
    gap: 12px;
}

.yd-subscription-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.yd-subscription-preview-row {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.yd-subscription-preview-label {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-subscription-preview-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    text-align: right;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.yd-subscription-info-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.yd-subscription-info-badge.is-primary {
    color: #0c4a6e;
    background: rgba(14, 165, 233, 0.17);
    border-color: rgba(14, 165, 233, 0.35);
}

.yd-subscription-info-badge.is-accent {
    color: #155e75;
    background: rgba(20, 184, 166, 0.18);
    border-color: rgba(20, 184, 166, 0.34);
}

.yd-subscription-info-badge.is-warning {
    color: #92400e;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.35);
}

.yd-subscription-info-badge.is-success {
    color: #166534;
    background: rgba(34, 197, 94, 0.19);
    border-color: rgba(34, 197, 94, 0.35);
}

.yd-subscription-info-badge.is-time {
    color: #3730a3;
    background: rgba(99, 102, 241, 0.16);
    border-color: rgba(99, 102, 241, 0.32);
}

.yd-subscription-info-badge.is-danger {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.34);
}

.yd-subscription-info-badge.is-neutral,
.yd-subscription-info-badge.is-muted {
    color: var(--text-soft);
    background: var(--surface);
    border-color: var(--border);
}

.yd-subscription-preview-source {
    font-size: 13px;
    color: var(--text-soft);
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 10px;
    background: var(--surface);
}

[data-theme="dark"] .yd-subscription-package-card.is-selected {
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.28);
}

[data-theme="dark"] .yd-subscription-package-logo-wrap {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(148, 163, 184, 0.28);
}

[data-theme="dark"] .yd-subscription-package-logo-wrap.is-corporate {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    border-color: rgba(96, 165, 250, 0.45);
}

[data-theme="dark"] .yd-subscription-preview-row {
    background: linear-gradient(135deg, #0f172a, #111827);
}

[data-theme="dark"] .yd-subscription-info-badge.is-primary {
    color: #7dd3fc;
    background: rgba(2, 132, 199, 0.24);
    border-color: rgba(125, 211, 252, 0.32);
}

[data-theme="dark"] .yd-subscription-info-badge.is-accent {
    color: #99f6e4;
    background: rgba(13, 148, 136, 0.26);
    border-color: rgba(153, 246, 228, 0.3);
}

[data-theme="dark"] .yd-subscription-info-badge.is-warning {
    color: #fcd34d;
    background: rgba(180, 83, 9, 0.28);
    border-color: rgba(245, 158, 11, 0.34);
}

[data-theme="dark"] .yd-subscription-info-badge.is-success {
    color: #86efac;
    background: rgba(21, 128, 61, 0.3);
    border-color: rgba(134, 239, 172, 0.34);
}

[data-theme="dark"] .yd-subscription-info-badge.is-time {
    color: #c4b5fd;
    background: rgba(67, 56, 202, 0.26);
    border-color: rgba(196, 181, 253, 0.34);
}

[data-theme="dark"] .yd-subscription-info-badge.is-danger {
    color: #fca5a5;
    background: rgba(153, 27, 27, 0.28);
    border-color: rgba(252, 165, 165, 0.34);
}

.yd-subscription-expired-text {
    margin: 0;
    color: var(--text);
    font-size: 15px;
    line-height: 1.45;
}

.yd-subscription-paytr-body {
    min-height: 420px;
    max-height: calc(92vh - 120px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#yd-subscription-paytr-frame {
    width: 100%;
    min-height: 0;
    max-height: calc(92vh - 176px);
    overflow-y: auto;
    overflow-x: hidden;
}

#yd-register-paytr-frame {
    width: 100%;
    max-height: inherit;
    overflow-y: auto;
    overflow-x: hidden;
}

#yd-subscription-paytr-frame iframe {
    display: block;
    width: 100%;
    min-height: 620px;
    height: calc(92vh - 210px);
    border: 0;
}

#yd-register-paytr-frame iframe {
    width: 100%;
    min-height: 760px;
    height: 760px;
    border: 0;
}

.yd-button.danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    border-color: #991b1b;
}

.yd-button.danger:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
}

#yd-subscription-cancel-btn.is-passive {
    background: linear-gradient(135deg, #94a3b8, #64748b);
    border-color: #64748b;
    color: #f8fafc;
    cursor: pointer;
}

#yd-subscription-cancel-btn.is-passive:hover {
    background: linear-gradient(135deg, #7c8ea5, #5b6f86);
}

@media (max-width: 768px) {
    .yd-subscription-sheet,
    .yd-subscription-paytr-sheet,
    .yd-subscription-expired-sheet,
    .yd-subscription-preview-sheet,
    .yd-subscription-confirm-sheet {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 20px);
        border-radius: 14px;
    }

    .yd-subscription-paytr-body {
        min-height: 300px;
        max-height: calc(100vh - 132px);
    }

    #yd-subscription-paytr-frame iframe {
        min-height: 700px;
        height: 700px;
    }

    #yd-register-paytr-frame iframe {
        min-height: 700px;
        height: 700px;
    }

    .yd-subscription-expired-text,
    .yd-subscription-status-title,
    .yd-subscription-plan-box label {
        font-size: 15px;
    }

    .yd-subscription-price-note,
    .yd-subscription-status-meta {
        font-size: 13px;
    }

    .yd-subscription-status-value {
        font-size: 17px;
    }

    .yd-subscription-status-badges {
        margin-top: 6px;
    }

    .yd-subscription-package-list {
        grid-template-columns: 1fr;
    }

    .yd-subscription-package-logo-wrap {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .yd-subscription-package-logo {
        width: 32px;
        height: 32px;
    }

    .yd-subscription-preview-value {
        font-size: 14px;
        justify-content: flex-start;
    }

    #yd-subscription-cycle,
    #yd-subscription-cancel-btn,
    #yd-subscription-checkout-btn,
    #yd-subscription-cancel-confirm-input,
    #yd-subscription-cancel-confirm-btn,
    #yd-subscription-preview-confirm-btn,
    #yd-open-subscription-modal-btn,
    #yd-register-payment-check-btn {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .yd-subscription-sheet,
    .yd-subscription-paytr-sheet,
    .yd-subscription-expired-sheet,
    .yd-subscription-preview-sheet,
    .yd-subscription-confirm-sheet {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100vh - 12px);
        border-radius: 12px;
    }

    .yd-subscription-body {
        gap: 10px;
    }

    .yd-subscription-status-card,
    .yd-subscription-plan-box {
        padding: 10px;
    }

    .yd-subscription-status-value {
        font-size: 16px;
    }

    .yd-subscription-expired-text {
        font-size: 14px;
    }

    .yd-subscription-preview-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .yd-subscription-preview-value {
        width: 100%;
        text-align: left;
        font-size: 13px;
        justify-content: flex-start;
    }

    .yd-subscription-package-card {
        gap: 8px;
        padding: 10px 8px;
    }

    .yd-subscription-package-name {
        font-size: 15px;
    }

    .yd-subscription-package-price {
        font-size: 13px;
    }

    #yd-subscription-cycle,
    #yd-subscription-cancel-btn,
    #yd-subscription-checkout-btn,
    #yd-subscription-cancel-confirm-input,
    #yd-subscription-cancel-confirm-btn,
    #yd-subscription-preview-confirm-btn,
    #yd-open-subscription-modal-btn,
    #yd-register-payment-check-btn {
        min-height: 40px;
        width: 100%;
    }

    .yd-subscription-paytr-body {
        max-height: calc(100vh - 118px);
    }

    #yd-subscription-paytr-frame iframe {
        min-height: 660px;
        height: 660px;
    }

    #yd-register-paytr-frame iframe {
        min-height: 660px;
        height: 660px;
    }
}

.yd-notification-clickable {
    cursor: pointer;
}

.yd-notification.is-unread {
    border-left: 3px solid #0f7bff;
}

.yd-archive-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.yd-archive-note-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    border: 1px solid transparent;
    max-width: 100%;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
    text-align: left;
}

.yd-archive-note-badge .yd-badge-icon {
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.yd-archive-note-badge .yd-badge-icon svg {
    width: 14px;
    height: 14px;
}

.yd-archive-note-badge.diary {
    color: #8a5600;
    background: #ffe9bf;
    border-color: #ffd389;
}

.yd-archive-note-badge.note {
    color: #0c4d8b;
    background: #dff0ff;
    border-color: #b6dbff;
}

.yd-archive-note-badge:hover {
    transform: translateY(-1px);
}

.yd-archive-note-badge:focus-visible {
    outline: 2px solid #0f7bff;
    outline-offset: 1px;
}

#archive-record-note-modal .yd-select,
#archive-record-note-modal .yd-textarea {
    min-height: 42px;
}

#archive-record-note-modal .yd-textarea {
    min-height: 140px;
}

[data-theme="dark"] .yd-archive-note-badge.diary {
    color: #f1d49c;
    background: #4f3a19;
    border-color: #7a5624;
}

[data-theme="dark"] .yd-archive-note-badge.note {
    color: #b8dcff;
    background: #17334e;
    border-color: #29567f;
}

[data-theme="dark"] #archive-record-note-modal .yd-modal-sheet {
    background: #18253b;
}

@media (max-width: 768px) {
    .yd-archive-row-badges {
        gap: 5px;
    }

    .yd-archive-note-badge {
        padding: 5px 9px;
        font-size: 12px;
        min-height: 24px;
    }

    #archive-record-note-modal .yd-select,
    #archive-record-note-modal .yd-textarea,
    #archive-record-note-modal .yd-button {
        min-height: 40px;
        font-size: 13px;
    }

    #archive-record-note-modal .yd-textarea {
        min-height: 132px;
    }
}

@media (max-width: 480px) {
    .yd-archive-row-badges {
        gap: 4px;
    }

    .yd-archive-note-badge {
        font-size: 11px;
        padding: 5px 8px;
    }

    #archive-record-note-modal .yd-modal-sheet {
        width: min(96vw, 760px);
        max-height: 94vh;
    }

    #archive-record-note-modal .yd-select,
    #archive-record-note-modal .yd-textarea,
    #archive-record-note-modal .yd-button {
        min-height: 40px;
        font-size: 13px;
    }

    #archive-record-note-modal .yd-textarea {
        min-height: 120px;
    }
}

.yd-archive-question-alert {
    border: 2px solid #d62828;
    box-shadow: 0 0 0 0 rgba(214, 40, 40, 0.5);
    animation: yd-alert-pulse 1.2s ease-in-out infinite;
}

@keyframes yd-alert-pulse {
    0% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0.45); }
    70% { box-shadow: 0 0 0 10px rgba(214, 40, 40, 0); }
    100% { box-shadow: 0 0 0 0 rgba(214, 40, 40, 0); }
}

#my-structures-modal .yd-clickable-row {
    cursor: pointer;
}

#my-structures-modal .yd-clickable-row:hover {
    background: rgba(15, 123, 255, 0.08);
}

#my-structures-modal .yd-new-assignment-row {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.24), rgba(34, 197, 94, 0.12));
}

.yd-structure-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.yd-structure-status-badge.is-ongoing {
    color: #065f46;
    background: rgba(16, 185, 129, 0.18);
    border-color: rgba(5, 150, 105, 0.34);
}

.yd-structure-status-badge.is-completed {
    color: #1e3a8a;
    background: rgba(96, 165, 250, 0.2);
    border-color: rgba(59, 130, 246, 0.34);
}

.yd-structure-status-badge.is-paused {
    color: #854d0e;
    background: rgba(250, 204, 21, 0.25);
    border-color: rgba(234, 179, 8, 0.42);
}

.yd-structure-status-badge.is-default {
    color: var(--text-soft);
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(100, 116, 139, 0.28);
}

.yd-structure-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin-bottom: 12px;
    overflow-x: hidden;
}

.yd-structure-info-file-item {
    border: 1px solid #d6deeb;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 8px;
}

.yd-structure-info-file-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-structure-info-file-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.yd-structure-info-file-actions .yd-button {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.yd-structure-info-file-actions .yd-action-icon-autocad,
.yd-structure-info-file-actions .yd-action-icon {
    width: 16px;
    height: 16px;
}

.yd-notification-detail-card h3 {
    margin: 4px 0 8px;
    font-size: 17px;
}

.yd-notification-detail-card p {
    margin: 0 0 10px;
    font-size: 14px;
}

.yd-notification-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    font-size: 14px;
    overflow-x: hidden;
}

.yd-location-manual-map-wrap {
    margin-top: 8px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #cfd9e8;
}

.yd-location-manual-map {
    width: 100%;
    min-height: 230px;
    height: 230px;
}

#archive-flow-modal .yd-modal-body,
#archive-pin-capture-modal .yd-modal-body {
    overflow-x: hidden !important;
}

#archive-pin-capture-modal .yd-modal-sheet {
    max-height: 94vh !important;
}

#archive-pin-capture-modal .yd-modal-body {
    max-height: calc(94vh - 120px) !important;
    overflow-y: auto !important;
}

@media (max-width: 768px) {
    #archive-flow-modal,
    #archive-pin-capture-modal {
        align-items: center;
        padding: 8px !important;
        overflow-x: hidden !important;
    }
    #archive-flow-modal .yd-modal-sheet,
    #archive-pin-capture-modal .yd-modal-sheet {
        width: calc(100vw - 16px) !important;
        max-height: calc(100vh - 16px) !important;
        border-radius: 14px !important;
    }
    #archive-flow-modal .yd-modal-body,
    #archive-pin-capture-modal .yd-modal-body {
        overflow-y: auto !important;
        overflow-x: hidden !important;
        max-height: calc(100vh - 150px) !important;
    }
    #archive-flow-modal .yd-inline {
        grid-template-columns: 1fr;
    }
    #archive-flow-modal .yd-answer-btn,
    #archive-pin-capture-modal .yd-button,
    #my-structures-modal .yd-button,
    #structure-info-modal .yd-button,
    #notification-detail-modal .yd-button,
    #notification-login-history-modal .yd-button,
    #location-route-modal .yd-button {
        min-height: 40px;
    }
    .yd-activity-filter-toolbar {
        grid-template-columns: 1fr 1fr;
    }
    .yd-activity-filter-toolbar .yd-button {
        min-height: 40px;
    }
    .yd-notification-badges {
        gap: 8px;
    }
    .yd-login-history-main {
        flex-direction: column;
        align-items: flex-start;
    }
    #archive-pin-capture-modal .yd-modal-foot {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .yd-structure-info-grid,
    .yd-notification-detail-grid {
        grid-template-columns: 1fr;
    }
    .yd-structure-info-file-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .yd-structure-info-file-actions .yd-button {
        min-height: 40px;
    }
    .yd-location-manual-map {
        min-height: 240px;
        height: 240px;
    }
}

@media (max-width: 480px) {
    #archive-flow-modal,
    #archive-pin-capture-modal {
        padding: 4px !important;
    }
    #archive-flow-modal .yd-modal-sheet,
    #archive-pin-capture-modal .yd-modal-sheet {
        width: calc(100vw - 8px) !important;
        height: calc(100vh - 8px) !important;
        max-height: calc(100vh - 8px) !important;
        border-radius: 12px !important;
    }
    #archive-flow-modal .yd-modal-head b,
    #archive-pin-capture-modal .yd-modal-head b,
    #my-structures-modal .yd-modal-head b,
    #structure-info-modal .yd-modal-head b,
    #notification-detail-modal .yd-modal-head b,
    #notification-login-history-modal .yd-modal-head b {
        font-size: 15px;
    }
    #archive-flow-modal .yd-subtitle,
    #archive-pin-capture-modal .yd-subtitle,
    #my-structures-modal .yd-subtitle,
    #structure-info-modal .yd-subtitle,
    #notification-detail-modal .yd-subtitle,
    #notification-login-history-modal .yd-subtitle {
        font-size: 13px;
    }
    .yd-activity-filter-toolbar {
        grid-template-columns: 1fr;
    }
    .yd-activity-filter-group .yd-select,
    .yd-activity-filter-group .yd-input,
    #activity-filter-reset-btn,
    #user-assign-save-btn {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-activity-type-badge,
    .yd-notification-badge {
        font-size: 12px;
    }
    .yd-login-history-main b {
        font-size: 13px;
    }
    .yd-login-history-main span {
        font-size: 13px;
    }
    #location-route-modal .yd-modal-head b {
        font-size: 15px;
    }
    #location-route-modal .yd-modal-head b .yd-action-icon {
        width: 16px;
        height: 16px;
    }
    #archive-flow-modal .yd-modal-body,
    #archive-pin-capture-modal .yd-modal-body {
        max-height: calc(100vh - 138px) !important;
    }
    .yd-structure-info-file-actions .yd-button {
        width: 100%;
        justify-content: center;
    }
    .yd-location-manual-map {
        min-height: 210px;
        height: 210px;
    }
}

.yd-icon-glyph { font-size: 18px; line-height: 1; }
.yd-icon-svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-user-btn {
    padding: 0;
    overflow: hidden;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 12px;
}

.yd-user-menu-photo {
    width: 100%;
    height: 100%;
    border-radius: 11px;
    object-fit: cover;
    border: 0;
}

.yd-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--danger), #f27987);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--surface);
    animation: ydBadgePulse 2.4s ease-in-out infinite;
}

@keyframes ydBadgePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(209, 69, 87, 0.45); }
    50%       { box-shadow: 0 0 0 5px rgba(209, 69, 87, 0); }
}

.yd-user-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.yd-user-caret-btn {
    width: 28px;
    min-width: 28px;
    height: 38px;
    min-height: 38px;
    padding: 0;
    color: var(--text-soft);
}

[data-theme="dark"] .yd-user-caret-btn {
    color: #b8c8de;
}

.yd-mobile-nav-toggle {
    display: none;
}

.yd-user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 230px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 8px;
    z-index: 10000012;
    transform-origin: top right;
    animation: ydMenuDropIn 0.16s ease;
}

.yd-user-item {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yd-user-item-icon {
    width: 20px;
    min-width: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    line-height: 1;
}

.yd-user-item:hover { background: rgba(64, 168, 223, 0.12); }
.yd-user-divider { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.yd-user-logout { color: var(--danger); }

.yd-user-menu-label {
    padding: 2px 10px 6px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-soft);
    letter-spacing: 0.2px;
}

.yd-mobile-nav-mode-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.yd-mobile-nav-mode-btn {
    min-height: 38px;
    text-align: center;
    border: 1px solid var(--border);
    border-radius: 9px;
    font-size: 13px;
    padding: 6px 8px;
}

.yd-mobile-nav-mode-btn.is-active {
    border-color: rgba(64, 168, 223, 0.52);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.18), rgba(69, 209, 191, 0.14));
    color: var(--primary);
}

[data-theme="dark"] .yd-mobile-nav-mode-btn {
    border-color: rgba(71, 85, 105, 0.7);
    color: #e2e8f0;
}

[data-theme="dark"] .yd-mobile-nav-mode-btn.is-active {
    border-color: rgba(96, 165, 250, 0.6);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(20, 184, 166, 0.26));
    color: #bfdbfe;
}

.yd-brand {
    font-size: 23px;
    font-weight: 800;
    letter-spacing: 0.2px;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
}

.yd-top-logo {
    display: block;
    height: 30px;
    width: auto;
    max-width: min(240px, 52vw);
    object-fit: contain;
}

.yd-topbar .yd-icon-btn {
    min-width: 38px;
    min-height: 38px;
    border-radius: 10px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
    transition: background 0.18s ease, color 0.18s ease;
}

.yd-topbar .yd-icon-btn:hover {
    transform: none;
    border-color: transparent;
    background: rgba(34, 126, 193, 0.12);
    box-shadow: none;
}

[data-theme="dark"] .yd-topbar .yd-icon-btn:hover {
    background: rgba(125, 211, 252, 0.16);
}

.yd-topbar .yd-theme-toggle-btn {
    min-height: 38px;
    min-width: 38px !important;
    width: 38px;
    padding: 7px !important;
    font-size: 0;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
}

.yd-topbar .yd-theme-toggle-btn:hover {
    transform: none;
    border-color: transparent;
    background: rgba(34, 126, 193, 0.12);
    box-shadow: none;
}

[data-theme="dark"] .yd-topbar .yd-theme-toggle-btn:hover {
    background: rgba(125, 211, 252, 0.16);
}

.yd-topbar .yd-theme-toggle-btn .yd-theme-icon {
    margin: 0;
}

.yd-topbar .yd-user-btn {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.yd-brand-base {
    color: var(--text);
}

.yd-brand-sep {
    color: var(--text-soft);
}

.yd-brand-current {
    color: var(--primary);
    font-weight: 900;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

[data-theme="dark"] .yd-brand-current {
    color: #6fc6f5;
    text-shadow: 0 1px 0 rgba(7, 15, 28, 0.9);
}

.yd-subtitle {
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    letter-spacing: 0.1px;
}

.yd-subtitle span {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(15,117,184,0.1), rgba(21,184,166,0.08));
    border: 1px solid rgba(15,117,184,0.18);
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

[data-theme="dark"] .yd-subtitle span {
    background: linear-gradient(135deg, rgba(64,168,223,0.14), rgba(69,209,191,0.1));
    border-color: rgba(64,168,223,0.25);
    color: #6fc6f5;
}

.yd-button {
    border: 0;
    border-radius: 12px;
    min-height: 42px;
    padding: 10px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 117, 184, 0.28), inset 0 1px 0 rgba(255,255,255,0.18);
    transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease, filter 0.18s ease;
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.yd-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15, 117, 184, 0.34), inset 0 1px 0 rgba(255,255,255,0.22);
    filter: brightness(1.05);
}

.yd-button:active {
    transform: translateY(0) scale(0.97);
    box-shadow: 0 4px 10px rgba(15, 117, 184, 0.2);
    filter: brightness(0.97);
}

.yd-button.secondary {
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.yd-button.yd-close-red {
    background: linear-gradient(135deg, #ef4444, #b91c1c) !important;
    color: #fff !important;
    border: 1px solid #991b1b !important;
    box-shadow: 0 8px 16px rgba(185, 28, 28, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.16) !important;
}

.yd-button.yd-close-red:hover {
    background: linear-gradient(135deg, #f05252, #c81e1e) !important;
    border-color: #7f1d1d !important;
}

.yd-button.yd-close-red:active {
    box-shadow: 0 4px 10px rgba(153, 27, 27, 0.28) !important;
}

[data-theme="dark"] .yd-button.yd-close-red {
    background: linear-gradient(135deg, #f87171, #dc2626) !important;
    color: #fff !important;
    border-color: #b91c1c !important;
    box-shadow: 0 8px 16px rgba(220, 38, 38, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.14) !important;
}

.yd-theme-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-width: 100px;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2)) !important;
    border: 1px solid var(--border) !important;
    border-radius: 999px !important;
    padding: 8px 14px !important;
    font-size: 13px;
    font-weight: 700;
    color: var(--text) !important;
    box-shadow: 0 2px 8px rgba(20,48,85,0.08) !important;
    transition: transform 0.16s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.18s ease, border-color 0.18s ease !important;
}

.yd-theme-toggle-btn:hover {
    transform: translateY(-1px) !important;
    border-color: rgba(64,168,223,0.4) !important;
    box-shadow: 0 6px 16px rgba(20,48,85,0.13), 0 0 0 3px rgba(64,168,223,0.1) !important;
}

.yd-theme-icon {
    width: 18px;
    height: 18px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yd-theme-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-import-excel-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yd-import-excel-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
}

.yd-import-excel-icon svg {
    width: 16px;
    height: 16px;
    stroke: #1e88e5;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-import-excel-icon svg path:nth-child(2) {
    stroke: #26a69a;
}

.yd-import-excel-icon svg path:nth-child(3),
.yd-import-excel-icon svg path:nth-child(4) {
    stroke: #ff8a3d;
}

.yd-add-structure-icon {
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yd-add-structure-icon svg {
    width: 16px;
    height: 16px;
    stroke: #fff;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-button.danger {
    background: linear-gradient(135deg, var(--danger), #e46e7e);
    box-shadow: 0 6px 16px rgba(209, 69, 87, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
}

.yd-button.danger:hover {
    box-shadow: 0 12px 24px rgba(209, 69, 87, 0.38), inset 0 1px 0 rgba(255,255,255,0.2);
}

.yd-button.success {
    background: linear-gradient(135deg, var(--success), #45cb89);
    box-shadow: 0 6px 16px rgba(24, 155, 97, 0.28), inset 0 1px 0 rgba(255,255,255,0.16);
}

.yd-button.success:hover {
    box-shadow: 0 12px 24px rgba(24, 155, 97, 0.38), inset 0 1px 0 rgba(255,255,255,0.2);
}

.yd-admin-option-box {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    font-size: 14px;
}

.yd-admin-option-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.yd-auth-wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 14px 22px 40px;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    gap: 20px;
}

.yd-auth-wrap-single {
    max-width: 840px;
    grid-template-columns: 1fr;
}

.yd-hero,
.yd-card {
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.yd-hero {
    padding: 28px;
    position: relative;
    overflow: hidden;
}

.yd-hero:before {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    right: -60px;
    top: -70px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 138, 61, 0.28), transparent 70%);
}

.yd-hero h1 {
    margin: 0 0 10px;
    font-size: 31px;
    line-height: 1.18;
}

.yd-hero p {
    margin: 0 0 12px;
    color: var(--text-soft);
    font-size: 15px;
}

.yd-feature-list {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.yd-feature-list li {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 600;
}

.yd-card { padding: 22px; }
.yd-card h2 {
    margin: 0 0 12px;
    font-size: 24px;
    line-height: 1.2;
}

.yd-field { margin-bottom: 12px; }

.yd-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
    font-size: 13px;
    color: var(--text);
}

.yd-label-with-icon {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.yd-label-help {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-soft);
}

.yd-label-icon {
    width: 14px;
    height: 14px;
    background-repeat: no-repeat;
    background-size: 14px 14px;
    background-position: center;
    flex: 0 0 14px;
    opacity: 0.9;
}

.yd-label-icon-city {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M5 21V7l7-4 7 4v14'/%3E%3Cpath d='M9 10h.01M12 10h.01M15 10h.01M9 14h.01M12 14h.01M15 14h.01'/%3E%3C/svg%3E");
}

.yd-label-icon-company {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h5'/%3E%3C/svg%3E");
}

.yd-label-icon-address {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-5.7 7-12a7 7 0 1 0-14 0c0 6.3 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.5'/%3E%3C/svg%3E");
}

.yd-label-icon-tax-office {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10h18'/%3E%3Cpath d='M5 10V6l7-3 7 3v4'/%3E%3Cpath d='M5 10v8M9 10v8M15 10v8M19 10v8M3 18h18'/%3E%3C/svg%3E");
}

.yd-label-icon-tax-no {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cpath d='M8 8h8M8 12h8M8 16h6'/%3E%3C/svg%3E");
}

.yd-label-icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

.yd-label-icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f172a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 16.9v3a2 2 0 0 1-2.2 2A19.8 19.8 0 0 1 3.1 5.2 2 2 0 0 1 5.1 3h3a2 2 0 0 1 2 1.7c.1 1 .4 2 .8 2.9a2 2 0 0 1-.5 2.1L9.2 11a16 16 0 0 0 3.8 3.8l1.3-1.3a2 2 0 0 1 2.1-.5c.9.4 1.9.7 2.9.8A2 2 0 0 1 22 16.9z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .yd-label-icon-city,
[data-theme="dark"] .yd-label-icon-company,
[data-theme="dark"] .yd-label-icon-address,
[data-theme="dark"] .yd-label-icon-tax-office,
[data-theme="dark"] .yd-label-icon-tax-no,
[data-theme="dark"] .yd-label-icon-email,
[data-theme="dark"] .yd-label-icon-phone {
    filter: brightness(0) saturate(100%) invert(90%) sepia(8%) saturate(597%) hue-rotate(187deg) brightness(101%) contrast(102%);
}

.yd-input, .yd-select, .yd-textarea {
    width: 100%;
    min-height: 42px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 14px;
    padding: 10px 12px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    color-scheme: light;
}

[data-theme="dark"] .yd-input,
[data-theme="dark"] .yd-select,
[data-theme="dark"] .yd-textarea {
    color-scheme: dark;
    background: var(--surface-2);
    color: var(--text);
}

/* Select option'larının dark modda arka planı */
[data-theme="dark"] .yd-select option,
[data-theme="dark"] select option {
    background: #1d2c43;
    color: #edf3ff;
}

[data-theme="dark"] .yd-select option:disabled,
[data-theme="dark"] select option:disabled {
    color: #6b7f99;
}

.yd-input:focus, .yd-select:focus, .yd-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 168, 223, 0.18), inset 0 1px 3px rgba(64, 168, 223, 0.08);
    background: linear-gradient(180deg, var(--surface), var(--surface-3));
}

.yd-textarea {
    min-height: 98px;
    resize: vertical;
}

.yd-inline {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.yd-message {
    margin-top: 10px;
    min-height: 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-soft);
}

.yd-register-flow-card {
    position: relative;
}

.yd-register-steps {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0 18px;
}

.yd-register-step {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--text-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
}

.yd-register-step.is-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    border-color: rgba(64, 168, 223, 0.38);
    color: #fff;
}

.yd-register-step.is-done {
    background: linear-gradient(135deg, #15a375, #18c790);
    border-color: rgba(21, 163, 117, 0.45);
    color: #fff;
}

.yd-register-step-line {
    flex: 1;
    min-width: 14px;
    height: 2px;
    background: var(--border);
    border-radius: 4px;
}

.yd-register-step-content {
    display: none;
}

.yd-register-step-content.is-active {
    display: block;
}

.yd-register-step-title {
    margin: 0 0 12px;
    font-size: 20px;
    line-height: 1.2;
}

.yd-register-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.yd-register-summary-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    padding: 10px;
    display: grid;
    gap: 6px;
}

.yd-register-summary-item span {
    font-size: 12px;
    color: var(--text-soft);
}

.yd-register-summary-item b {
    font-size: 14px;
    color: var(--text);
}

.yd-field-help {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.4;
    color: var(--text-soft);
}

.yd-register-note {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.45;
    padding: 10px 12px;
}

.yd-register-verify-text {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--text-soft);
    line-height: 1.45;
}

.yd-register-code-input {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 12px;
}

.yd-code-digit {
    width: 46px;
    min-width: 46px;
    min-height: 52px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    text-align: center;
    font-size: 20px;
    font-weight: 800;
    outline: none;
}

.yd-code-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 168, 223, 0.18);
}

.yd-register-verify-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.yd-register-timer {
    font-size: 12px;
    color: var(--text-soft);
}

.yd-register-confirm {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    padding: 12px;
    display: grid;
    gap: 8px;
}

.yd-register-confirm-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    border-bottom: 1px dashed rgba(160, 176, 201, 0.35);
    padding-bottom: 6px;
}

.yd-register-confirm-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.yd-register-confirm-row span {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-register-confirm-row b {
    font-size: 13px;
    color: var(--text);
    text-align: right;
}

.yd-register-actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.yd-register-actions .yd-button {
    min-height: 40px;
}

.yd-register-success-sheet {
    max-width: 520px;
    width: min(520px, calc(100vw - 24px));
}

.yd-register-success-lead {
    margin: 0 0 12px;
    font-size: 15px;
    color: var(--text);
    line-height: 1.5;
}

.yd-register-success-summary {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    padding: 12px;
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.yd-register-success-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px dashed rgba(160, 176, 201, 0.35);
    padding-bottom: 6px;
}

.yd-register-success-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.yd-register-success-row span {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-register-success-row b {
    font-size: 14px;
    color: var(--text);
    text-align: right;
    word-break: break-word;
}

.yd-register-success-note {
    margin: 0;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-soft);
}

#register-success-modal .yd-modal-foot .yd-button {
    min-height: 44px;
    width: 100%;
}

.yd-combobox {
    position: relative;
    width: 100%;
}

.yd-combobox-input {
    padding-right: 46px;
}

.yd-combobox-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);
    width: 30px;
    min-height: 30px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-soft);
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.yd-combobox-toggle:hover {
    color: var(--text);
    border-color: var(--border);
    background: var(--surface-2);
}

.yd-combobox.is-open .yd-combobox-toggle {
    color: var(--primary-2);
}

.yd-combobox-panel {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-md);
    max-height: 250px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 40;
}

.yd-combobox-option {
    width: 100%;
    min-height: 40px;
    border: 0;
    border-bottom: 1px solid rgba(173, 184, 201, 0.35);
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.yd-combobox-option:last-child {
    border-bottom: 0;
}

.yd-combobox-option:hover {
    background: var(--surface-2);
}

.yd-combobox-empty {
    min-height: 40px;
    display: flex;
    align-items: center;
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-soft);
}

[data-theme="dark"] .yd-combobox-panel {
    background: var(--surface-2);
}

[data-theme="dark"] .yd-combobox-option {
    border-bottom-color: rgba(125, 145, 173, 0.35);
}

@media (max-width: 768px) {
    .yd-combobox-toggle {
        width: 32px;
        min-height: 32px;
        font-size: 18px;
    }

    .yd-combobox-panel {
        max-height: 230px;
    }
}

@media (max-width: 480px) {
    .yd-combobox-input {
        padding-right: 42px;
    }

    .yd-combobox-toggle {
        right: 7px;
        width: 30px;
        min-height: 30px;
        font-size: 17px;
    }

    .yd-combobox-panel {
        max-height: 210px;
    }

    .yd-combobox-option,
    .yd-combobox-empty {
        font-size: 13px;
    }
}

.yd-form-section-title {
    margin-top: 10px;
    margin-bottom: 2px;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--primary);
    font-size: 15px;
    font-weight: 800;
}

.yd-import-result {
    margin-top: 8px;
    max-height: 220px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface-2);
    padding: 6px;
}

.yd-import-result-item {
    font-size: 13px;
    line-height: 1.45;
    color: var(--text);
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(64, 168, 223, 0.08);
    margin-bottom: 6px;
    word-break: break-word;
}

.yd-import-result-item:last-child {
    margin-bottom: 0;
}

.yd-yds-import-guide {
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(160deg, rgba(14, 165, 233, 0.08), rgba(16, 185, 129, 0.06));
    padding: 10px;
    display: grid;
    gap: 10px;
}

.yd-yds-import-guide-text b {
    display: block;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 4px;
}

.yd-yds-import-guide-text span {
    display: block;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-soft);
}

.yd-yds-import-guide-image-wrap {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 6px;
    display: flex;
    justify-content: center;
}

.yd-yds-import-guide-image {
    width: min(100%, 300px);
    height: auto;
    border-radius: 8px;
    display: block;
}

[data-theme="dark"] .yd-yds-import-guide {
    background: linear-gradient(160deg, rgba(37, 99, 235, 0.2), rgba(13, 148, 136, 0.14));
}

@media (max-width: 768px) {
    .yd-register-step-title {
        font-size: 18px;
    }

    .yd-register-summary-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .yd-register-step {
        width: 32px;
        min-width: 32px;
        min-height: 32px;
        font-size: 13px;
    }

    .yd-register-step-line {
        min-width: 8px;
    }

    .yd-code-digit {
        width: 44px;
        min-width: 44px;
        min-height: 50px;
        font-size: 19px;
    }

    .yd-register-confirm-row span,
    .yd-register-confirm-row b {
        font-size: 13px;
    }

    .yd-register-actions {
        justify-content: stretch;
    }

    .yd-register-actions .yd-button {
        flex: 1 1 0;
        min-height: 40px;
    }

    .yd-register-success-lead {
        font-size: 15px;
    }

    .yd-register-success-row span,
    .yd-register-success-row b,
    .yd-register-success-note {
        font-size: 13px;
    }

    #register-success-modal .yd-modal-sheet {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 24px);
    }

    .yd-yds-import-guide {
        padding: 9px;
        gap: 8px;
    }

    .yd-yds-import-guide-text b {
        font-size: 14px;
    }

    .yd-yds-import-guide-text span {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .yd-register-step-title {
        font-size: 16px;
    }

    .yd-field-help {
        font-size: 13px;
    }

    .yd-register-steps {
        gap: 5px;
    }

    .yd-register-step {
        width: 28px;
        min-width: 28px;
        min-height: 28px;
        font-size: 12px;
    }

    .yd-code-digit {
        width: 38px;
        min-width: 38px;
        min-height: 46px;
        font-size: 18px;
        border-radius: 10px;
    }

    .yd-register-verify-text,
    .yd-register-note,
    .yd-field-help,
    .yd-register-confirm-row span,
    .yd-register-confirm-row b {
        font-size: 13px;
    }

    .yd-register-actions .yd-button {
        width: 100%;
        min-height: 44px;
    }

    .yd-register-success-lead {
        font-size: 15px;
    }

    .yd-register-success-row b {
        font-size: 13px;
    }

    #register-success-modal .yd-modal-sheet {
        width: calc(100vw - 16px);
    }

    #register-success-modal .yd-modal-foot .yd-button {
        min-height: 44px;
    }

    .yd-yds-import-guide {
        padding: 8px;
    }

    .yd-yds-import-guide-image-wrap {
        padding: 5px;
    }

    .yd-yds-import-guide-image {
        width: min(100%, 240px);
    }

    .yd-yds-import-guide-text b,
    .yd-yds-import-guide-text span {
        font-size: 13px;
    }
}

.yd-layout {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 20px 28px 0;
    display: grid;
    grid-template-columns: 66px minmax(0, 1fr);
    gap: 16px;
    transition: grid-template-columns 0.2s ease;
}

.yd-main {
    min-width: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.yd-shell.yd-sidebar-expanded .yd-layout {
    grid-template-columns: 286px minmax(0, 1fr);
}

.yd-layout-topnav {
    display: block;
    max-width: 1400px;
}

.yd-layout-topnav .yd-main {
    width: 100%;
}

.yd-top-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 5px 6px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
}

.yd-top-nav-btn {
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-soft);
    border-radius: 10px;
    min-height: 38px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    position: relative;
    transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
    letter-spacing: 0.1px;
}

.yd-top-nav-btn:hover {
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    border-color: var(--border);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(20, 48, 85, 0.08);
}

.yd-top-nav-btn.active {
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.18), rgba(69, 209, 191, 0.15));
    border-color: rgba(64, 168, 223, 0.45);
    color: var(--primary);
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(64, 168, 223, 0.18);
}

[data-theme="dark"] .yd-top-nav {
    background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}

[data-theme="dark"] .yd-top-nav-btn.active {
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.22), rgba(69, 209, 191, 0.18));
    border-color: rgba(64, 168, 223, 0.5);
    color: #6fc6f5;
}

.yd-sidebar {
    width: 66px;
    background: linear-gradient(180deg, #1d9fe8 0%, #1179cc 55%, #0d6ab8 100%);
    border: 0;
    border-radius: 0;
    padding: 10px 0;
    box-shadow: 4px 0 24px rgba(8, 73, 124, 0.22), inset -1px 0 0 rgba(255,255,255,0.08);
    position: relative;
    overflow: visible;
    z-index: 20;
}

.yd-sidebar-head {
    display: none;
}

.yd-sidebar-head-copy {
    min-width: 0;
}

.yd-sidebar-title {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    color: #0f172a;
}

.yd-sidebar-sub {
    margin-top: 2px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.75);
}

.yd-sidebar-pin-btn {
    min-height: 34px;
    min-width: 34px;
    border-radius: 10px;
    border: 1px solid rgba(30, 58, 138, 0.22);
    background: rgba(255, 255, 255, 0.76);
    color: #1e3a8a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.yd-sidebar-pin-btn svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-sidebar-pin-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(30, 58, 138, 0.42);
    background: #ffffff;
}

.yd-sidebar-panel {
    position: absolute;
    top: 8px;
    left: 6px;
    width: 276px;
    bottom: 8px;
    border-radius: 16px;
    border: 1px solid rgba(203, 213, 225, 0.95);
    background: #f8fafc;
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
    opacity: 0;
    transform: translateX(-10px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.yd-nav-btn {
    width: 52px;
    border: 1px solid transparent;
    background: transparent;
    color: rgba(255,255,255,0.72);
    text-align: left;
    border-radius: 12px;
    min-height: 50px;
    padding: 0 0 0 10px;
    margin: 0 0 6px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, width 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    position: relative;
    z-index: 1;
}

.yd-nav-btn::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 3px;
    height: 55%;
    border-radius: 0 3px 3px 0;
    background: rgba(255,255,255,0.9);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yd-nav-btn:hover {
    transform: translateX(1px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.14));
    border-color: rgba(255, 255, 255, 0.38);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(8, 73, 124, 0.34), 0 0 0 2px rgba(255, 255, 255, 0.12);
}

.yd-nav-btn.active {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(8, 73, 124, 0.35), inset 0 1px 0 rgba(255,255,255,0.18);
}

.yd-nav-btn.active::before {
    transform: translateY(-50%) scaleY(1);
}

.yd-nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    flex: 0 0 32px;
    transition: background 0.18s ease;
}

.yd-nav-copy {
    display: none;
    min-width: 0;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.yd-nav-title {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yd-nav-sub {
    display: block;
    margin-top: 3px;
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yd-nav-btn.active .yd-nav-icon {
    background: rgba(255,255,255,0.15);
}

.yd-nav-icon svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-shell.yd-sidebar-expanded .yd-sidebar-panel {
    opacity: 1;
    transform: translateX(0);
}

.yd-shell.yd-sidebar-expanded .yd-sidebar {
    width: 286px;
    background: transparent;
    box-shadow: none;
}

.yd-shell.yd-sidebar-expanded .yd-sidebar-pin-btn {
    border-color: rgba(59, 130, 246, 0.38);
}

.yd-shell.yd-sidebar-pinned .yd-sidebar-pin-btn {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(20, 184, 166, 0.14));
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn {
    width: 264px;
    border-color: transparent;
    background: transparent;
    color: #0f172a;
    box-shadow: none;
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn:hover {
    transform: translateX(4px);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(6, 182, 212, 0.1));
    border-color: rgba(37, 99, 235, 0.28);
    box-shadow: 0 10px 20px rgba(11, 99, 255, 0.16);
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn.active {
    background: transparent;
    color: #0b63ff;
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn.active::before {
    background: #1d4ed8;
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn .yd-nav-icon {
    background: transparent;
    color: #2563eb;
}

.yd-shell.yd-sidebar-expanded .yd-nav-btn:not(.active):hover .yd-nav-icon {
    color: #0b63ff;
    filter: drop-shadow(0 0 8px rgba(11, 99, 255, 0.34));
}

.yd-shell.yd-sidebar-expanded .yd-nav-copy {
    display: block;
    opacity: 1;
    transform: translateX(0);
}

.yd-mobile-sidebar-backdrop {
    position: fixed;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(15, 23, 42, 0.48);
    z-index: 10000009;
    cursor: pointer;
}

[data-theme="dark"] .yd-sidebar-panel {
    border-color: rgba(71, 85, 105, 0.74);
    background: #0f172a;
}

[data-theme="dark"] .yd-sidebar-title {
    color: #e2e8f0;
}

[data-theme="dark"] .yd-sidebar-sub {
    color: rgba(226, 232, 240, 0.72);
}

[data-theme="dark"] .yd-nav-title {
    color: #e2e8f0;
}

[data-theme="dark"] .yd-nav-sub {
    color: #94a3b8;
}

[data-theme="dark"] .yd-shell.yd-sidebar-expanded .yd-nav-btn {
    border-color: transparent;
    background: transparent;
    color: #e2e8f0;
}

[data-theme="dark"] .yd-shell.yd-sidebar-expanded .yd-nav-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.22), rgba(6, 182, 212, 0.18));
    border-color: rgba(147, 197, 253, 0.42);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.38), 0 0 0 1px rgba(147, 197, 253, 0.18) inset;
}

[data-theme="dark"] .yd-shell.yd-sidebar-expanded .yd-nav-btn:not(.active):hover .yd-nav-icon {
    color: #93c5fd;
}

[data-theme="dark"] .yd-shell.yd-sidebar-expanded .yd-nav-btn.active {
    background: transparent;
    color: #bfdbfe;
}

.yd-location-toolbar {
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.yd-location-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-location-filters {
    margin-top: 10px;
}

.yd-location-layout {
    margin-top: 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 12px;
    align-items: stretch;
}

.yd-location-map-wrap {
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

#yd-structures-map {
    width: 100%;
    min-height: 460px;
}

.yd-location-list {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 10px;
    overflow: auto;
    max-height: 460px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.yd-location-item {
    width: 100%;
    border: 1px solid rgba(20, 128, 116, 0.28);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 8px;
    text-align: left;
    background: rgba(20, 184, 166, 0.08);
    color: var(--text);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.yd-location-item:hover {
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(15, 118, 110, 0.45);
    transform: translateY(-1px);
}

.yd-location-item.active {
    border-color: #0f766e;
    background: rgba(20, 184, 166, 0.2);
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.18);
}

.yd-location-item-title {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
}

.yd-location-item-meta {
    margin-top: 4px;
    font-size: 13px;
    color: var(--text-soft);
}

.yd-location-status {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.yd-location-status.ready {
    background: rgba(16, 185, 129, 0.18);
    color: #0f766e;
}

.yd-location-status.pending {
    background: rgba(251, 191, 36, 0.24);
    color: #92400e;
}

.yd-location-status.failed {
    background: rgba(239, 68, 68, 0.16);
    color: #b91c1c;
}

.yd-location-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-soft);
    font-size: 13px;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 12px;
}

.yd-map-tooltip {
    min-width: 180px;
    border-radius: 12px;
    border: 1px solid rgba(15, 118, 110, 0.26);
    background: linear-gradient(180deg, #ffffff, #f0fdfa);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
    padding: 8px 10px;
    font-size: 12px;
    line-height: 1.32;
    color: #0f172a;
}

.yd-map-tooltip b {
    display: block;
    font-size: 13px;
    line-height: 1.35;
    margin-top: 1px;
}

.yd-map-tooltip-row + .yd-map-tooltip-row {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(15, 118, 110, 0.18);
}

.yd-map-tooltip-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: #0f766e;
}

.yd-map-pin {
    width: 30px;
    height: 42px;
    position: relative;
    --yd-pin-start: #14b8a6;
    --yd-pin-end: #0f766e;
}

.yd-map-pin::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    width: 24px;
    height: 24px;
    border-radius: 50% 50% 50% 0;
    transform: translateX(-50%) rotate(-45deg);
    background: linear-gradient(135deg, var(--yd-pin-start), var(--yd-pin-end));
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.28);
}

.yd-map-pin::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 6px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    transform: translateX(-50%);
    background: #ffffff;
}

.yd-map-pin.selected::before {
    background: linear-gradient(135deg, var(--yd-pin-start), var(--yd-pin-end));
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28), 0 8px 16px rgba(15, 23, 42, 0.3);
}

.yd-location-modal-block {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(20, 184, 166, 0.08), rgba(15, 118, 110, 0.08));
}

.yd-location-modal-title {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.4;
}

.yd-location-modal-line {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.yd-main .yd-card {
    padding: 18px;
    margin-bottom: 12px;
}

.yd-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.yd-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.yd-overview-head h2 {
    margin: 0;
}

.yd-overview-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    padding: 7px;
    border: 1px solid rgba(64, 168, 223, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.08), rgba(69, 209, 191, 0.08));
}

[data-theme="dark"] .yd-overview-actions {
    border-color: rgba(111, 198, 245, 0.28);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.18), rgba(69, 209, 191, 0.14));
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
}

.yd-chart-grid {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.yd-chart-card {
    border: 1px solid var(--border);
    border-top: 3px solid var(--primary);
    border-radius: 16px;
    padding: 18px;
    background: linear-gradient(160deg, var(--surface) 60%, var(--surface-2) 100%);
    box-shadow: 0 4px 6px rgba(20, 48, 85, 0.04), 0 10px 28px rgba(20, 48, 85, 0.09);
    transition: box-shadow 0.22s ease, transform 0.22s ease;
}

.yd-chart-card:hover {
    box-shadow: 0 8px 16px rgba(20, 48, 85, 0.08), 0 20px 40px rgba(20, 48, 85, 0.13);
    transform: translateY(-2px);
}

[data-theme="dark"] .yd-chart-card {
    border-top-color: var(--primary);
    box-shadow: 0 4px 8px rgba(0,0,0,0.22), 0 14px 32px rgba(0,0,0,0.28);
}

.yd-chart-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}

.yd-chart-head h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.1px;
    color: var(--text);
}

.yd-chart-sub {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-chart-area {
    margin-top: 4px;
    min-height: 240px;
}

.yd-mini-empty {
    min-height: 220px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--text-soft);
    text-align: center;
    padding: 12px;
}

.yd-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    flex: 0 0 11px;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.yd-bar-chart {
    width: 100%;
    height: 220px;
}

.yd-chart-premium-wrap {
    display: grid;
    grid-template-columns: 248px 1fr;
    gap: 20px;
    align-items: center;
}

.yd-chart-premium-wrap.only-donut {
    grid-template-columns: 1fr;
    gap: 0;
}

.yd-chart-donut-panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

.yd-chart-list {
    display: grid;
    gap: 7px;
}

.yd-chart-list-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;
    min-height: 36px;
    padding: 6px 8px;
    border: 1px solid rgba(120, 144, 156, 0.22);
    border-radius: 10px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(247, 250, 255, 0.85));
}

.yd-chart-list-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-size: 13px;
    font-weight: 700;
}

.yd-chart-list-label span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yd-chart-list-value {
    font-size: 13px;
    font-weight: 800;
    color: var(--text);
    text-align: right;
    white-space: nowrap;
}

.yd-chart-list-value span {
    color: var(--text);
    opacity: 0.84;
    font-weight: 800;
}

.yd-donut-slice-pct {
    fill: #ffffff;
    font-size: 11px;
    font-weight: 800;
    paint-order: stroke fill;
    stroke: rgba(15, 34, 58, 0.48);
    stroke-width: 2px;
    pointer-events: none;
}

[data-theme="dark"] .yd-chart-list-row {
    border-color: rgba(95, 139, 190, 0.38);
    background: linear-gradient(145deg, rgba(28, 48, 78, 0.88), rgba(21, 38, 64, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 16px rgba(6, 12, 24, 0.28);
}

[data-theme="dark"] .yd-chart-list-label {
    color: #d7e7ff;
}

[data-theme="dark"] .yd-chart-list-value {
    color: #f3f8ff;
}

[data-theme="dark"] .yd-color-dot {
    box-shadow: 0 0 0 2px rgba(12, 24, 42, 0.75);
}

[data-theme="dark"] .yd-form-section-title {
    border-color: rgba(95, 139, 190, 0.42);
    background: linear-gradient(145deg, rgba(28, 48, 78, 0.85), rgba(21, 38, 64, 0.9));
    color: #79c8f3;
}

[data-theme="dark"] .yd-import-result {
    border-color: rgba(95, 139, 190, 0.38);
    background: rgba(18, 31, 50, 0.88);
}

[data-theme="dark"] .yd-import-result-item {
    color: #e8f2ff;
    background: rgba(64, 168, 223, 0.18);
}

.yd-pie-chart {
    width: 232px;
    height: 232px;
}

.yd-control-activity-toolbar {
    margin: 6px 0 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: space-between;
}

.yd-control-period-group {
    display: grid;
    gap: 6px;
    min-width: 180px;
}

.yd-control-period-select {
    min-height: 40px;
    width: 100%;
}

.yd-modal,
.yd-modal-sheet {
    overscroll-behavior: contain;
}

.yd-control-range-group {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.yd-control-range-group .yd-input {
    min-height: 40px;
}

.yd-m2-activity-shell {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 12px;
    align-items: start;
}

.yd-user-cloud-wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 4px 0 0;
    min-height: 250px;
}

.yd-user-cloud-title {
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 8px;
}

.yd-user-cloud-canvas {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 12px 10px;
    min-height: 200px;
    overflow: visible;
}

.yd-cloud-item {
    position: relative;
    transform: none;
    border: 0;
    background: transparent;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    cursor: pointer;
    min-height: 40px;
    min-width: 72px;
    padding: 2px 3px;
}

.yd-cloud-avatar-wrap {
    position: relative;
    display: inline-flex;
}

.yd-cloud-avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 8px 16px rgba(20, 48, 85, 0.22);
}

.yd-cloud-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e88e5, #26a69a);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.yd-cloud-name {
    max-width: 90px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.15;
}

.yd-cloud-meta {
    font-size: 11px;
    color: var(--text-soft);
    font-weight: 700;
}

.yd-cloud-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e53935, #ef5350);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    border: 2px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.yd-control-link {
    min-height: 40px;
    border: 0;
    background: transparent;
    color: #1e88e5;
    font-weight: 800;
    cursor: pointer;
    text-align: left;
    padding: 0;
}

.yd-control-link:hover {
    color: #26a69a;
    text-decoration: underline;
}

.yd-control-user-table-wrap {
    overflow: auto;
    margin-top: 10px;
    max-width: 100%;
}

.yd-control-user-table th,
.yd-control-user-table td {
    font-size: 13px;
}

.yd-archive-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-list-archive td:first-child {
    font-weight: 700;
    color: var(--text-soft);
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
}

.yd-list-archive .yd-archive-clickable-row {
    cursor: pointer;
    transition: background-color .18s ease, box-shadow .18s ease, transform .18s ease;
    position: relative;
}

/* Sol kenarda teal indicator — hover'da belirginleşir */
.yd-list-archive .yd-archive-clickable-row td:first-child {
    border-left: 3px solid transparent;
    transition: border-color .18s ease;
}

.yd-list-archive .yd-archive-clickable-row:hover td:first-child {
    border-left-color: #14b8a6;
}

.yd-list-archive .yd-archive-clickable-row:hover {
    background: rgba(20, 184, 166, 0.09);
    box-shadow: 0 2px 10px rgba(20, 184, 166, 0.1);
}

.yd-list-archive .yd-archive-clickable-row:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: -2px;
}

/* Bugün — yeşil sol şerit + hafif yeşil tint */
.yd-list-archive tr.yd-archive-row-today td:first-child {
    border-left: 3px solid #22c55e !important;
}

.yd-list-archive tr.yd-archive-row-today td {
    background: rgba(34, 197, 94, 0.1);
}

.yd-list-archive tr.yd-archive-row-today td:first-child::before {
    content: "Bugün";
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 800;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.18);
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
    margin-right: 4px;
    letter-spacing: 0.2px;
    animation: ydTodayBadgeBlink 1.05s ease-in-out infinite;
}

@keyframes ydTodayBadgeBlink {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.32;
        filter: brightness(1.08);
    }
}

@media (prefers-reduced-motion: reduce) {
    .yd-list-archive tr.yd-archive-row-today td:first-child::before,
    .yd-list-archive tr.yd-archive-row-yesterday td:first-child::before {
        animation: none;
    }
}

/* Dün — amber sol şerit */
.yd-list-archive tr.yd-archive-row-yesterday td:first-child {
    border-left: 3px solid #f59e0b !important;
}

.yd-list-archive tr.yd-archive-row-yesterday td {
    background: rgba(245, 158, 11, 0.1);
}

.yd-list-archive tr.yd-archive-row-yesterday td:first-child::before {
    content: "Dün";
    display: inline-block;
    margin-left: 4px;
    font-size: 10px;
    font-weight: 800;
    color: #b45309;
    background: rgba(245, 158, 11, 0.2);
    border-radius: 4px;
    padding: 1px 5px;
    vertical-align: middle;
    margin-right: 4px;
    letter-spacing: 0.2px;
    animation: ydYesterdayBadgeBlink 1.05s ease-in-out infinite;
}

@keyframes ydYesterdayBadgeBlink {
    0%, 100% {
        opacity: 1;
        filter: brightness(1);
    }
    50% {
        opacity: 0.32;
        filter: brightness(1.06);
    }
}

.yd-list-archive tr.yd-archive-row-today:hover td {
    background: rgba(34, 197, 94, 0.17);
}

.yd-list-archive tr.yd-archive-row-yesterday:hover td {
    background: rgba(245, 158, 11, 0.18);
}

[data-theme="dark"] .yd-list-archive tr.yd-archive-row-today td:first-child::before {
    background: rgba(34, 197, 94, 0.22);
    color: #4ade80;
}

[data-theme="dark"] .yd-list-archive tr.yd-archive-row-yesterday td:first-child::before {
    background: rgba(245, 158, 11, 0.26);
    color: #fbbf24;
}

.yd-list-archive tr.yd-longpress-active {
    border-color: rgba(220, 38, 38, 0.85);
    animation: ydLongPressBlink 0.7s ease-in-out infinite;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.yd-list-archive tr.yd-context-flash {
    border-color: rgba(220, 38, 38, 0.9);
    animation: ydLongPressBlink 0.55s ease-in-out 1;
}

.yd-list-archive td[data-label="İşlemler"] {
    width: 1%;
    white-space: nowrap;
}

.yd-archive-pdf-inline-btn {
    min-height: 40px;
    min-width: 88px;
    padding: 7px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
}

.yd-archive-actions-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.yd-archive-toolbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yd-archive-toolbar-actions .yd-button {
    min-height: 40px;
}

.yd-archive-zip-body {
    display: grid;
    gap: 10px;
}

.yd-archive-zip-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yd-archive-zip-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.yd-archive-zip-delivery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#archive-zip-current-structure {
    margin-top: 2px;
    font-size: 13px;
}

@media (max-width: 768px) {
    .yd-archive-toolbar-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .yd-archive-zip-grid {
        grid-template-columns: 1fr;
    }

    .yd-archive-zip-sheet {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
    }

    #archive-zip-start-btn,
    #archive-zip-download-btn {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .yd-archive-toolbar-actions {
        width: 100%;
        justify-content: stretch;
    }

    .yd-archive-toolbar-actions .yd-button {
        width: 100%;
    }

    .yd-archive-zip-sheet {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
    }

    .yd-archive-zip-delivery .yd-chip {
        width: 100%;
        min-height: 40px;
    }

    #archive-zip-current-structure {
        font-size: 13px;
    }
}

.yd-archive-actions-wrap .yd-action-btn {
    min-height: 40px;
    min-width: 40px;
    padding: 8px 10px;
}

.yd-archive-actions-wrap .yd-btn-text {
    display: none;
}

.yd-archive-pdf-inline-btn .yd-action-icon {
    color: #e11d48;
    opacity: 0.85;
}

[data-theme="dark"] .yd-archive-pdf-inline-btn .yd-action-icon {
    color: #fb7185;
}

.yd-archive-edit-inline-btn .yd-action-icon {
    color: #2563eb;
    opacity: 0.85;
}

[data-theme="dark"] .yd-archive-edit-inline-btn .yd-action-icon {
    color: #7dd3fc;
}

.yd-archive-delete-inline-btn .yd-action-icon {
    color: #dc2626;
    opacity: 0.9;
}

.yd-archive-delete-inline-btn {
    border-color: rgba(220, 38, 38, 0.32);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.06), rgba(220, 38, 38, 0.01));
}

.yd-archive-delete-inline-btn:hover {
    border-color: rgba(220, 38, 38, 0.46);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(220, 38, 38, 0.03));
}

[data-theme="dark"] .yd-archive-delete-inline-btn .yd-action-icon {
    color: #f87171;
}

[data-theme="dark"] .yd-archive-delete-inline-btn {
    border-color: rgba(248, 113, 113, 0.44);
    background: linear-gradient(135deg, rgba(248, 113, 113, 0.17), rgba(127, 29, 29, 0.14));
}

.yd-archive-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    max-height: none;
    -webkit-overflow-scrolling: touch;
}

.yd-archive-picker-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
    max-height: 52vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.yd-archive-picker-item {
    width: 100%;
    min-height: 56px;
    border: 1px solid var(--border);
    border-left: 3px solid rgba(64, 168, 223, 0.4);
    border-radius: 12px;
    padding: 11px 14px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    color: var(--text);
    cursor: pointer;
    text-align: left;
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease, transform .16s ease, background .18s ease;
}

.yd-archive-picker-item:hover {
    border-left-color: var(--primary);
    border-color: rgba(64, 168, 223, 0.5);
    box-shadow: 0 6px 18px rgba(15, 117, 184, 0.14);
    transform: translateX(3px);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.06), var(--surface-2));
}

.yd-archive-record-picker-list {
    margin-top: 10px;
    display: grid;
    gap: 10px;
    max-height: 56vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.yd-archive-record-item {
    width: 100%;
    border: 1px solid var(--border);
    border-left: 3px solid rgba(64, 168, 223, 0.4);
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.yd-archive-record-item:hover {
    border-color: rgba(64, 168, 223, 0.5);
    border-left-color: var(--primary);
    box-shadow: 0 8px 20px rgba(9, 16, 38, 0.12);
    transform: translateY(-1px);
}

.yd-archive-record-item.is-selected {
    border-color: rgba(37, 99, 235, 0.65);
    border-left-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.35) inset;
}

.yd-archive-record-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}

.yd-archive-record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--text-soft);
    font-size: 12px;
}

#archive-flow-diary-note {
    min-height: 92px;
}

.yd-archive-picker-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.yd-archive-picker-main-left {
    min-width: 0;
    flex: 1 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.yd-archive-picker-badge {
    min-height: 40px;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
}

.yd-archive-picker-badge-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.yd-archive-picker-badge-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yd-badge-yibf {
    color: #1f3b66;
    background: linear-gradient(135deg, rgba(148, 197, 255, 0.24), rgba(101, 163, 255, 0.12));
    border-color: rgba(59, 130, 246, 0.34);
}

#archive-structure-picker-modal .yd-modal-body {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

#archive-structure-picker-modal .yd-modal-sheet {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#archive-structure-picker-modal .yd-modal-foot {
    flex-shrink: 0;
}

#archive-structure-picker-modal .yd-archive-picker-list {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
}

.yd-archive-picker-plain-meta {
    font-size: 13px;
    color: var(--text);
    font-weight: 700;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yd-archive-picker-inline-value {
    display: inline;
}

.yd-archive-picker-status-text {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-height: 30px;
    min-width: 118px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.34);
    background: rgba(34, 197, 94, 0.12);
    color: #166534;
    font-size: 12.5px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.yd-archive-picker-subline {
    margin-top: 4px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--text-soft);
    overflow-wrap: anywhere;
}

.yd-archive-picker-subline b {
    color: var(--text);
    font-weight: 700;
}

.yd-archive-picker-sep {
    display: inline-block;
    margin: 0 6px;
    color: var(--text-soft);
}

.yd-archive-picker-headline {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.yd-archive-picker-search-field {
    flex: 1 1 auto;
}

.yd-archive-picker-note {
    margin-top: 2px;
    margin-left: auto;
    flex: 0 0 auto;
    text-align: right;
    font-size: 13px;
}

#archive-structure-picker-modal.archive-picker-mode-new .yd-modal-sheet {
    background: linear-gradient(180deg, #dfeefa 0%, #eaf4fc 58%, #f5f9fe 100%);
    border-color: rgba(82, 157, 214, 0.36);
}

#archive-structure-picker-modal.archive-picker-mode-level .yd-modal-sheet {
    background: linear-gradient(180deg, #e7f1e8 0%, #eef6ef 58%, #f7fbf8 100%);
    border-color: rgba(97, 162, 119, 0.34);
}

[data-theme="dark"] #archive-structure-picker-modal.archive-picker-mode-new .yd-modal-sheet {
    background: linear-gradient(180deg, #0f1d2d 0%, #162638 72%, #192b3e 100%);
}

[data-theme="dark"] #archive-structure-picker-modal.archive-picker-mode-level .yd-modal-sheet {
    background: linear-gradient(180deg, #12221a 0%, #1a2d23 72%, #1d3227 100%);
}

[data-theme="dark"] .yd-badge-yibf {
    color: #dbeafe;
    border-color: rgba(125, 211, 252, 0.4);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(59, 130, 246, 0.2));
}

[data-theme="dark"] .yd-archive-picker-plain-meta {
    color: #d7e3f6;
}

[data-theme="dark"] .yd-archive-picker-status-text {
    color: #dcfce7;
    border-color: rgba(74, 222, 128, 0.44);
    background: rgba(21, 128, 61, 0.26);
}

[data-theme="dark"] .yd-archive-picker-subline {
    color: #aebed0;
}

[data-theme="dark"] .yd-archive-picker-subline b {
    color: #e8f0ff;
}

.yd-archive-picker-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.yd-archive-picker-title-icon {
    margin-right: 0;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.yd-archive-picker-title-wrap > span:last-child {
    min-width: 0;
}

@media (max-width: 768px) {
    .yd-archive-picker-headline {
        flex-direction: column;
        gap: 8px;
    }

    .yd-archive-picker-note {
        align-self: flex-end;
        margin-top: 0;
        font-size: 13px;
    }

    .yd-archive-picker-badge {
        min-height: 40px;
        max-width: 100%;
    }

    .yd-archive-picker-status-text {
        margin-left: 0;
    }

    .yd-archive-picker-main-left {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .yd-archive-picker-main,
    .yd-archive-picker-main-left {
        flex-wrap: wrap;
        gap: 6px;
    }

    .yd-archive-picker-badge {
        border-radius: 10px;
    }

    .yd-archive-picker-badge-label {
        font-size: 11px;
    }

    .yd-archive-picker-badge-value {
        font-size: 13px;
    }

    .yd-archive-picker-note {
        width: 100%;
        text-align: right;
    }

    .yd-archive-picker-plain-meta,
    .yd-archive-picker-subline {
        font-size: 13px;
        width: 100%;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }

    .yd-archive-picker-status-text {
        min-height: 40px;
        width: 100%;
        justify-content: center;
    }

    #archive-structure-picker-modal .yd-modal-sheet {
        max-height: 96vh;
    }

    .yd-archive-picker-title-wrap {
        gap: 6px;
    }

    .yd-archive-picker-title-icon {
        width: 16px;
        height: 16px;
        flex-basis: 16px;
    }
}

.yd-flow-question-stage {
    overflow: hidden;
}

.yd-flow-question-card {
    will-change: transform, opacity;
}

#archive-progress-list {
    margin-bottom: 10px;
}

#archive-question-text {
    margin-top: 8px;
    margin-bottom: 4px;
}

#archive-flow-question-meta {
    margin-top: 0;
    margin-bottom: 6px;
}

#archive-question-card .yd-inline {
    margin-top: 2px;
}

.yd-flow-question-card.slide-left {
    animation: ydQuestionSlideLeft 0.68s ease;
}

.yd-flow-question-card.slide-right {
    animation: ydQuestionSlideRight 0.68s ease;
}

.yd-control-sort-btn {
    width: 100%;
    min-height: 40px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
    padding: 0;
}

.yd-control-sort-btn.active {
    color: #1e88e5;
}

[data-theme="dark"] .yd-control-sort-btn.active {
    color: #7fc8ff;
}

.yd-control-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.yd-control-meta-chip {
    color: #0f172a;
    border-color: rgba(59, 130, 246, 0.45);
}

.yd-control-meta-chip.inspector {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(59, 130, 246, 0.14));
}

.yd-control-meta-chip.idare {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(20, 184, 166, 0.13));
}

.yd-control-meta-chip.ada-parsel {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.22), rgba(249, 115, 22, 0.12));
}

.yd-control-meta-chip.area {
    background: linear-gradient(135deg, rgba(244, 114, 182, 0.22), rgba(239, 68, 68, 0.1));
}

.yd-control-meta-chip.date {
    background: linear-gradient(135deg, rgba(167, 139, 250, 0.24), rgba(96, 165, 250, 0.12));
}

.yd-level-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 12px;
}

.yd-level-questions-meta {
    margin: 0 0 12px;
}

.yd-level-questions-meta .yd-level-meta-badges {
    margin-bottom: 0;
}

.yd-level-meta-chip {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    background: #ffffff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
    font-size: 13px;
    line-height: 1.25;
    color: #0f172a;
}

.yd-level-meta-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
}

.yd-level-meta-value {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.yd-level-meta-chip.floor {
    background: linear-gradient(180deg, rgba(239, 246, 255, 0.98), rgba(219, 234, 254, 0.92));
    border-color: rgba(59, 130, 246, 0.34);
}

.yd-level-meta-chip.date {
    background: linear-gradient(180deg, rgba(255, 251, 235, 0.98), rgba(254, 243, 199, 0.92));
    border-color: rgba(217, 119, 6, 0.32);
}

.yd-level-meta-chip.stage {
    background: linear-gradient(180deg, rgba(240, 253, 244, 0.98), rgba(220, 252, 231, 0.92));
    border-color: rgba(5, 150, 105, 0.32);
}

.yd-level-meta-chip.inspector {
    background: linear-gradient(180deg, rgba(245, 243, 255, 0.98), rgba(237, 233, 254, 0.92));
    border-color: rgba(99, 102, 241, 0.32);
    flex: 1 1 220px;
}

.yd-control-detail-answers {
    display: grid;
    gap: 10px;
}

.yd-control-detail-answer {
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.yd-control-detail-answer > b {
    display: block;
    margin-bottom: 6px;
}

.yd-control-detail-answer .yd-subtitle {
    display: block;
    margin-top: 4px;
}

.yd-control-note-inline {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
}

.yd-control-note-inline-item {
    display: inline-flex;
    align-items: center;
}

.yd-control-note-inline-sep {
    margin: 0 6px;
    color: var(--text-soft);
}

.yd-inline-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}

.yd-inline-icon-pin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e40af' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-5.7 7-12a7 7 0 1 0-14 0c0 6.3 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E");
}

.yd-inline-icon-photo {
    margin-left: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5.5' width='17' height='13' rx='2.5' ry='2.5'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='M20.5 15.5l-4.2-4.2-3.5 3.5-2.1-2.1-3.2 3.2'/%3E%3C/svg%3E");
}

.yd-subtitle .yd-inline-icon {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    max-width: none !important;
    overflow: visible !important;
}

.yd-control-detail-answer.ok {
    border-left-color: #16a34a;
    border-color: rgba(22, 163, 74, 0.46);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
}

.yd-control-detail-answer.no {
    border-left-color: #dc2626;
    border-color: rgba(220, 38, 38, 0.46);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.1));
}

.yd-control-detail-answer.not-in-project {
    position: relative;
    overflow: hidden;
    border-left-color: #2563eb;
    border-color: rgba(37, 99, 235, 0.46);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(37, 99, 235, 0.08));
}

.yd-control-detail-answer.not-in-project::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(37, 99, 235, 0.12) 0px,
        rgba(37, 99, 235, 0.12) 5px,
        rgba(255, 255, 255, 0) 5px,
        rgba(255, 255, 255, 0) 11px
    );
}

.yd-control-detail-answer.not-in-project > * {
    position: relative;
    z-index: 1;
}

.yd-control-detail-answer.pending {
    border-left-color: #2563eb;
    border-color: rgba(37, 99, 235, 0.42);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.09));
}

[data-theme="dark"] .yd-control-detail-answer.ok {
    border-color: rgba(34, 197, 94, 0.5);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.24), rgba(21, 128, 61, 0.16));
}

[data-theme="dark"] .yd-control-detail-answer.no {
    border-color: rgba(239, 68, 68, 0.5);
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.24), rgba(185, 28, 28, 0.16));
}

[data-theme="dark"] .yd-control-detail-answer.not-in-project {
    border-color: rgba(96, 165, 250, 0.52);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(30, 64, 175, 0.16));
}

[data-theme="dark"] .yd-control-detail-answer.not-in-project::before {
    background-image: repeating-linear-gradient(
        -45deg,
        rgba(125, 211, 252, 0.16) 0px,
        rgba(125, 211, 252, 0.16) 5px,
        rgba(2, 6, 23, 0) 5px,
        rgba(2, 6, 23, 0) 11px
    );
}

[data-theme="dark"] .yd-control-detail-answer.pending {
    border-color: rgba(59, 130, 246, 0.5);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(30, 64, 175, 0.16));
}

[data-theme="dark"] .yd-control-meta-chip {
    color: #e5ecf6;
    border-color: rgba(125, 211, 252, 0.44);
}

[data-theme="dark"] .yd-level-meta-chip {
    color: #e5ecf6;
    background: rgba(15, 23, 42, 0.72);
    border-color: rgba(148, 163, 184, 0.28);
    box-shadow: none;
}

[data-theme="dark"] .yd-level-meta-label {
    color: #94a3b8;
}

[data-theme="dark"] .yd-level-meta-value {
    color: #f8fafc;
}

[data-theme="dark"] .yd-level-meta-chip.floor {
    background: rgba(30, 58, 138, 0.28);
    border-color: rgba(96, 165, 250, 0.34);
}

[data-theme="dark"] .yd-level-meta-chip.date {
    background: rgba(120, 53, 15, 0.28);
    border-color: rgba(251, 191, 36, 0.28);
}

[data-theme="dark"] .yd-level-meta-chip.stage {
    background: rgba(6, 78, 59, 0.28);
    border-color: rgba(52, 211, 153, 0.28);
}

[data-theme="dark"] .yd-level-meta-chip.inspector {
    background: rgba(67, 56, 202, 0.24);
    border-color: rgba(129, 140, 248, 0.28);
}

[data-theme="dark"] .yd-inline-icon-pin {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393c5fd' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s7-5.7 7-12a7 7 0 1 0-14 0c0 6.3 7 12 7 12z'/%3E%3Ccircle cx='12' cy='10' r='2.6'/%3E%3C/svg%3E");
}

[data-theme="dark"] .yd-inline-icon-photo {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235eead4' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='5.5' width='17' height='13' rx='2.5' ry='2.5'/%3E%3Ccircle cx='9' cy='10' r='1.8'/%3E%3Cpath d='M20.5 15.5l-4.2-4.2-3.5 3.5-2.1-2.1-3.2 3.2'/%3E%3C/svg%3E");
}

.yd-control-detail-photo-grid {
    margin-top: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 6px;
}

.yd-control-detail-photo-btn {
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 8px;
    padding: 0;
    min-height: 40px;
    cursor: pointer;
    overflow: hidden;
}

.yd-control-detail-photo-grid img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.yd-user-photo-field {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.yd-user-photo-preview {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.16), rgba(38, 166, 154, 0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    overflow: hidden;
    flex: 0 0 72px;
}

.yd-user-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yd-user-photo-actions {
    flex: 1 1 320px;
    min-width: 240px;
    display: grid;
    gap: 8px;
}

.yd-user-photo-upload-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.yd-profile-photo-field {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.yd-profile-photo-preview {
    width: 74px;
    height: 74px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(30, 136, 229, 0.16), rgba(38, 166, 154, 0.12));
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 20px;
    font-weight: 800;
    overflow: hidden;
    flex: 0 0 74px;
}

.yd-profile-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yd-profile-photo-actions {
    flex: 1 1 320px;
    min-width: 240px;
    display: grid;
    gap: 8px;
}

.yd-profile-photo-upload-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.yd-stat {
    background: linear-gradient(160deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
    overflow: hidden;
}

.yd-stat::before {
    content: "";
    position: absolute;
    top: -20px;
    right: -20px;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(64, 168, 223, 0.12), transparent 70%);
    pointer-events: none;
}

.yd-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(20, 48, 85, 0.14);
}

.yd-stat b {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: -0.5px;
}

.yd-stat span {
    margin-top: 2px;
    display: block;
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 700;
    letter-spacing: 0.2px;
    text-transform: uppercase;
}

[data-theme="dark"] .yd-stat {
    background: linear-gradient(160deg, var(--surface-2), var(--surface-3));
    border-left-color: var(--primary);
}

[data-theme="dark"] .yd-stat::before {
    background: radial-gradient(circle, rgba(64, 168, 223, 0.18), transparent 70%);
}

.yd-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.yd-users-filter-toolbar {
    align-items: flex-end;
    justify-content: flex-start;
}

.yd-users-filter-group {
    min-width: 180px;
}

.yd-filter-label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.yd-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    border: 1px solid transparent;
    background-clip: padding-box;
    border-radius: 999px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    position: relative;
    box-shadow: 0 2px 6px rgba(20, 48, 85, 0.08);
}

.yd-chip::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 999px;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--primary-2));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
    pointer-events: none;
}

.yd-list {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.yd-list th, .yd-list td {
    border-bottom: 1px solid var(--border);
    padding: 11px 12px;
    font-size: 13px;
    text-align: left;
    vertical-align: middle;
}

.yd-list th {
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    background: linear-gradient(180deg, var(--surface-3), var(--surface-2));
    position: sticky;
    top: 0;
    z-index: 2;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.yd-list th:first-child { border-radius: 14px 0 0 0; }
.yd-list th:last-child  { border-radius: 0 14px 0 0; }

.yd-list tbody tr {
    transition: background 0.14s ease, box-shadow 0.14s ease;
    position: relative;
}

/* Zebra striping */
.yd-list tbody tr:nth-child(even) {
    background: rgba(64, 168, 223, 0.03);
}

.yd-list tbody tr::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-2));
    opacity: 0;
    transition: opacity 0.15s ease;
    border-radius: 0 2px 2px 0;
}

.yd-list tbody tr:hover {
    background: rgba(64, 168, 223, 0.09);
    box-shadow: inset 0 1px 0 rgba(64, 168, 223, 0.08), inset 0 -1px 0 rgba(64, 168, 223, 0.08);
}

.yd-list tbody tr:hover::after {
    opacity: 1;
}

.yd-list tbody tr:last-child td {
    border-bottom: 0;
}

[data-theme="dark"] .yd-list tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.02);
}

[data-theme="dark"] .yd-list tbody tr:hover {
    background: rgba(64, 168, 223, 0.1);
}

.yd-list tbody tr:last-child td { border-bottom: 0; }

@keyframes ydLongPressBlink {
    0% {
        background: rgba(220, 38, 38, 0.08);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.42);
    }
    50% {
        background: rgba(220, 38, 38, 0.2);
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.22);
    }
    100% {
        background: rgba(220, 38, 38, 0.08);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.42);
    }
}

/* YİBF tablo satırları — sol kenar indicator + hover lift */
.yd-list-structures tbody tr {
    position: relative;
    transition: background 0.16s ease, box-shadow 0.16s ease;
}

/* Sol taraftaki dekoratif şerit, bazı tarayıcılarda hizalama algısını bozuyordu. */
.yd-list-structures tbody tr::after,
.yd-list-structures tbody tr::before {
    content: none !important;
}

.yd-list-structures tbody tr:hover {
    background: rgba(15, 117, 184, 0.06) !important;
    box-shadow: 0 2px 8px rgba(15, 117, 184, 0.08);
}

/* Zebra striping — hafif */
.yd-list-structures tbody tr:nth-child(even) {
    background: rgba(15, 117, 184, 0.025);
}

[data-theme="dark"] .yd-list-structures tbody tr:hover {
    background: rgba(64, 168, 223, 0.08) !important;
}

[data-theme="dark"] .yd-list-structures tbody tr:nth-child(even) {
    background: rgba(64, 168, 223, 0.03);
}

.yd-list-structures tr.yd-longpress-active {
    border-color: rgba(220, 38, 38, 0.85);
    animation: ydLongPressBlink 0.7s ease-in-out infinite;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.yd-list-structures tr.yd-context-flash {
    border-color: rgba(220, 38, 38, 0.9);
    animation: ydLongPressBlink 0.55s ease-in-out 1;
}

.yd-users-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

.yd-structures-table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    position: relative;
}

/* YiBF tablo — sütun min genişlikleri, yatay scroll ile güvenli */
.yd-list-structures {
    table-layout: auto;
    width: 100%;
    min-width: 960px;
}

.yd-list-structures th:nth-child(1),
.yd-list-structures td:nth-child(1) { min-width: 88px;  white-space: nowrap; } /* YİBF No */
.yd-list-structures th:nth-child(2),
.yd-list-structures td:nth-child(2) { min-width: 68px;  white-space: nowrap; } /* İl */
.yd-list-structures th:nth-child(3),
.yd-list-structures td:nth-child(3) { min-width: 90px;  white-space: nowrap; } /* İdare */
.yd-list-structures th:nth-child(4),
.yd-list-structures td:nth-child(4) { min-width: 140px; }                      /* Müteahhit */
.yd-list-structures th:nth-child(5),
.yd-list-structures td:nth-child(5) { min-width: 100px; white-space: nowrap; } /* Mahalle */
.yd-list-structures th:nth-child(6),
.yd-list-structures td:nth-child(6) { min-width: 85px;  white-space: nowrap; } /* Ada/Parsel */
.yd-list-structures th:nth-child(7),
.yd-list-structures td:nth-child(7) { min-width: 160px; white-space: nowrap; } /* İş Durumu */
.yd-list-structures th:nth-child(8),
.yd-list-structures td:nth-child(8) { min-width: 52px;  white-space: nowrap; text-align: center; } /* İşlemler */

.yd-list-users {
    overflow: visible;
}

.yd-list-users tbody,
.yd-list-users tr,
.yd-list-users td {
    overflow: visible;
}

.yd-list-structures,
.yd-list-structures tbody,
.yd-list-structures tr {
    overflow: visible;
}

.yd-list-archive,
.yd-list-archive tbody,
.yd-list-archive tr,
.yd-list-archive td {
    overflow: visible;
}

.yd-user-name-wrap {
    display: inline-flex;
    flex-direction: column;
    gap: 6px;
}

.yd-user-control-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 22px;
    min-width: 22px;
    border-radius: 999px;
    border: 1px solid rgba(15, 117, 184, 0.32);
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(15, 117, 184, 0.16), rgba(21, 184, 166, 0.16));
    color: var(--text);
}

.yd-user-site-badge {
    min-height: 30px;
    min-width: 40px;
    border: 1px solid rgba(255, 120, 145, 0.38);
    border-radius: 12px;
    padding: 4px 11px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.2px;
    color: #fff;
    background: linear-gradient(145deg, #e53a57 0%, #b31235 100%);
    box-shadow: 0 6px 14px rgba(179, 18, 53, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    cursor: pointer;
    white-space: nowrap;
}

.yd-user-site-badge:hover {
    filter: brightness(1.06);
}

.yd-user-site-badge:focus-visible {
    outline: 2px solid rgba(214, 58, 73, 0.42);
    outline-offset: 2px;
}

.yd-user-site-badge.yd-user-site-badge-all {
    border-color: rgba(45, 212, 191, 0.45);
    color: #083344;
    background: linear-gradient(145deg, #6ff6df, #22c7b2);
    box-shadow: 0 6px 14px rgba(13, 148, 136, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.yd-user-site-badge.yd-user-site-badge-all:focus-visible {
    outline: 2px solid rgba(45, 212, 191, 0.48);
}

.yd-user-activities {
    display: grid;
    gap: 8px;
    min-width: 280px;
}

.yd-user-activity-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    background: var(--surface-2);
}

.yd-yibf-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--primary);
    font-weight: 800;
    text-decoration: none;
    font-size: 13px;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(15, 117, 184, 0.08);
    border: 1px solid rgba(15, 117, 184, 0.2);
    transition: background 0.18s ease, border-color 0.18s ease, transform 0.15s ease, box-shadow 0.18s ease;
}

.yd-yibf-link::before {
    content: "#";
    opacity: 0.5;
    font-size: 11px;
}

.yd-yibf-link:hover {
    background: rgba(15, 117, 184, 0.16);
    border-color: rgba(15, 117, 184, 0.42);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 117, 184, 0.18);
    text-decoration: none;
}

[data-theme="dark"] .yd-yibf-link {
    background: rgba(64, 168, 223, 0.12);
    border-color: rgba(64, 168, 223, 0.28);
}

[data-theme="dark"] .yd-yibf-link:hover {
    background: rgba(64, 168, 223, 0.22);
    border-color: rgba(64, 168, 223, 0.5);
}

.yd-user-activity-meta {
    margin-top: 3px;
    font-size: 13px;
    color: var(--text-soft);
}

.yd-user-actions-wrap {
    position: relative;
    display: inline-flex;
}

.yd-kebab-btn {
    min-height: 34px;
    min-width: 34px;
    padding: 0;
    font-size: 0;
    line-height: 0;
    border-radius: 10px;
    border: 1px solid rgba(64, 168, 223, 0.28);
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--primary);
    transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.15s ease;
    position: relative;
    overflow: hidden;
}

.yd-kebab-btn:hover {
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.18), rgba(69, 209, 191, 0.14));
    border-color: rgba(64, 168, 223, 0.52);
    box-shadow: 0 4px 12px rgba(15, 117, 184, 0.18);
    transform: translateY(-1px);
}

.yd-kebab-btn:active {
    transform: translateY(0) scale(0.96);
}

/* Dikey 3 nokta (⋮) — daha net ve şık */
.yd-kebab-btn::before {
    content: "⋮";
    font-size: 20px;
    line-height: 1;
    letter-spacing: 0;
    font-weight: 900;
    background: linear-gradient(160deg, var(--primary), var(--primary-2));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-theme="dark"] .yd-kebab-btn {
    border-color: rgba(64, 168, 223, 0.22);
    background: linear-gradient(135deg, rgba(30, 50, 80, 0.8), rgba(22, 38, 64, 0.9));
}

[data-theme="dark"] .yd-kebab-btn:hover {
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.22), rgba(69, 209, 191, 0.18));
    border-color: rgba(64, 168, 223, 0.48);
}

.yd-kebab-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 180px;
    display: grid;
    gap: 4px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(64, 168, 223, 0.22);
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 12px 28px rgba(15, 50, 100, 0.14),
        0 0 0 1px rgba(255,255,255,0.06) inset;
    backdrop-filter: blur(12px);
    z-index: 10000013;
    animation: ydKebabMenuIn 0.16s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

@keyframes ydKebabMenuIn {
    from { opacity: 0; transform: scale(0.92) translateY(-6px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* Sil butonu yukarıdaki butonlardan ince çizgiyle ayrılsın */
.yd-kebab-menu .yd-button.danger {
    margin-top: 2px;
    border-top: 1px solid var(--border);
    padding-top: 6px;
}

/* Menü içindeki action butonları */
.yd-kebab-menu .yd-action-btn {
    border-radius: 10px;
    min-height: 38px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    transition: background 0.15s ease, transform 0.13s ease, box-shadow 0.15s ease;
    justify-content: flex-start;
    padding: 8px 12px;
}

.yd-kebab-menu .yd-action-btn:hover {
    transform: translateX(2px);
}

[data-theme="dark"] .yd-kebab-menu {
    background: linear-gradient(160deg, rgba(22, 36, 58, 0.98) 0%, rgba(18, 30, 50, 0.98) 100%);
    border-color: rgba(64, 168, 223, 0.28);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.18),
        0 16px 32px rgba(0,0,0,0.36),
        0 0 0 1px rgba(255,255,255,0.04) inset;
}

.yd-structure-status-select {
    min-height: 36px;
    min-width: 150px;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 12.5px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    cursor: pointer;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    appearance: auto;
}

.yd-structure-status-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(64, 168, 223, 0.18);
    outline: none;
}

.yd-floating-menu {
    position: fixed;
    z-index: 10000020;
    min-width: 190px;
    display: none;
    gap: 4px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid rgba(64, 168, 223, 0.22);
    background: linear-gradient(160deg, var(--surface) 0%, var(--surface-2) 100%);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.04),
        0 16px 36px rgba(15, 50, 100, 0.18),
        0 0 0 1px rgba(255,255,255,0.06) inset;
    backdrop-filter: blur(14px);
}

.yd-floating-menu.open {
    display: grid;
    animation: ydKebabMenuIn 0.18s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: top right;
}

/* Floating menü butonları */
.yd-floating-menu .yd-button {
    border-radius: 10px;
    min-height: 40px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1px;
    justify-content: flex-start;
    padding: 8px 14px;
    transition: background 0.15s ease, transform 0.13s ease, box-shadow 0.15s ease;
}

.yd-floating-menu .yd-button:hover {
    transform: translateX(2px);
}

.yd-floating-menu .yd-button.danger {
    margin-top: 2px;
    border-top: 1px solid var(--border);
}

[data-theme="dark"] .yd-floating-menu {
    background: linear-gradient(160deg, rgba(22, 36, 58, 0.98) 0%, rgba(18, 30, 50, 0.98) 100%);
    border-color: rgba(64, 168, 223, 0.28);
    box-shadow:
        0 4px 6px rgba(0,0,0,0.2),
        0 20px 40px rgba(0,0,0,0.38),
        0 0 0 1px rgba(255,255,255,0.04) inset;
}

.yd-user-assign-state {
    font-size: 13px;
    color: var(--text-soft);
    font-weight: 700;
}

#user-modal .yd-user-modal-head > b {
    max-width: calc(100% - 150px);
}

#user-modal .yd-user-modal-head .yd-button {
    white-space: nowrap;
}

#user-assign-modal .yd-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: end;
}

#user-assign-modal .yd-toolbar .yd-input,
#user-assign-modal .yd-toolbar .yd-button,
.yd-user-assign-list .yd-button {
    min-height: 40px;
}

.yd-user-assign-list td {
    vertical-align: middle;
}

.yd-assign-btn-assigned,
.yd-assign-btn-unassigned {
    min-height: 42px;
}

.yd-user-assign-row-changed {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(14, 165, 233, 0.06));
}

.yd-activity-filter-toolbar {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

.yd-activity-filter-group {
    display: grid;
    gap: 6px;
}

.yd-activity-filter-group .yd-select,
.yd-activity-filter-group .yd-input {
    min-height: 40px;
}

#activity-filter-reset-btn {
    min-height: 40px;
}

.yd-list-user-structures td {
    font-size: 13px;
}

.yd-action-btn {
    min-height: 40px;
    padding: 8px 12px;
    border-radius: 10px;
}

.yd-btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-right: 6px; font-size: 14px; line-height: 1; }

/* SVG ikon — kebab/floating menü butonları */
.yd-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-right: 9px;
    opacity: 0.75;
    transition: opacity 0.15s ease;
}

.yd-action-icon svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
}

.yd-action-btn:hover .yd-action-icon {
    opacity: 1;
}

/* PDF butonu — ikon kırmızımsı */
.yd-kebab-menu .yd-action-btn[data-archive-action="pdf"] .yd-action-icon,
.yd-floating-menu .yd-action-btn[data-archive-action="pdf"] .yd-action-icon {
    color: #e11d48;
    opacity: 0.8;
}

/* Seviye butonu — ikon teal */
.yd-kebab-menu .yd-action-btn[data-archive-action="level"] .yd-action-icon,
.yd-floating-menu .yd-action-btn[data-archive-action="level"] .yd-action-icon {
    color: var(--primary-2);
    opacity: 0.85;
}

/* Yeni denetim — ikon mavi */
.yd-kebab-menu .yd-action-btn[data-archive-action="new"] .yd-action-icon,
.yd-floating-menu .yd-action-btn[data-archive-action="new"] .yd-action-icon {
    color: var(--primary);
    opacity: 0.85;
}

.yd-btn-text { white-space: nowrap; }

.yd-modal {
    position: fixed;
    inset: 0;
    z-index: 10000010;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(9, 16, 28, 0.65);
    backdrop-filter: blur(6px) saturate(1.2);
}

#archive-photo-modal {
    z-index: 10000035;
}

.yd-modal.open:not(.yd-closing) {
    display: flex;
    animation: ydModalFadeIn 0.18s ease;
}

.yd-modal.yd-closing {
    animation: ydModalFadeOut 0.16s ease;
}

.yd-modal-sheet {
    width: min(890px, 100%);
    max-height: 92vh;
    overflow: auto;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid rgba(64, 168, 223, 0.28);
    border-radius: 20px;
    box-shadow:
        0 32px 80px rgba(9, 16, 38, 0.28),
        0 8px 24px rgba(9, 16, 38, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.yd-modal.open:not(.yd-closing) .yd-modal-sheet {
    animation: ydModalSheetIn 0.2s ease;
}

.yd-modal.yd-closing .yd-modal-sheet {
    animation: ydModalSheetOut 0.16s ease;
}

.yd-modal-head {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.13), rgba(69, 209, 191, 0.10));
    position: relative;
}

.yd-modal-head > b {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 140px);
    font-size: 18px;
    line-height: 1.3;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.yd-modal-head .yd-button {
    flex: 0 0 auto;
    min-height: 40px;
}

#archive-level-modal .yd-modal-head,
#archive-level-questions-modal .yd-modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
}

#archive-level-modal .yd-modal-head > b,
#archive-level-questions-modal .yd-modal-head > b {
    max-width: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#archive-level-modal .yd-archive-level-head-actions {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.yd-building-variant-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px;
    border: 1px solid rgba(148, 163, 184, 0.42);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
}

.yd-building-variant-btn {
    min-height: 40px;
    min-width: 62px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #334155;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.yd-building-variant-btn.is-active {
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    border-color: rgba(37, 99, 235, 0.6);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22);
}

.yd-building-variant-btn:focus-visible {
    outline: 2px solid rgba(14, 165, 233, 0.36);
    outline-offset: 1px;
}

.yd-building-variant-note {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 4;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid #bfdbfe;
    background: rgba(219, 234, 254, 0.92);
    color: #1e40af;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(6px);
    pointer-events: none;
}

.yd-building-variant-note.is-warning {
    border-color: #fecaca;
    background: rgba(254, 226, 226, 0.95);
    color: #991b1b;
}

.yd-modal-head::after {
    content: "";
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--primary-2));
    border-radius: 0;
    opacity: 0.6;
}

.yd-modal-body { padding: 14px 16px; }

#archive-level-modal {
    padding: 14px;
}

#archive-level-modal .yd-modal-sheet {
    width: min(1480px, calc(100vw - 28px)) !important;
    max-width: none !important;
    height: calc(100vh - 28px);
    max-height: calc(100vh - 28px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#archive-level-modal .yd-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

#archive-level-modal .yd-building-model-grid {
    grid-template-columns: minmax(340px, 0.82fr) minmax(420px, 1.18fr);
}

#archive-level-modal .yd-building-stack.three {
    min-height: 430px;
}

#archive-level-modal .yd-building-3d-canvas-wrap,
#archive-level-modal .yd-building-3d-canvas-wrap canvas,
#archive-level-modal .yd-building-3d-fallback {
    min-height: 430px;
    height: min(48vh, 520px);
}

.yd-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.yd-choice-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.yd-choice-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.yd-choice-btn {
    min-height: 48px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    font: inherit;
    cursor: pointer;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
    text-align: left;
}

.yd-choice-btn:hover {
    border-color: rgba(64, 168, 223, 0.55);
    box-shadow: 0 10px 24px rgba(15, 50, 100, 0.08);
    transform: translateY(-1px);
}

.yd-choice-btn.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.16), rgba(64, 168, 223, 0.08));
    box-shadow: 0 0 0 2px rgba(64, 168, 223, 0.12);
}

.yd-choice-btn.is-complete {
    border-color: rgba(34, 197, 94, 0.5);
}

.yd-choice-btn.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.yd-choice-btn-text {
    min-width: 0;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 600;
    word-break: break-word;
}

.yd-choice-btn-check {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    background: rgba(34, 197, 94, 0.14);
    color: #16a34a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    flex: 0 0 auto;
}

.yd-choice-btn-check.is-empty {
    visibility: hidden;
}

.yd-floor-dropdown-panel {
    position: relative;
}

.yd-floor-dropdown-btn {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 700;
}

.yd-floor-dropdown-arrow {
    font-size: 14px;
    opacity: 0.8;
}

.yd-floor-dropdown-list {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 8;
    display: none;
    max-height: 280px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.yd-floor-dropdown-panel.is-open .yd-floor-dropdown-list {
    display: grid;
    gap: 6px;
}

.yd-floor-option {
    width: 100%;
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 10px;
    padding: 9px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.yd-floor-option.is-complete {
    background: rgba(16, 185, 129, 0.18);
    color: #065f46;
    border-color: rgba(5, 150, 105, 0.35);
}

.yd-floor-option.is-missing {
    background: rgba(239, 68, 68, 0.14);
    color: #991b1b;
    border-color: rgba(239, 68, 68, 0.3);
}

.yd-floor-option-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.8;
}

.yd-floor-option.is-selected {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.yd-assumption-confirm-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    padding: 12px;
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
}

.yd-assumption-confirm-row {
    display: grid;
    grid-template-columns: minmax(0, 170px) minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.yd-assumption-confirm-row span {
    font-size: 13px;
    color: var(--text-soft);
}

.yd-assumption-confirm-row b {
    font-size: 14px;
    line-height: 1.35;
}

.yd-assumption-summary-list {
    margin-top: 10px;
    display: grid;
    gap: 8px;
}

.yd-assumption-summary-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
    padding: 10px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.yd-assumption-summary-main {
    display: grid;
    gap: 4px;
}

.yd-assumption-summary-main b {
    font-size: 13px;
}

.yd-assumption-summary-main span {
    font-size: 12px;
    color: var(--text-soft);
}

.yd-start-completion-info {
    margin-top: 10px;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.45;
}

.yd-flow-section-head {
    margin-bottom: 12px;
}

.yd-flow-section-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    margin-top: 2px;
}

.yd-flow-section-switcher {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.yd-flow-section-btn {
    min-height: 40px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    max-width: 100%;
}

.yd-flow-section-btn.is-active {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.16), rgba(64, 168, 223, 0.08));
    box-shadow: 0 0 0 2px rgba(64, 168, 223, 0.1);
}

.yd-flow-section-btn.is-complete {
    border-color: rgba(34, 197, 94, 0.45);
}

.yd-flow-section-btn-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    padding: 0 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.18);
    color: #475569;
    flex: 0 0 auto;
}

.yd-flow-section-btn-status.complete {
    background: rgba(34, 197, 94, 0.16);
    color: #15803d;
}

.yd-flow-section-btn-status.progress {
    background: rgba(245, 158, 11, 0.18);
    color: #b45309;
}

[data-theme="dark"] .yd-choice-btn {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(31, 41, 55, 0.98));
}

[data-theme="dark"] .yd-choice-btn.is-active {
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.26), rgba(64, 168, 223, 0.14));
}

[data-theme="dark"] .yd-floor-dropdown-list {
    background: #1b2a41;
}

[data-theme="dark"] .yd-floor-option.is-complete {
    background: rgba(16, 185, 129, 0.26);
    color: #a7f3d0;
    border-color: rgba(167, 243, 208, 0.35);
}

[data-theme="dark"] .yd-floor-option.is-missing {
    background: rgba(153, 27, 27, 0.34);
    color: #fecaca;
    border-color: rgba(252, 165, 165, 0.35);
}

[data-theme="dark"] .yd-assumption-confirm-card,
[data-theme="dark"] .yd-assumption-summary-item {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(15, 23, 42, 0.6);
}

@media (max-width: 768px) {
    .yd-floor-dropdown-btn,
    .yd-floor-option {
        min-height: 40px;
    }

    .yd-assumption-summary-item {
        grid-template-columns: 1fr;
    }

    .yd-assumption-summary-item .yd-button {
        width: 100%;
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .yd-floor-dropdown-list {
        max-height: 230px;
    }

    .yd-assumption-confirm-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .yd-assumption-confirm-row span {
        font-size: 12px;
    }

    .yd-assumption-confirm-row b {
        font-size: 13px;
    }
}

[data-theme="dark"] .yd-flow-section-btn {
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92), rgba(31, 41, 55, 0.98));
}

[data-theme="dark"] .yd-flow-section-btn.is-active {
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.26), rgba(64, 168, 223, 0.14));
}

.yd-modal-foot {
    padding: 12px 16px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    background: linear-gradient(180deg, transparent, rgba(64, 168, 223, 0.04));
    border-radius: 0 0 20px 20px;
}

@keyframes ydModalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes ydModalFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes ydModalSheetIn {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes ydModalSheetOut {
    from { opacity: 1; transform: translateY(0) scale(1); }
    to { opacity: 0; transform: translateY(10px) scale(0.98); }
}

@keyframes ydQuestionSlideLeft {
    from { opacity: 0; transform: translateX(28px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes ydQuestionSlideRight {
    from { opacity: 0; transform: translateX(-28px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes ydMenuDropIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.yd-notification {
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 12px;
    padding: 11px 13px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.05), var(--surface-2));
    box-shadow: 0 3px 10px rgba(15, 50, 100, 0.07);
    transition: box-shadow 0.18s ease, transform 0.16s ease;
}

.yd-notification:hover {
    box-shadow: 0 6px 18px rgba(15, 50, 100, 0.12);
    transform: translateX(2px);
}

.yd-notification b { font-size: 14px; }

.yd-activity-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.yd-activity-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.yd-activity-type-badge.login { background: rgba(59, 130, 246, 0.16); border-color: rgba(59, 130, 246, 0.34); color: #1d4ed8; }
.yd-activity-type-badge.inspection { background: rgba(14, 165, 233, 0.16); border-color: rgba(14, 165, 233, 0.34); color: #0369a1; }
.yd-activity-type-badge.diary { background: rgba(245, 158, 11, 0.18); border-color: rgba(245, 158, 11, 0.35); color: #92400e; }
.yd-activity-type-badge.note { background: rgba(236, 72, 153, 0.17); border-color: rgba(236, 72, 153, 0.34); color: #9d174d; }
.yd-activity-type-badge.assignment { background: rgba(34, 197, 94, 0.17); border-color: rgba(34, 197, 94, 0.34); color: #166534; }
.yd-activity-type-badge.system { background: rgba(148, 163, 184, 0.2); border-color: rgba(100, 116, 139, 0.3); color: #334155; }

.yd-notification-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.yd-notification-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(37, 99, 235, 0.28);
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.yd-notification-body {
    display: block;
    margin-top: 6px;
    line-height: 1.42;
    white-space: normal;
    word-break: break-word;
}

.yd-notification-time {
    display: block;
    margin-top: 10px;
}

.yd-login-history-item {
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.06), var(--surface));
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.yd-login-history-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}

.yd-login-history-main b {
    font-size: 14px;
}

.yd-login-history-main span {
    font-size: 13px;
    color: var(--text-soft);
}

[data-theme="dark"] .yd-user-assign-row-changed {
    background: linear-gradient(135deg, rgba(14, 116, 144, 0.28), rgba(12, 74, 110, 0.2));
}

[data-theme="dark"] #my-structures-modal .yd-new-assignment-row {
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.34), rgba(21, 128, 61, 0.2));
}

[data-theme="dark"] .yd-notification-badge {
    color: #bfdbfe;
    background: rgba(29, 78, 216, 0.28);
    border-color: rgba(96, 165, 250, 0.38);
}

[data-theme="dark"] .yd-login-history-item {
    border-color: rgba(100, 116, 139, 0.4);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.74), rgba(30, 41, 59, 0.64));
}

.yd-hidden { display: none !important; }

.yd-progress-item {
    border: 1px solid var(--border);
    border-left: 4px solid var(--border);
    border-radius: 10px;
    padding: 9px 12px;
    margin-bottom: 7px;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.yd-progress-item.ok {
    border-left-color: #22c55e;
    border-color: rgba(24, 155, 97, 0.3);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.07), rgba(24, 155, 97, 0.04));
}

.yd-progress-item.no {
    border-left-color: #ef4444;
    border-color: rgba(209, 69, 87, 0.3);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.07), rgba(209, 69, 87, 0.04));
}

.yd-progress-item.not-in-project {
    border-left-color: #2563eb;
    border-color: rgba(37, 99, 235, 0.32);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.11), rgba(37, 99, 235, 0.05));
}

.yd-progress-item.pending {
    border-left-color: #2563eb;
    border-color: rgba(37, 99, 235, 0.34);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(37, 99, 235, 0.06));
}

[data-theme="dark"] .yd-progress-item.ok {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(24, 155, 97, 0.06));
}

[data-theme="dark"] .yd-progress-item.no {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(209, 69, 87, 0.06));
}

[data-theme="dark"] .yd-progress-item.not-in-project {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(30, 64, 175, 0.1));
}

[data-theme="dark"] .yd-progress-item.pending {
    border-color: rgba(59, 130, 246, 0.42);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(30, 64, 175, 0.12));
}

.yd-notification-popover {
    position: fixed;
    top: 76px;
    right: 24px;
    width: min(390px, calc(100vw - 24px));
    z-index: 10000021;
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.yd-notification-popover.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.yd-notification-panel {
    width: 100%;
    max-height: min(520px, calc(100vh - 96px));
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yd-drawer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid var(--border);
    min-height: 56px;
}

.yd-drawer-body {
    flex: 1;
    overflow: auto;
    padding: 10px;
}

.yd-drawer-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
}

.yd-drawer-foot .yd-button {
    flex: 1 1 160px;
}

#yd-drawer-activity-btn {
    background: linear-gradient(135deg, #e6f4ff, #d8ecff);
    border-color: #9cc9f3;
    color: #0b4f86;
}

#yd-drawer-activity-btn:hover {
    background: linear-gradient(135deg, #d8ecff, #c8e4ff);
}

#yd-drawer-settings-btn {
    background: linear-gradient(135deg, #eafaf2, #daf4e8);
    border-color: #9ed7bc;
    color: #0d6640;
}

#yd-drawer-settings-btn:hover {
    background: linear-gradient(135deg, #dcf6eb, #cdeedc);
}

[data-theme="dark"] #yd-drawer-activity-btn {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(30, 64, 175, 0.22));
    border-color: rgba(125, 211, 252, 0.48);
    color: #d9f4ff;
}

[data-theme="dark"] #yd-drawer-settings-btn {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.18), rgba(5, 150, 105, 0.2));
    border-color: rgba(110, 231, 183, 0.42);
    color: #d7ffec;
}

.yd-notify-settings-grid {
    display: grid;
    gap: 10px;
}

.yd-notify-settings-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    font-size: 14px;
}

.yd-notify-settings-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.yd-pdf-export-options {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    justify-items: center;
}

.yd-pdf-export-options .yd-button {
    min-height: 42px;
    width: min(320px, 100%);
}

#archive-pdf-export-modal .yd-pdf-export-sheet {
    border-color: rgba(239, 68, 68, 0.24);
    background: linear-gradient(180deg, #f8fbff 0%, #fefefe 100%);
}

#archive-pdf-export-modal .yd-modal-head {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.09), rgba(244, 63, 94, 0.05));
}

.yd-pdf-export-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.yd-pdf-export-title .yd-action-icon {
    margin-right: 0;
    color: #e11d48;
    opacity: 0.95;
}

.yd-pdf-export-meta-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

.yd-pdf-meta-badge {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    max-width: 100%;
}

.yd-pdf-meta-badge b {
    font-size: 11px;
    letter-spacing: 0.02em;
    opacity: 0.85;
}

.yd-pdf-meta-badge.yibf {
    color: #1e3a8a;
    border-color: rgba(59, 130, 246, 0.34);
    background: linear-gradient(135deg, rgba(147, 197, 253, 0.26), rgba(96, 165, 250, 0.12));
}

.yd-pdf-meta-badge.parcel {
    color: #0f766e;
    border-color: rgba(45, 212, 191, 0.34);
    background: linear-gradient(135deg, rgba(153, 246, 228, 0.26), rgba(45, 212, 191, 0.12));
}

[data-theme="dark"] .yd-pdf-meta-badge.yibf {
    color: #dbeafe;
    border-color: rgba(125, 211, 252, 0.44);
    background: linear-gradient(135deg, rgba(30, 64, 175, 0.42), rgba(59, 130, 246, 0.24));
}

[data-theme="dark"] .yd-pdf-meta-badge.parcel {
    color: #ccfbf1;
    border-color: rgba(94, 234, 212, 0.44);
    background: linear-gradient(135deg, rgba(17, 94, 89, 0.42), rgba(20, 184, 166, 0.24));
}

[data-theme="dark"] #archive-pdf-export-modal .yd-pdf-export-sheet {
    border-color: rgba(251, 113, 133, 0.28);
    background: linear-gradient(180deg, #1e2735 0%, #1a2330 100%);
}

[data-theme="dark"] #archive-pdf-export-modal .yd-modal-head {
    background: linear-gradient(135deg, rgba(190, 24, 93, 0.26), rgba(225, 29, 72, 0.12));
}

[data-theme="dark"] .yd-pdf-export-title .yd-action-icon {
    color: #fb7185;
}

.yd-pdf-export-body {
    position: relative;
}

.yd-pdf-export-loading {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    background: rgba(15, 23, 42, 0.34);
    backdrop-filter: blur(2px);
}

.yd-pdf-export-loading-inner {
    width: min(340px, 100%);
    min-height: 108px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, var(--surface), var(--surface-2));
    box-shadow: var(--shadow-md);
    display: grid;
    gap: 10px;
    justify-items: center;
    align-content: center;
    text-align: center;
    padding: 14px;
}

.yd-pdf-export-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(148, 163, 184, 0.34);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: ydPdfExportSpin 0.9s linear infinite;
}

.yd-pdf-export-loading-text {
    font-size: 14px;
    line-height: 1.35;
    color: var(--text);
}

.yd-diary-doc-scope-body,
.yd-diary-doc-editor-body {
    position: relative;
}

.yd-diary-doc-scope-grid {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.yd-diary-doc-range-wrap {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.yd-diary-doc-editor-wrap {
    margin-top: 12px;
}

.yd-diary-doc-preview {
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    overflow: auto;
    max-width: 100%;
    padding: 8px;
    min-height: 56vh;
}

.yd-diary-doc-preview .docx-wrapper {
    background: #fff;
    padding: 0;
}

@keyframes ydPdfExportSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.yd-level-stage-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0;
}

.yd-building-model-wrap {
    margin-top: 14px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    background: linear-gradient(135deg, rgba(15, 117, 184, 0.06), rgba(69, 209, 191, 0.04), var(--surface));
    box-shadow: 0 8px 22px rgba(15, 50, 100, 0.08);
    overflow: hidden;
}

.yd-building-model-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.yd-building-model-head b {
    display: block;
    font-size: 15px;
    color: var(--text);
}

.yd-building-model-head span {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    color: var(--text-soft);
}

.yd-building-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-soft);
}

.yd-building-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.yd-building-legend i {
    width: 12px;
    height: 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.yd-building-legend i.complete { background: #22c55e; border-color: rgba(22, 163, 74, 0.65); }
.yd-building-legend i.issue { background: #ef4444; border-color: rgba(220, 38, 38, 0.65); }
.yd-building-legend i.idle { background: #ffffff; border-color: rgba(148, 163, 184, 0.75); }

.yd-building-info-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.yd-building-info-chip {
    min-width: 0;
    min-height: 58px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 10px;
    padding: 9px 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(248, 250, 252, 0.66));
    box-shadow: 0 6px 15px rgba(15, 23, 42, 0.06);
}

.yd-building-info-chip span {
    display: block;
    margin-bottom: 4px;
    color: var(--text-soft);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.yd-building-info-chip b {
    display: block;
    min-width: 0;
    color: var(--text);
    font-size: 13px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yd-building-info-chip.stage {
    grid-column: span 2;
    border-color: rgba(37, 99, 235, 0.28);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.13), rgba(20, 184, 166, 0.08));
}

.yd-building-info-chip.yibf { border-left: 4px solid #2563eb; }
.yd-building-info-chip.idare { border-left: 4px solid #14b8a6; }
.yd-building-info-chip.parcel { border-left: 4px solid #f59e0b; }
.yd-building-info-chip.contractor { border-left: 4px solid #8b5cf6; }
.yd-building-info-chip.stage { border-left: 4px solid #0ea5e9; }

.yd-building-model-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(280px, 1fr);
    gap: 14px;
    align-items: stretch;
}

.yd-building-stack {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 2px;
    min-width: 0;
    border-radius: 16px;
    padding: 18px 22px 16px;
    background:
        radial-gradient(circle at 18% 12%, rgba(14, 165, 233, 0.12), transparent 24%),
        linear-gradient(90deg, rgba(148, 163, 184, 0.1) 1px, transparent 1px),
        linear-gradient(180deg, rgba(226, 232, 240, 0.62), rgba(255, 255, 255, 0.26));
    background-size: 100% 100%, 28px 28px, 100% 100%;
    border: 1px solid rgba(148, 163, 184, 0.32);
    overflow: hidden;
}

.yd-building-stack::before {
    content: "";
    width: 82%;
    height: 18px;
    align-self: center;
    border-radius: 10px 10px 4px 4px;
    border: 1px solid rgba(71, 85, 105, 0.28);
    background: linear-gradient(135deg, #64748b, #334155);
    box-shadow: 14px 8px 0 rgba(15, 23, 42, 0.12);
    transform: perspective(90px) rotateX(16deg);
}

.yd-building-stack::after {
    content: "";
    width: 104%;
    height: 16px;
    align-self: center;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(51, 65, 85, 0.24), rgba(51, 65, 85, 0.02) 68%, transparent 72%);
}

.yd-building-floor {
    position: relative;
    width: 88%;
    min-height: 48px;
    margin: 0 auto;
    border: 1px solid rgba(100, 116, 139, 0.5);
    border-radius: 4px;
    padding: 7px 12px 7px 10px;
    color: #0f172a;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.5), transparent 18%, transparent 82%, rgba(15, 23, 42, 0.06)),
        linear-gradient(180deg, #ffffff, #e2e8f0);
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(86px, 0.55fr) minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    text-align: left;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        inset -12px 0 0 rgba(15, 23, 42, 0.06),
        8px 4px 12px rgba(15, 23, 42, 0.08);
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.yd-building-floor::after {
    content: "";
    position: absolute;
    top: 5px;
    right: -9px;
    width: 9px;
    height: calc(100% - 8px);
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, rgba(71, 85, 105, 0.22), rgba(15, 23, 42, 0.12));
    transform: skewY(26deg);
    transform-origin: left top;
    pointer-events: none;
}

.yd-building-floor:hover {
    transform: translateY(-1px);
    border-color: rgba(15, 117, 184, 0.55);
    box-shadow: 0 8px 18px rgba(15, 117, 184, 0.15);
}

.yd-building-floor.active {
    outline: 2px solid rgba(37, 99, 235, 0.46);
    outline-offset: 2px;
}

.yd-building-floor.complete {
    color: #052e16;
    border-color: rgba(22, 163, 74, 0.62);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.48), transparent 18%, transparent 82%, rgba(5, 46, 22, 0.09)),
        linear-gradient(135deg, #dcfce7, #86efac);
}

.yd-building-floor.issue {
    color: #450a0a;
    border-color: rgba(220, 38, 38, 0.62);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.48), transparent 18%, transparent 82%, rgba(69, 10, 10, 0.08)),
        linear-gradient(135deg, #fee2e2, #fca5a5);
}

.yd-building-floor.idle {
    color: #334155;
}

.yd-building-floor.foundation {
    width: 98%;
    min-height: 42px;
    margin: 5px auto 0;
    grid-template-columns: minmax(96px, 0.45fr) minmax(0, 1fr);
    border-radius: 6px 6px 12px 12px;
    background:
        repeating-linear-gradient(135deg, rgba(71, 85, 105, 0.14) 0 8px, rgba(255, 255, 255, 0.12) 8px 16px),
        linear-gradient(180deg, #cbd5e1, #94a3b8);
}

.yd-building-floor.latest {
    animation: ydBuildingLatestPulse 1.15s ease-in-out infinite;
}

.yd-building-floor-label {
    min-width: 0;
    font-size: 14px;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yd-building-floor-status {
    flex: 0 0 auto;
    font-size: 12px;
    font-weight: 800;
    opacity: 0.82;
    white-space: nowrap;
}

.yd-building-floor-copy {
    min-width: 0;
    display: grid;
    justify-items: end;
    gap: 2px;
}

.yd-building-window-row,
.yd-building-foundation-pattern {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    min-width: 0;
}

.yd-building-window-row i {
    display: block;
    height: 20px;
    border-radius: 4px 4px 2px 2px;
    border: 1px solid rgba(30, 64, 175, 0.22);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, #dbeafe, #93c5fd);
    box-shadow: inset 0 -4px 0 rgba(30, 64, 175, 0.1);
}

.yd-building-floor.basement .yd-building-window-row i {
    height: 13px;
    border-radius: 3px;
    background: linear-gradient(180deg, #cbd5e1, #94a3b8);
    opacity: 0.72;
}

.yd-building-foundation-pattern i {
    display: block;
    height: 12px;
    border-radius: 3px;
    background: rgba(51, 65, 85, 0.24);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.yd-building-stack.three {
    display: block;
    min-height: 420px;
    padding: 0;
    border-radius: 16px;
    background:
        radial-gradient(circle at 18% 14%, rgba(59, 130, 246, 0.18), transparent 25%),
        linear-gradient(180deg, #eef6ff, #f8fafc 58%, #e2e8f0);
    touch-action: none;
}

.yd-building-stack.three::before,
.yd-building-stack.three::after {
    display: none;
}

.yd-building-stack.three.variant-realistic,
.yd-building-stack.three.variant-v2 {
    background:
        radial-gradient(circle at 22% 18%, rgba(148, 163, 184, 0.22), transparent 28%),
        linear-gradient(180deg, #dbe7f3 0%, #c8d9ea 52%, #b8c9dc 100%);
    border: 1px solid rgba(100, 116, 139, 0.22);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.yd-building-stack.three.variant-realistic .yd-building-3d-caption,
.yd-building-stack.three.variant-v2 .yd-building-3d-caption {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 12px;
    padding: 8px 10px;
}

.yd-building-stack.three.variant-realistic .yd-3d-kaba-panel,
.yd-building-stack.three.variant-v2 .yd-3d-kaba-panel {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.34);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.24);
}

.yd-building-stack.three.variant-realistic .yd-3d-kaba-item,
.yd-building-stack.three.variant-v2 .yd-3d-kaba-item {
    color: #e2e8f0;
}

.yd-building-stack.three.variant-realistic .yd-3d-kaba-panel-title,
.yd-building-stack.three.variant-v2 .yd-3d-kaba-panel-title {
    color: #f8fafc;
}

.yd-building-3d-rotate-hint {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    padding: 7px 14px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.76);
    border: 1px solid rgba(148, 163, 184, 0.32);
    color: #f8fafc;
    font-size: 12px;
    font-weight: 700;
    pointer-events: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.18);
    white-space: nowrap;
}

.yd-building-stack.three .yd-building-3d-canvas-wrap.is-grabbing {
    cursor: grabbing !important;
}

.yd-building-3d-canvas-wrap {
    position: relative;
    width: 100%;
    height: clamp(320px, 46vh, 520px);
    min-height: 320px;
    overflow: hidden;
    border-radius: 16px;
}

.yd-building-3d-canvas-wrap canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    min-height: 320px;
}

.yd-building-3d-tools {
    position: absolute;
    top: auto;
    bottom: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, 0.38);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
}

.yd-building-3d-tool {
    min-width: 40px;
    min-height: 40px;
    border: 1px solid rgba(148, 163, 184, 0.45);
    border-radius: 9px;
    background: #ffffff;
    color: #0f172a;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, opacity 0.16s ease;
}

.yd-building-3d-tool.fit {
    min-width: 48px;
    width: 48px;
    padding: 0 6px;
    font-size: 12px;
}

.yd-building-3d-tool:hover {
    border-color: rgba(37, 99, 235, 0.5);
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.yd-building-3d-tool:disabled {
    cursor: not-allowed;
    opacity: 0.45;
    transform: none;
    box-shadow: none;
}

.yd-building-3d-caption {
    display: none;
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 14px;
    z-index: 2;
    min-height: 0;
    border: 0;
    border-radius: 0;
    padding: 0;
    color: #0f172a;
    background: transparent;
    backdrop-filter: none;
    box-shadow: none;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    pointer-events: none;
}

.yd-building-3d-badge {
    min-height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    border: 1px solid transparent;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
    max-width: 100%;
}

.yd-building-3d-badge.is-floor {
    background: #dbeafe;
    color: #1d4ed8;
    border-color: #bfdbfe;
}

.yd-building-3d-badge.is-complete {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.yd-building-3d-badge.is-progress {
    background: #dbeafe;
    color: #1e40af;
    border-color: #bfdbfe;
}

.yd-building-3d-badge.is-issue {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}

.yd-building-3d-badge.is-idle {
    background: #e2e8f0;
    color: #334155;
    border-color: #cbd5e1;
}

.yd-building-3d-badge.is-progress-detail {
    background: #fef9c3;
    color: #854d0e;
    border-color: #fde68a;
}

.yd-building-3d-badge.is-count {
    background: #e2e8f0;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* ── Kaba imalat bilgi çubuğu (üst, yatay) ─────────────── */
.yd-3d-kaba-panel {
    display: none;
    position: absolute;
    top: 10px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    z-index: 4;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(148, 163, 184, 0.36);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.13);
    pointer-events: none;
    white-space: nowrap;
    max-width: calc(100% - 100px);
}
.yd-3d-kaba-panel.left  {}
.yd-3d-kaba-panel.right { display: none !important; }

.yd-3d-kaba-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
}
.yd-3d-kaba-item svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}
.yd-3d-kaba-item span {
    /* tam metin, kesme yok */
}
.yd-3d-kaba-tick {
    flex-shrink: 0;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 900;
}
.yd-3d-kaba-tick.done {
    background: #dcfce7;
    color: #15803d;
}
.yd-3d-kaba-tick.prog {
    background: #fef9c3;
    color: #92400e;
    font-size: 9px;
}
.yd-3d-kaba-tick.none {
    background: #f1f5f9;
    color: #94a3b8;
}
.yd-3d-kaba-sep {
    width: 1px;
    height: 18px;
    background: rgba(148,163,184,0.38);
    flex-shrink: 0;
    margin: 0 2px;
}
.yd-3d-kaba-panel-title {
    font-size: 11px;
    font-weight: 900;
    color: #3b82f6;
    letter-spacing: 0.02em;
    margin-right: 2px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .yd-3d-kaba-panel { gap: 3px; padding: 5px 10px; max-width: calc(100% - 80px); }
    .yd-3d-kaba-item  { font-size: 11px; }
}
@media (max-width: 480px) {
    .yd-3d-kaba-panel { gap: 2px; padding: 5px 8px; max-width: calc(100% - 16px); }
    .yd-3d-kaba-item  { font-size: 10px; }
    .yd-3d-kaba-item svg { width: 14px; height: 14px; }
}

.yd-building-3d-fallback {
    min-height: 320px;
    display: grid;
    place-items: center;
    padding: 18px;
    color: var(--text-soft);
    text-align: center;
    font-size: 14px;
    font-weight: 800;
}

.yd-building-history {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
    padding: 10px;
}

.yd-building-history-title {
    font-size: 14px;
    font-weight: 900;
    margin-bottom: 8px;
}

.yd-building-history-controls {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 8px;
}

.yd-building-history-control.is-disabled label,
.yd-building-history-control-phase.is-disabled label {
    color: var(--text-soft);
    opacity: 0.72;
}

.yd-building-history-control .yd-select:disabled,
.yd-building-history-control-phase .yd-select:disabled {
    opacity: 0.62;
    cursor: not-allowed;
    background: var(--surface-2);
    color: var(--text-soft);
}

.yd-building-history-control {
    display: grid;
    gap: 4px;
}

.yd-building-history-control label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

.yd-building-history-control .yd-select {
    min-height: 36px;
    font-size: 13px;
}

.yd-building-history-list {
    display: grid;
    gap: 8px;
    max-height: 360px;
    overflow: auto;
    padding-right: 2px;
}

.yd-building-history-item {
    min-height: 58px;
    width: 100%;
    border: 1px solid var(--border);
    border-left: 4px solid rgba(148, 163, 184, 0.75);
    border-radius: 10px;
    padding: 9px 10px;
    background: linear-gradient(135deg, var(--surface), var(--surface-2));
    color: var(--text);
    text-align: left;
    cursor: pointer;
    display: grid;
    gap: 6px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.yd-building-history-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.yd-building-history-item-head b {
    flex: 1 1 auto;
    min-width: 0;
}

.yd-building-history-open-hint {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.yd-building-history-open-text {
    display: inline;
}

.yd-building-history-chevron {
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    transition: transform 0.16s ease;
}

.yd-building-history-item:hover,
.yd-building-history-item:focus-visible {
    border-color: rgba(37, 99, 235, 0.55);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 0.96));
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
    outline: none;
}

.yd-building-history-item:hover .yd-building-history-chevron,
.yd-building-history-item:focus-visible .yd-building-history-chevron,
.yd-building-history-item.active .yd-building-history-chevron {
    transform: translateX(2px);
}

.yd-building-history-item.active {
    border-color: rgba(37, 99, 235, 0.62);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.14), 0 8px 20px rgba(37, 99, 235, 0.12);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(255, 255, 255, 0.98));
}

#p_current_username[readonly] {
    background: var(--surface-2);
    color: var(--text-soft);
    cursor: default;
}

.yd-building-history-item.complete { border-left-color: #22c55e; }
.yd-building-history-item.issue { border-left-color: #ef4444; }

.yd-building-history-item b {
    font-size: 13px;
    color: var(--text);
}

.yd-building-history-item span,
.yd-building-history-item small {
    font-size: 12px;
    color: var(--text-soft);
}

.yd-building-history-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.yd-building-history-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yd-building-history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.yd-building-history-badge.date {
    color: #1d4ed8;
    background: rgba(59, 130, 246, 0.16);
    border-color: rgba(59, 130, 246, 0.28);
}

.yd-building-history-badge.weekday {
    color: #0369a1;
    background: rgba(14, 165, 233, 0.15);
    border-color: rgba(14, 165, 233, 0.3);
}

.yd-building-history-badge.yes {
    color: #166534;
    background: rgba(34, 197, 94, 0.16);
    border-color: rgba(34, 197, 94, 0.34);
}

.yd-building-history-badge.no {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.16);
    border-color: rgba(239, 68, 68, 0.34);
}

.yd-building-history-badge.nip {
    color: #0f766e;
    background: rgba(20, 184, 166, 0.14);
    border-color: rgba(20, 184, 166, 0.32);
}

.yd-building-history-badge.pending {
    color: #92400e;
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.36);
}

.yd-building-history-empty {
    border: 1px dashed var(--border);
    border-radius: 10px;
    padding: 14px;
    color: var(--text-soft);
    font-size: 13px;
    background: var(--surface-2);
}

.yd-level-open-hint {
    margin-top: 12px;
    border: 1px dashed rgba(37, 99, 235, 0.32);
    border-radius: 12px;
    padding: 14px;
    color: var(--text-soft);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(20, 184, 166, 0.05));
    font-size: 14px;
    font-weight: 800;
}

.yd-level-questions-sheet {
    width: min(1040px, calc(100vw - 40px));
    max-height: calc(100vh - 40px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yd-level-questions-sheet .yd-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

.yd-level-question-detail {
    margin-top: 12px;
}

@keyframes ydBuildingLatestPulse {
    0%, 100% {
        border-color: rgba(37, 99, 235, 0.58);
        box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.34), 0 4px 12px rgba(37, 99, 235, 0.16);
        filter: saturate(1);
    }
    50% {
        border-color: rgba(37, 99, 235, 0.96);
        box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14), 0 9px 22px rgba(37, 99, 235, 0.24);
        filter: saturate(1.14);
    }
}

[data-theme="dark"] .yd-building-model-wrap {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(45, 212, 191, 0.08), var(--surface));
}

[data-theme="dark"] .yd-building-history-control label {
    color: #dbeafe;
}

[data-theme="dark"] .yd-building-history-badge.date {
    color: #bfdbfe;
}

[data-theme="dark"] .yd-building-history-badge.weekday {
    color: #bae6fd;
}

[data-theme="dark"] .yd-building-history-badge.yes {
    color: #bbf7d0;
}

[data-theme="dark"] .yd-building-history-badge.no {
    color: #fecaca;
}

[data-theme="dark"] .yd-building-history-badge.nip {
    color: #99f6e4;
}

[data-theme="dark"] .yd-building-history-badge.pending {
    color: #fde68a;
}

[data-theme="dark"] .yd-building-info-chip {
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.24), rgba(15, 23, 42, 0.64));
    border-color: rgba(96, 165, 250, 0.38);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.34);
}

[data-theme="dark"] .yd-building-info-chip span {
    color: #bfdbfe;
}

[data-theme="dark"] .yd-building-info-chip b {
    color: #e2e8f0;
}

[data-theme="dark"] .yd-building-info-chip.yibf {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.26), rgba(15, 23, 42, 0.62));
}

[data-theme="dark"] .yd-building-info-chip.idare {
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.24), rgba(15, 23, 42, 0.62));
}

[data-theme="dark"] .yd-building-info-chip.parcel {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.24), rgba(15, 23, 42, 0.62));
}

[data-theme="dark"] .yd-building-info-chip.contractor {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(15, 23, 42, 0.62));
}

[data-theme="dark"] .yd-building-info-chip.stage {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.26), rgba(20, 184, 166, 0.18));
    border-color: rgba(56, 189, 248, 0.44);
}

[data-theme="dark"] .yd-building-stack {
    background:
        linear-gradient(90deg, rgba(148, 163, 184, 0.14) 1px, transparent 1px),
        linear-gradient(180deg, rgba(15, 23, 42, 0.35), rgba(15, 23, 42, 0.12));
    background-size: 28px 28px, 100% 100%;
}

[data-theme="dark"] .yd-building-stack.three {
    background:
        radial-gradient(circle at 18% 14%, rgba(56, 189, 248, 0.16), transparent 25%),
        linear-gradient(180deg, #111827, #0f172a 58%, #1e293b);
}

[data-theme="dark"] .yd-building-3d-caption {
    color: #e5ecf6;
    background: transparent;
    border-color: transparent;
}

[data-theme="dark"] .yd-building-3d-badge.is-floor {
    background: #1e3a8a;
    color: #dbeafe;
    border-color: #1d4ed8;
}

[data-theme="dark"] .yd-building-3d-badge.is-complete {
    background: #14532d;
    color: #dcfce7;
    border-color: #15803d;
}

[data-theme="dark"] .yd-building-3d-badge.is-progress {
    background: #1e3a8a;
    color: #dbeafe;
    border-color: #1d4ed8;
}

[data-theme="dark"] .yd-building-3d-badge.is-issue {
    background: #7f1d1d;
    color: #fee2e2;
    border-color: #b91c1c;
}

[data-theme="dark"] .yd-building-3d-badge.is-idle {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .yd-building-3d-badge.is-progress-detail {
    background: #713f12;
    color: #fef9c3;
    border-color: #a16207;
}

[data-theme="dark"] .yd-building-3d-badge.is-count {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .yd-building-3d-tools {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.38);
}

[data-theme="dark"] .yd-building-3d-tool {
    color: #e5ecf6;
    background: rgba(30, 41, 59, 0.96);
    border-color: rgba(148, 163, 184, 0.42);
}

[data-theme="dark"] .yd-building-variant-toggle {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(71, 85, 105, 0.85);
}

[data-theme="dark"] .yd-building-variant-btn {
    color: #cbd5e1;
}

[data-theme="dark"] .yd-building-variant-btn.is-active {
    color: #ffffff;
}

[data-theme="dark"] .yd-building-variant-note {
    border-color: rgba(96, 165, 250, 0.48);
    background: rgba(30, 64, 175, 0.36);
    color: #dbeafe;
}

[data-theme="dark"] .yd-building-variant-note.is-warning {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(153, 27, 27, 0.42);
    color: #fecaca;
}

[data-theme="dark"] .yd-building-floor.idle {
    color: #e5ecf6;
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.98), rgba(15, 23, 42, 0.88));
}

[data-theme="dark"] .yd-building-floor.complete {
    color: #dcfce7;
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.62), rgba(21, 128, 61, 0.4));
}

[data-theme="dark"] .yd-building-floor.issue {
    color: #fee2e2;
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.64), rgba(153, 27, 27, 0.42));
}

.yd-level-stage-btn {
    min-height: 48px;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    text-align: left;
    padding: 10px 12px;
    cursor: pointer;
    display: grid;
    gap: 5px;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease, transform .16s ease;
}

.yd-level-stage-btn:hover {
    border-left-color: rgba(64, 168, 223, 0.6);
    box-shadow: 0 4px 14px rgba(15, 117, 184, 0.12);
    transform: translateX(2px);
}

.yd-level-stage-btn.active {
    border-left-color: var(--primary);
    border-color: rgba(64, 168, 223, 0.5);
    box-shadow: 0 6px 18px rgba(15, 117, 184, 0.18);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.16), rgba(69, 209, 191, 0.14));
}

.yd-level-stage-btn b {
    font-size: 14px;
    color: var(--primary);
}

.yd-level-stage-btn.active b {
    color: var(--primary);
}

.yd-level-answer-block {
    width: 100%;
    display: grid;
    gap: 6px;
}

.yd-question-line {
    display: inline-flex;
    align-items: flex-start;
    gap: 10px;
}

.yd-question-index {
    min-width: 24px;
}

.yd-level-answer-status {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-soft);
}

.yd-level-inline-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.yd-level-inline-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    max-width: 100%;
    overflow-wrap: anywhere;
}

.yd-level-inline-pill.note {
    border-color: rgba(59, 130, 246, 0.42);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.14), rgba(14, 165, 233, 0.12));
}

.yd-level-inline-pill.mark {
    border-color: rgba(217, 119, 6, 0.42);
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(249, 115, 22, 0.12));
}

.yd-level-inline-pill.inspector {
    border-color: rgba(16, 185, 129, 0.42);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.16), rgba(20, 184, 166, 0.12));
}

.yd-level-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 28px;
    width: fit-content;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    color: #5b3209;
    background: linear-gradient(135deg, #ffd54f, #ffab91);
    border: 1px solid rgba(206, 128, 86, 0.55);
    box-shadow: 0 5px 12px rgba(180, 117, 72, 0.22);
}

.yd-level-date-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f57c00;
    box-shadow: 0 0 0 2px rgba(245, 124, 0, 0.2);
    flex: 0 0 8px;
}

[data-theme="dark"] .yd-level-date-badge {
    color: #3e2a16;
    background: linear-gradient(135deg, #ffd54f, #ffab91);
    border-color: rgba(206, 128, 86, 0.62);
}

[data-theme="dark"] .yd-level-inline-pill {
    color: #e5ecf6;
    border-color: rgba(125, 211, 252, 0.36);
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.84), rgba(15, 23, 42, 0.82));
}

.yd-level-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
    gap: 8px;
    margin-top: 2px;
}

.yd-level-photo-thumb {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 2px;
    background: var(--surface);
    cursor: pointer;
    min-height: 72px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.yd-level-photo-thumb:hover {
    border-color: var(--primary);
    box-shadow: 0 6px 16px rgba(15, 117, 184, 0.2);
    transform: scale(1.04);
}

.yd-level-photo-thumb img {
    width: 100%;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.2s ease;
}

.yd-level-photo-thumb:hover img {
    transform: scale(1.06);
}

.yd-level-photo-list-sheet .yd-modal-body {
    display: grid;
    gap: 12px;
}

.yd-level-photo-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}

.yd-level-photo-list-item {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0;
    background: var(--surface);
    cursor: pointer;
    min-height: 120px;
    overflow: hidden;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.16s ease;
}

.yd-level-photo-list-item:hover,
.yd-level-photo-list-item:focus-visible {
    border-color: var(--primary);
    box-shadow: 0 8px 18px rgba(15, 117, 184, 0.22);
    transform: translateY(-1px);
    outline: none;
}

.yd-level-photo-list-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.yd-level-photo-list-index {
    position: absolute;
    top: 8px;
    left: 8px;
    min-width: 24px;
    min-height: 24px;
    padding: 0 7px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    color: #fff;
    background: rgba(15, 23, 42, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.yd-photo-modal-sheet {
    width: min(1080px, 100%);
}

.yd-photo-viewer-wrap {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #0d1524;
    min-height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.yd-photo-viewer-image {
    display: block;
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

.yd-photo-watermark {
    position: absolute;
    left: 10px;
    bottom: 10px;
    max-width: calc(100% - 20px);
    padding: 6px 8px;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, 0.55);
}

.yd-photo-meta-line {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-photo-note {
    margin: 0 0 10px 0;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    padding: 10px;
    font-size: 13px;
    line-height: 1.45;
    font-weight: 800;
}

.yd-photo-note-question {
    display: inline;
}

.yd-photo-question-toggle {
    width: 100%;
    min-height: 40px;
    border: 1px solid rgba(64, 168, 223, 0.26);
    border-radius: 10px;
    background: rgba(64, 168, 223, 0.08);
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    font-size: 13px;
    font-weight: 800;
    text-align: left;
    cursor: pointer;
}

.yd-photo-question-toggle-title {
    min-width: 0;
}

.yd-photo-question-toggle-icon {
    font-size: 14px;
    color: var(--primary);
}

.yd-photo-question-collapse {
    margin-top: 8px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.45);
    padding: 9px 10px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.45;
}

.yd-photo-question-collapse.is-collapsed {
    display: none;
}

[data-theme="dark"] .yd-photo-question-toggle {
    border-color: rgba(96, 165, 250, 0.42);
    background: rgba(30, 64, 112, 0.34);
    color: #e6f1ff;
}

[data-theme="dark"] .yd-photo-question-toggle-icon {
    color: #8cc8ff;
}

[data-theme="dark"] .yd-photo-question-collapse {
    border-color: rgba(148, 163, 184, 0.36);
    background: rgba(11, 24, 44, 0.58);
    color: #e6f1ff;
}

.yd-photo-answer-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    vertical-align: middle;
}

.yd-photo-answer-row {
    margin-top: 8px;
}

.yd-photo-answer-row .yd-photo-answer-badge {
    margin-left: 0;
}

.yd-photo-answer-badge.ok {
    color: #166534;
    background: rgba(34, 197, 94, 0.18);
    border-color: rgba(22, 163, 74, 0.45);
}

.yd-photo-answer-badge.no {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(220, 38, 38, 0.45);
}

.yd-photo-answer-badge.not-in-project {
    color: #1e3a8a;
    background: rgba(59, 130, 246, 0.18);
    border-color: rgba(37, 99, 235, 0.45);
}

.yd-photo-answer-badge.pending {
    color: #334155;
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(100, 116, 139, 0.45);
}

[data-theme="dark"] .yd-photo-answer-badge.ok {
    color: #86efac;
    background: rgba(22, 163, 74, 0.22);
    border-color: rgba(34, 197, 94, 0.52);
}

[data-theme="dark"] .yd-photo-answer-badge.no {
    color: #fda4af;
    background: rgba(220, 38, 38, 0.22);
    border-color: rgba(244, 63, 94, 0.52);
}

[data-theme="dark"] .yd-photo-answer-badge.not-in-project {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.24);
    border-color: rgba(96, 165, 250, 0.52);
}

[data-theme="dark"] .yd-photo-answer-badge.pending {
    color: #cbd5e1;
    background: rgba(71, 85, 105, 0.34);
    border-color: rgba(148, 163, 184, 0.45);
}

.yd-photo-note-overlay {
    position: absolute;
    z-index: 4;
    max-width: min(420px, calc(100% - 24px));
    border-radius: 12px;
    border: 1px solid rgba(255, 214, 166, 0.35);
    background: linear-gradient(135deg, rgba(141, 19, 19, 0.93), rgba(198, 77, 18, 0.9));
    color: #fff5ea;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
    font-size: 13px;
    line-height: 1.45;
    font-weight: 600;
    padding: 10px 11px;
    overflow-wrap: anywhere;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.yd-photo-note-overlay.yd-note-overlay-expanded {
    -webkit-line-clamp: initial;
    max-height: min(42vh, 260px);
    overflow-y: auto;
}

.yd-photo-note-overlay.pos-rb {
    right: 10px;
    bottom: 56px;
}

.yd-photo-note-overlay.pos-rt {
    right: 10px;
    top: 10px;
}

.yd-photo-note-overlay.pos-lb {
    left: 10px;
    bottom: 56px;
}

.yd-photo-note-overlay.pos-lt {
    left: 10px;
    top: 10px;
}

.yd-question-history-wrap {
    margin-top: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    padding: 10px;
}

.yd-question-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-question-history-head b {
    font-size: 15px;
}

.yd-question-history-layout {
    margin-top: 8px;
    display: grid;
    grid-template-columns: minmax(220px, 280px) 1fr;
    gap: 10px;
}

.yd-question-history-list {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 8px;
    max-height: 360px;
    overflow-y: auto;
}

.yd-question-history-item {
    width: 100%;
    text-align: left;
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--surface-2), var(--surface));
    padding: 9px 10px;
    margin-bottom: 8px;
    cursor: pointer;
    min-height: 40px;
    transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.14s ease, background 0.16s ease;
}

.yd-question-history-item:hover {
    border-left-color: var(--primary);
    transform: translateX(2px);
    box-shadow: 0 3px 10px rgba(15, 117, 184, 0.1);
}

.yd-question-history-item:last-child {
    margin-bottom: 0;
}

.yd-question-history-item.active {
    border-left-color: var(--primary);
    border-color: rgba(64, 168, 223, 0.4);
    background: linear-gradient(135deg, rgba(64, 168, 223, 0.1), rgba(69, 209, 191, 0.07));
    box-shadow: 0 4px 14px rgba(15, 117, 184, 0.14);
}

.yd-question-history-item b {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
}

.yd-question-history-item .yd-subtitle {
    font-size: 13px;
}

.yd-question-history-timeline {
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    padding: 10px;
    max-height: 360px;
    overflow-y: auto;
}

.yd-history-resolution {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.yd-history-resolution.resolved {
    background: rgba(35, 146, 69, 0.14);
    color: #116930;
}

.yd-history-resolution.open {
    background: rgba(168, 44, 44, 0.14);
    color: #9a2020;
}

.yd-history-resolution.never_failed {
    background: rgba(24, 93, 161, 0.13);
    color: #174f86;
}

.yd-history-event {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    background: var(--surface-2);
    margin-bottom: 8px;
}

.yd-history-event:last-child {
    margin-bottom: 0;
}

.yd-history-event-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-history-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 3px 9px;
    font-size: 13px;
    font-weight: 700;
}

.yd-history-status.yes {
    background: rgba(35, 146, 69, 0.14);
    color: #116930;
}

.yd-history-status.no {
    background: rgba(168, 44, 44, 0.14);
    color: #9a2020;
}

.yd-history-status.not-in-project {
    background: rgba(37, 99, 235, 0.14);
    color: #1d4ed8;
}

.yd-history-status.pending {
    background: rgba(58, 73, 87, 0.14);
    color: #3a4957;
}

.yd-history-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 24px;
    padding: 3px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border: 1px solid rgba(124, 153, 182, 0.45);
    color: #35506d;
    font-size: 12px;
    font-weight: 700;
}

.yd-history-date-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #4da3ff;
    box-shadow: 0 0 0 2px rgba(77, 163, 255, 0.18);
    flex: 0 0 7px;
}

[data-theme="dark"] .yd-history-date-badge {
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border-color: rgba(124, 153, 182, 0.55);
    color: #35506d;
}

.yd-level-history-row {
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-level-history-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1px;
    border: 1px solid transparent;
}

.yd-level-history-chip::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.75;
    flex: 0 0 6px;
}

.yd-level-history-chip.open {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.28);
    color: #b91c1c;
}

.yd-level-history-chip.resolved {
    background: rgba(245, 158, 11, 0.14);
    border-color: rgba(245, 158, 11, 0.32);
    color: #92400e;
}

.yd-level-history-chip.never_failed {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.28);
    color: #15803d;
}

[data-theme="dark"] .yd-level-history-chip.open {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
}

[data-theme="dark"] .yd-level-history-chip.resolved {
    background: rgba(245, 158, 11, 0.18);
    color: #fcd34d;
}

[data-theme="dark"] .yd-level-history-chip.never_failed {
    background: rgba(34, 197, 94, 0.18);
    color: #86efac;
}

#archive-flow-history-btn,
.yd-level-history-btn[data-question-history-open] {
    min-height: 40px;
    background: linear-gradient(135deg, #ffecb3, #d7ccc8) !important;
    border: 1px solid #c7b9ad !important;
    color: #4f3c2f !important;
    box-shadow: 0 4px 10px rgba(103, 78, 62, 0.18) !important;
}

#archive-flow-history-btn:hover,
.yd-level-history-btn[data-question-history-open]:hover {
    background: linear-gradient(135deg, #ffe6a0, #cfbfba);
    border-color: #bda99b;
}

#archive-flow-history-btn:active,
.yd-level-history-btn[data-question-history-open]:active {
    transform: translateY(1px);
}

[data-theme="dark"] #archive-flow-history-btn,
[data-theme="dark"] .yd-level-history-btn[data-question-history-open] {
    background: linear-gradient(135deg, #ffecb3, #d7ccc8);
    border-color: #c7b9ad;
    color: #4f3c2f;
    box-shadow: 0 4px 10px rgba(103, 78, 62, 0.22);
}

[data-theme="dark"] #archive-flow-history-btn:hover,
[data-theme="dark"] .yd-level-history-btn[data-question-history-open]:hover {
    background: linear-gradient(135deg, #ffe6a0, #cfbfba);
    border-color: #bda99b;
}

.yd-level-history-btn[data-level-mark-view] {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
    box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
}

.yd-level-history-btn[data-level-mark-view]:hover {
    background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
    border-color: #0a5f59 !important;
}

.yd-level-history-btn[data-control-mark-view],
#control-detail-modal [data-control-mark-view] {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
    box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
}

.yd-level-history-btn[data-control-mark-view]:hover,
#control-detail-modal [data-control-mark-view]:hover {
    background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
    border-color: #0a5f59 !important;
}

#archive-question-history-modal-body [data-history-modal-marks] {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
    box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
}

#archive-question-history-modal-body [data-history-modal-marks]:hover {
    background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
    border-color: #0a5f59 !important;
}

[data-theme="dark"] #archive-question-history-modal-body [data-history-modal-marks] {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
}

#archive-flow-modal #archive-mark-open-btn {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
    box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
}

#archive-flow-modal .yd-mark-action-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#archive-flow-modal #archive-project-file-status {
    margin: 0;
    color: #b91c1c;
    font-weight: 600;
    min-height: 20px;
}

.yd-photo-source-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-photo-source-btn {
    min-height: 40px;
}

.yd-file-hidden {
    display: none !important;
}

#archive-flow-modal #archive-mark-open-btn:hover {
    background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
    border-color: #0a5f59 !important;
}

[data-theme="dark"] #archive-flow-modal #archive-mark-open-btn {
    background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
    border: 1px solid #0c6a63 !important;
    color: #f0fdfa !important;
}

.yd-progress-item.history-open {
    border-color: rgba(168, 44, 44, 0.35);
}

.yd-progress-item.history-resolved {
    border-color: rgba(201, 137, 18, 0.45);
}

.yd-question-history-modal-body {
    display: grid;
    gap: 8px;
}

.yd-answer-btn {
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-height: 44px;
    font-weight: 700;
    font-size: 14px;
    transition: background 0.16s ease, border-color 0.16s ease, transform 0.13s ease, box-shadow 0.16s ease;
}

.yd-answer-btn:hover {
    border-color: rgba(64, 168, 223, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(15, 50, 100, 0.1);
}

.yd-answer-btn.is-active.yes {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #15803d;
    color: #fff;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.3);
    transform: translateY(-1px);
}

.yd-answer-btn.is-active.no {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #991b1b;
    color: #fff;
    box-shadow: 0 6px 16px rgba(185, 28, 28, 0.28);
    transform: translateY(-1px);
}

.yd-answer-btn.is-active.not-in-project {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #1e40af;
    color: #fff;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

.yd-flow-title-sep {
    color: var(--text-soft);
    margin: 0 4px;
}

.yd-flow-floor-title {
    color: #0f75b8;
}

.yd-flow-question-meta {
    margin-top: -2px;
    margin-bottom: 8px;
    min-height: 20px;
}

.yd-flow-history-wrap {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    margin-bottom: 6px;
}

.yd-flow-bottom-actions {
    margin-top: 18px;
    margin-bottom: 4px;
}

.yd-progress-dots {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 10px 8px;
    background: linear-gradient(135deg, var(--surface-3), var(--surface-2));
    border: 1px solid var(--border);
    border-radius: 14px;
}

.yd-progress-dot {
    width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 999px;
    border: 2px solid var(--border);
    background: linear-gradient(135deg, #dde4ef, #c8d2e0);
    color: #374151;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    line-height: 1;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    box-shadow: 0 2px 6px rgba(30, 50, 80, 0.12);
}

.yd-progress-dot:hover {
    transform: translateY(-2px) scale(1.08);
    box-shadow: 0 5px 12px rgba(30, 50, 80, 0.2);
}

.yd-progress-dot.yes {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-color: #15803d;
    color: #fff;
    box-shadow: 0 3px 10px rgba(22, 163, 74, 0.35);
}

.yd-progress-dot.no {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #991b1b;
    color: #fff;
    box-shadow: 0 3px 10px rgba(185, 28, 28, 0.32);
}

.yd-progress-dot.not-in-project {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    border-color: #1e40af;
    color: #fff;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.3);
}

.yd-progress-dot.pending {
    background: linear-gradient(135deg, #dde4ef, #c8d2e0);
    border-color: #a9b6c6;
    color: #374151;
}

.yd-progress-dot.current {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25), 0 4px 12px rgba(34, 197, 94, 0.2);
    animation: ydCurrentDotPulse 1.05s ease-in-out infinite;
    transform: translateY(-2px) scale(1.1);
    z-index: 1;
}

@keyframes ydCurrentDotPulse {
    0% { box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.2), 0 0 0 0 rgba(46, 204, 113, 0.35); }
    50% { box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.5), 0 0 0 6px rgba(46, 204, 113, 0.12); }
    100% { box-shadow: 0 0 0 1px rgba(46, 204, 113, 0.2), 0 0 0 0 rgba(46, 204, 113, 0.0); }
}

.yd-flow-photo-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-flow-photo-item {
    position: relative;
    width: 84px;
    height: 84px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: var(--surface-2);
}

.yd-flow-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yd-flow-photo-badge {
    position: absolute;
    left: 4px;
    bottom: 4px;
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(15, 28, 49, 0.82);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.yd-flow-photo-remove {
    position: absolute;
    right: 4px;
    top: 4px;
    min-height: 24px;
    min-width: 24px;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    background: rgba(156, 27, 27, 0.9);
    color: #fff;
    font-weight: 700;
    line-height: 1;
}

.yd-structure-project-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-top: 8px;
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.08), rgba(69, 209, 191, 0.06));
}

.yd-structure-project-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-structure-project-meta {
    font-size: 13px;
    margin-top: 4px;
    color: var(--text-soft);
}

.yd-project-open-btn {
    min-height: 40px;
}

.yd-action-icon-autocad {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yd-action-icon-autocad svg {
    width: 18px;
    height: 18px;
    display: block;
}

.yd-project-open-structure-sheet {
    width: min(100%, 980px);
}

.yd-project-open-file-sheet {
    width: min(100%, 920px);
}

.yd-project-open-list,
.yd-project-open-files {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.yd-project-open-structure-item,
.yd-project-open-file-item {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.06), rgba(69, 209, 191, 0.05));
}

.yd-project-open-structure-item {
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.yd-project-open-structure-item:hover {
    border-color: var(--accent);
}

.yd-project-open-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-project-open-meta {
    margin-top: 6px;
    color: var(--text-soft);
    font-size: 13px;
}

.yd-project-open-type-badges {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.yd-project-open-type-badge {
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
}

.yd-project-open-type-badge .yd-action-icon-autocad {
    width: 14px;
    height: 14px;
}

.yd-project-open-type-badge .yd-action-icon-autocad svg {
    width: 14px;
    height: 14px;
}

.yd-project-open-file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.yd-project-open-file-actions .yd-button {
    min-height: 40px;
}

.yd-aps-viewer-sheet {
    width: min(100%, 1220px);
    max-width: 1220px;
    height: min(92vh, 920px);
    max-height: min(92vh, 920px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yd-aps-viewer-body {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

#aps-viewer-status {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

#aps-viewer-status.ok {
    color: #117d41;
}

#aps-viewer-status.error {
    color: #cc3d4c;
}

.yd-aps-viewer-canvas {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: radial-gradient(circle at 20% 20%, rgba(15, 23, 42, 0.08), rgba(15, 23, 42, 0.02));
    overflow: hidden;
}

.yd-aps-viewer-canvas > div,
.yd-aps-viewer-canvas .adsk-viewing-viewer,
.yd-aps-viewer-canvas .adsk-viewing-viewer .canvas-wrap,
.yd-aps-viewer-canvas .adsk-viewing-viewer .adsk-viewing-viewer-container {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
}

.yd-aps-viewer-frame {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    border: 0;
    border-radius: inherit;
    background: transparent;
}

[data-theme="dark"] .yd-aps-viewer-canvas {
    border-color: rgba(95, 139, 190, 0.38);
    background: radial-gradient(circle at 20% 20%, rgba(34, 57, 87, 0.72), rgba(19, 35, 58, 0.9));
}

.yd-upload-progress {
    display: none;
    margin: 8px 0 12px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
}

.yd-upload-progress.show {
    display: block;
}

.yd-upload-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.yd-upload-progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.yd-upload-progress-fill {
    width: 0%;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #0ea5e9, #22c55e);
    transition: width 0.2s ease;
}

.yd-upload-progress.error .yd-upload-progress-fill {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.yd-project-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    white-space: nowrap;
}

.yd-project-status.ready {
    color: #117d41;
    background: rgba(17, 125, 65, 0.12);
    border-color: rgba(17, 125, 65, 0.26);
}

.yd-project-status.processing {
    color: #8f5d00;
    background: rgba(202, 134, 0, 0.14);
    border-color: rgba(202, 134, 0, 0.3);
}

.yd-project-status.failed {
    color: #b22837;
    background: rgba(178, 40, 55, 0.12);
    border-color: rgba(178, 40, 55, 0.28);
}

.yd-archive-mark-sheet {
    width: min(1240px, 100%);
    max-height: 95vh;
}

.yd-archive-mark-body {
    padding-bottom: 12px;
}

.yd-archive-mark-body.hide-side-panel .yd-archive-mark-layout {
    grid-template-columns: 1fr;
}

.yd-archive-mark-body.hide-side-panel .yd-archive-mark-side {
    display: none;
}

.yd-archive-mark-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto auto;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}

#archive-mark-add-project-btn {
    min-height: 40px;
    white-space: nowrap;
}

.yd-archive-mark-page-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.yd-icon-history {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 6px;
    font-size: 15px;
    line-height: 1;
    vertical-align: -1px;
}

.yd-map-pin-mini {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 16px;
    margin-right: 7px;
    vertical-align: -2px;
}

.yd-map-pin-mini::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: #f31e1e;
    border: 1px solid rgba(199, 12, 12, 0.75);
}

.yd-map-pin-mini::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #fff;
    left: 4px;
    top: 4px;
}

.yd-photo-mini {
    position: relative;
    display: inline-block;
    width: 13px;
    height: 10px;
    margin: 0 4px 0 6px;
    vertical-align: -1px;
    border: 1.5px solid #1e3a8a;
    border-radius: 3px;
    background: linear-gradient(180deg, #dbeafe, #bfdbfe);
}

.yd-photo-mini::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    border: 1px solid #1e3a8a;
    background: #fff;
    right: 1px;
    top: 1px;
}

.yd-photo-mini::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 3px;
    left: 2px;
    bottom: 1px;
    border-left: 1.5px solid #1e3a8a;
    border-bottom: 1.5px solid #1e3a8a;
    transform: skewX(-25deg);
}

.yd-archive-mark-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 360px);
    gap: 12px;
}

.yd-archive-mark-viewer {
    position: relative;
    min-height: 520px;
    max-height: calc(95vh - 160px);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: auto;
    background: #fff;
    touch-action: none;
    cursor: grab;
}

#archive-mark-pdf-stage {
    position: relative;
    min-height: 520px;
    min-width: max-content;
    width: max-content;
}

#archive-mark-pdf-stage.aps-mode {
    min-width: 0;
    width: 100%;
    min-height: 520px;
    height: 100%;
}

#archive-mark-aps-stage {
    position: absolute;
    inset: 0;
    z-index: 2;
}

#archive-mark-aps-viewer {
    position: absolute;
    inset: 0;
}

#archive-mark-aps-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    touch-action: none;
    z-index: 3;
}

#archive-mark-aps-overlay .yd-mark-pin {
    pointer-events: auto;
}

#archive-mark-pdf-stage.tile-mode {
    min-width: 0;
    width: 100%;
    min-height: 520px;
}

#archive-mark-pdf-canvas {
    display: block;
    width: auto;
    height: auto;
}

.yd-archive-mark-tile-map {
    position: absolute;
    inset: 0;
    min-height: 520px;
    width: 100%;
    z-index: 1;
}

.yd-mark-pin-leaflet-wrap {
    background: transparent;
    border: 0;
}

.yd-mark-pin-leaflet {
    position: absolute;
    width: 34px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    filter: drop-shadow(0 10px 16px rgba(185, 28, 28, 0.28));
}

.yd-mark-pin-leaflet.is-active {
    filter: drop-shadow(0 10px 18px rgba(0, 154, 255, 0.42));
}

.yd-mark-pin-leaflet.is-flashing {
    animation: ydPinLeafletBlueFlash 0.7s ease-in-out 2;
}

#archive-mark-overlay {
    position: absolute;
    inset: 0;
    pointer-events: auto;
    touch-action: none;
}

.yd-mark-pin {
    position: absolute;
    transform: translate(-50%, -100%);
    width: 34px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    filter: drop-shadow(0 10px 16px rgba(185, 28, 28, 0.28));
    animation: ydPinDrop .22s ease;
    pointer-events: auto;
    cursor: pointer;
    padding: 0;
}

.yd-mark-pin.is-active {
    filter: drop-shadow(0 10px 18px rgba(0, 154, 255, 0.42));
}

.yd-mark-pin.is-flashing {
    animation: ydPinBlueFlash 0.7s ease-in-out 2;
}

.yd-mark-pin-icon {
    position: absolute;
    inset: 0;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #ff4d4f 0%, #dc2626 62%, #991b1b 100%);
    border: 1px solid rgba(153, 27, 27, 0.78);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.34), inset -2px -2px 5px rgba(80, 0, 0, 0.18);
}

.yd-mark-pin-icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    left: 10px;
    top: 10px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.75), 0 1px 2px rgba(15, 23, 42, 0.18);
}

.yd-mark-pin.is-active .yd-mark-pin-icon,
.yd-mark-pin.is-flashing .yd-mark-pin-icon,
.yd-mark-pin-leaflet.is-active .yd-mark-pin-icon,
.yd-mark-pin-leaflet.is-flashing .yd-mark-pin-icon {
    background: linear-gradient(135deg, #60a5fa 0%, #2563eb 62%, #1e40af 100%);
    border-color: rgba(29, 78, 216, 0.95);
}

@keyframes ydPinBlueFlash {
    0%, 100% { transform: translate(-50%, -100%) scale(1); filter: drop-shadow(0 10px 18px rgba(37, 99, 235, 0.42)); }
    50% { transform: translate(-50%, -100%) scale(1.22); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0.1)) drop-shadow(0 0 22px rgba(37, 99, 235, 0.75)); }
}

@keyframes ydPinLeafletBlueFlash {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 10px 18px rgba(37, 99, 235, 0.42)); }
    50% { transform: scale(1.22); filter: drop-shadow(0 0 0 rgba(37, 99, 235, 0.1)) drop-shadow(0 0 22px rgba(37, 99, 235, 0.75)); }
}

.yd-archive-mark-side {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px;
    background: linear-gradient(180deg, rgba(64, 168, 223, 0.08), rgba(69, 209, 191, 0.06));
    min-height: 520px;
    overflow: auto;
}

.yd-mark-pin-list {
    display: grid;
    gap: 8px;
    max-height: 190px;
    overflow: auto;
    padding-right: 2px;
}

.yd-mark-pin-list-empty {
    min-height: 40px;
    display: flex;
    align-items: center;
    color: var(--text-soft);
    font-size: 13px;
}

.yd-mark-pin-row {
    width: 100%;
    min-height: 48px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
    text-align: left;
    border: 1px solid rgba(148, 163, 184, 0.32);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    padding: 7px 9px;
    cursor: pointer;
    transition: border-color .16s ease, box-shadow .16s ease, transform .14s ease, background .16s ease;
}

.yd-mark-pin-row:hover {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.12);
    transform: translateY(-1px);
}

.yd-mark-pin-row.is-active {
    border-color: rgba(37, 99, 235, 0.72);
    background: rgba(219, 234, 254, 0.94);
}

.yd-mark-pin-row.is-flashing {
    animation: ydPinRowFlash 0.7s ease-in-out 2;
}

.yd-mark-pin-row-badge {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.2);
}

.yd-mark-pin-row.is-active .yd-mark-pin-row-badge,
.yd-mark-pin-row.is-flashing .yd-mark-pin-row-badge {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.24);
}

.yd-mark-pin-row-main {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.yd-mark-pin-row-main b {
    font-size: 13px;
    line-height: 1.2;
}

.yd-mark-pin-row-main small {
    color: var(--text-soft);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@keyframes ydPinRowFlash {
    0%, 100% { box-shadow: 0 0 0 rgba(37, 99, 235, 0); }
    50% { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22), 0 0 18px rgba(37, 99, 235, 0.32); }
}

[data-theme="dark"] .yd-archive-mark-side {
    background: linear-gradient(180deg, rgba(30, 55, 90, 0.55), rgba(22, 42, 72, 0.45));
    border-color: rgba(64, 168, 223, 0.22);
}

[data-theme="dark"] #archive-mark-pdf-stage {
    background: #0d1524;
    border-radius: 8px;
}

[data-theme="dark"] .yd-archive-mark-viewer {
    background: #0a1120;
    border-color: rgba(64, 168, 223, 0.18);
}

[data-theme="dark"] .yd-archive-mark-toolbar .yd-button.secondary {
    border-color: rgba(64, 168, 223, 0.28);
    background: linear-gradient(135deg, rgba(30, 50, 80, 0.9), rgba(22, 38, 64, 0.9));
    color: var(--text);
}

[data-theme="dark"] .yd-project-status.ready {
    color: #85e3b4;
    background: rgba(23, 104, 70, 0.42);
    border-color: rgba(89, 186, 142, 0.56);
}

[data-theme="dark"] .yd-project-status.processing {
    color: #ffd189;
    background: rgba(136, 89, 8, 0.42);
    border-color: rgba(222, 159, 54, 0.56);
}

[data-theme="dark"] .yd-project-status.failed {
    color: #ffb2bc;
    background: rgba(122, 32, 46, 0.48);
    border-color: rgba(196, 73, 92, 0.58);
}

.yd-archive-mark-photo-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.yd-archive-mark-photo-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    min-height: 72px;
}

.yd-archive-mark-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yd-archive-mark-photo-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    min-height: 24px;
    min-width: 24px;
    border-radius: 999px;
    border: 0;
    color: #fff;
    background: rgba(165, 24, 24, 0.92);
}

@keyframes ydPinDrop {
    from { opacity: 0; transform: translate(-50%, -128%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -100%) scale(1); }
}

@media (max-width: 768px) {
    #tab-structures #structures-actions {
        width: 100%;
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        align-items: stretch;
    }
    #tab-structures #structures-actions .yd-button {
        width: 100%;
        min-height: 40px;
        padding: 8px 10px;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }
    #tab-structures #structures-actions .yd-action-icon-autocad,
    #tab-structures #structures-actions .yd-import-excel-icon,
    #tab-structures #structures-actions .yd-add-structure-icon {
        flex: 0 0 auto;
    }
    .yd-kebab-menu .yd-btn-text,
    .yd-floating-menu .yd-btn-text {
        display: inline !important;
    }
    .yd-kebab-menu .yd-btn-icon,
    .yd-floating-menu .yd-btn-icon {
        margin-right: 6px;
    }
    .yd-modal-head {
        align-items: flex-start;
    }
    .yd-modal-head > b {
        max-width: calc(100% - 118px);
        font-size: 16px;
    }
    .yd-level-meta-badges {
        gap: 8px;
    }
    .yd-level-meta-chip {
        min-height: 40px;
        width: 100%;
        justify-content: space-between;
        font-size: 13px;
        padding: 8px 12px;
    }
    .yd-level-meta-chip.inspector {
        flex: 1 1 100%;
    }
    .yd-pdf-export-options .yd-button {
        min-height: 40px;
        width: min(320px, 100%);
    }
    #archive-pdf-export-modal .yd-pdf-export-sheet {
        max-width: 480px !important;
    }
    .yd-pdf-meta-badge {
        min-height: 40px;
    }
    .yd-pdf-export-loading {
        padding: 12px;
    }
    .yd-pdf-export-loading-inner {
        min-height: 104px;
        padding: 12px;
    }
    .yd-pdf-export-loading-text {
        font-size: 13px;
    }
    .yd-diary-doc-range-wrap {
        grid-template-columns: 1fr;
    }
    .yd-diary-doc-preview {
        min-height: 48vh;
    }
    .yd-admin-option-box {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-list-archive tr.yd-archive-row-today td {
        background: rgba(34, 197, 94, 0.18);
    }
    .yd-list-archive tr.yd-archive-row-today td:first-child::before {
        animation-duration: 1s;
    }
    .yd-list-archive tr.yd-archive-row-yesterday td:first-child::before {
        animation-duration: 1s;
    }
    .yd-list-archive tr.yd-archive-row-yesterday td {
        background: rgba(245, 158, 11, 0.22);
    }
    .yd-list-archive tr.yd-context-flash {
        border-color: rgba(220, 38, 38, 0.94);
        animation-duration: 0.5s;
    }
    .yd-list-archive tr.yd-longpress-active {
        border-color: rgba(220, 38, 38, 0.92);
        animation-duration: 0.62s;
    }
    .yd-list-structures tr.yd-context-flash {
        border-color: rgba(220, 38, 38, 0.94);
        animation-duration: 0.5s;
    }
    .yd-list-structures tr.yd-longpress-active {
        border-color: rgba(220, 38, 38, 0.92);
        animation-duration: 0.62s;
    }
    .yd-list-structures,
    .yd-list-structures tbody,
    .yd-list-structures tr,
    .yd-list-structures td {
        overflow: visible;
    }
    .yd-drawer-foot .yd-button {
        min-height: 40px;
    }
    .yd-notify-settings-item {
        min-height: 40px;
        font-size: 13px;
    }
    body.yd-modal-open .yd-sidebar,
    html.yd-modal-open .yd-sidebar {
        display: none;
    }

    .yd-topbar {
        padding: 7px 10px;
        align-items: center;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 8px;
    }
    .yd-top-identity-card {
        max-width: none;
        width: 100%;
        min-width: 0;
        padding: 5px 9px;
        border-radius: 10px;
        gap: 7px;
    }
    .yd-top-brand-text {
        max-width: 100%;
    }
    .yd-top-brand-title {
        font-size: 17px;
        line-height: 1.12;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .yd-top-brand-subtitle {
        font-size: 10px;
        letter-spacing: 0.72px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .yd-top-logo {
        height: 26px;
        max-width: min(44px, 58vw);
    }
    .yd-top-user-context {
        display: none;
    }
    .yd-theme-toggle-btn {
        min-width: 102px;
        padding: 8px 10px;
    }
    .yd-subtitle {
        font-size: 13px;
        margin-top: 2px;
    }
    .yd-auth-wrap {
        grid-template-columns: 1fr;
        padding: 10px 14px 24px;
    }
    .yd-auth-wrap-single {
        max-width: 100%;
    }
    .yd-hero h1 { font-size: 23px; }
    .yd-card h2 { font-size: 20px; }
    .yd-layout {
        grid-template-columns: 1fr;
        padding: 10px 12px 84px;
        padding-left: 12px;
    }
    .yd-main {
        max-width: none;
        margin: 0;
    }
    .yd-layout-topnav { padding: 10px 12px 84px; }
    .yd-shell.yd-mobile-nav-drawer .yd-layout,
    .yd-shell.yd-mobile-nav-drawer .yd-layout-topnav {
        padding-bottom: 12px;
    }
    .yd-mobile-nav-toggle {
        min-height: 40px;
        min-width: 40px;
    }
    .yd-mobile-nav-toggle {
        display: none !important;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-mobile-nav-toggle {
        display: inline-flex !important;
    }
    .yd-sidebar {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 68px;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        border-radius: 14px 14px 0 0;
        padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
        background: linear-gradient(180deg, #1a95e4, #0f79cb);
        box-shadow: 0 -10px 28px rgba(8, 73, 124, 0.35);
        z-index: 10000011;
    }
    .yd-sidebar-head,
    .yd-sidebar-panel,
    .yd-sidebar-pin-btn {
        display: none;
    }
    .yd-nav-btn {
        width: 100%;
        min-width: 0;
        min-height: 48px;
        margin: 0;
        font-size: 12px;
        padding: 6px 5px;
        gap: 4px;
        justify-content: center;
        text-align: center;
        flex-direction: column;
        border-radius: 10px;
    }
    .yd-nav-btn::before {
        left: 50%;
        top: auto;
        bottom: 2px;
        width: 40%;
        height: 2px;
        border-radius: 2px;
        transform: translateX(-50%) scaleX(0);
    }
    .yd-nav-btn.active::before {
        transform: translateX(-50%) scaleX(1);
    }
    .yd-nav-copy {
        display: block;
        opacity: 1;
        transform: none;
    }
    .yd-nav-sub {
        display: none;
    }
    .yd-nav-title {
        font-size: 10px;
        line-height: 1.1;
        color: rgba(255, 255, 255, 0.94);
        text-align: center;
    }
    .yd-nav-icon { width: 27px; height: 27px; flex: 0 0 27px; }
    .yd-nav-icon svg { width: 17px; height: 17px; }
    .yd-shell.yd-mobile-nav-drawer .yd-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: min(310px, calc(100vw - 48px));
        padding: 14px 10px 16px;
        border-radius: 0 16px 16px 0;
        background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
        border-right: 1px solid var(--border);
        box-shadow: 12px 0 30px rgba(15, 23, 42, 0.24);
        transform: translateX(-106%);
        transition: transform 0.22s ease;
        z-index: 10000012;
        overflow: auto;
        overflow-x: hidden;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-sub {
        display: block;
    }
    .yd-shell.yd-mobile-nav-drawer.yd-mobile-drawer-open .yd-sidebar {
        transform: translateX(0);
    }
    .yd-shell.yd-mobile-nav-drawer .yd-sidebar-panel,
    .yd-shell.yd-mobile-nav-drawer .yd-sidebar-pin-btn {
        display: none;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-sidebar-head {
        opacity: 1;
        pointer-events: auto;
        margin-bottom: 10px;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-btn {
        width: 100%;
        min-height: 52px;
        margin-bottom: 8px;
        padding: 7px 10px;
        border-color: rgba(148, 163, 184, 0.34);
        background: rgba(255, 255, 255, 0.86);
        color: #0f172a;
        gap: 10px;
        justify-content: flex-start;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-copy {
        display: block;
        opacity: 1;
        transform: none;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-title {
        font-size: 15px;
        color: #0f172a;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-sub {
        display: block;
        font-size: 12px;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-btn.active {
        background: linear-gradient(135deg, rgba(59, 130, 246, 0.18), rgba(20, 184, 166, 0.14));
    }
    .yd-shell.yd-mobile-nav-drawer.yd-mobile-drawer-open .yd-mobile-sidebar-backdrop {
        display: block !important;
    }
    [data-theme="dark"] .yd-shell.yd-mobile-nav-drawer .yd-sidebar {
        background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
        border-right-color: rgba(71, 85, 105, 0.74);
    }
    [data-theme="dark"] .yd-shell.yd-mobile-nav-drawer .yd-nav-btn {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(71, 85, 105, 0.55);
        color: #e2e8f0;
    }
    [data-theme="dark"] .yd-shell.yd-mobile-nav-drawer .yd-nav-title {
        color: #e2e8f0;
    }
    [data-theme="dark"] .yd-shell.yd-mobile-nav-drawer .yd-nav-sub {
        color: #94a3b8;
    }
    .yd-stats { grid-template-columns: 1fr 1fr; }
    .yd-chart-grid { grid-template-columns: 1fr; }
    .yd-overview-head {
        align-items: stretch;
    }
    .yd-overview-actions {
        width: 100%;
        justify-content: flex-start;
    }
    .yd-overview-actions .yd-button {
        flex: 1 1 180px;
        min-height: 40px;
        font-size: 13px;
    }
    .yd-chart-head h3 { font-size: 18px; }
    .yd-chart-sub { font-size: 13px; }
    .yd-chart-premium-wrap {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 10px;
    }
    .yd-pie-chart { width: 204px; height: 204px; }
    .yd-chart-list { width: 100%; }
    .yd-chart-list-row { min-height: 40px; padding: 7px 8px; gap: 18px; }
    .yd-chart-list-label, .yd-chart-list-value { font-size: 13px; }
    .yd-control-activity-toolbar {
        align-items: stretch;
        gap: 10px;
    }
    .yd-control-period-group,
    .yd-control-range-group {
        width: 100%;
    }
    .yd-control-period-select {
        width: 100%;
    }
    .yd-control-range-group .yd-input {
        flex: 1 1 0;
        min-width: 0;
    }
    .yd-control-range-group .yd-button {
        min-width: 110px;
    }
    .yd-m2-activity-shell {
        grid-template-columns: 1fr;
    }
    .yd-user-cloud-wrap {
        min-height: 0;
        height: auto;
    }
    #yd-m2-pie-chart.yd-chart-area {
        min-height: 0;
    }
    #yd-group-chart .yd-chart-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    #yd-group-chart .yd-chart-list-row {
        min-height: 34px;
        padding: 6px;
        gap: 8px;
    }
    #yd-group-chart .yd-chart-list-label,
    #yd-group-chart .yd-chart-list-value {
        font-size: 12px;
    }
    #yd-group-chart .yd-chart-list-label span:last-child {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.2;
    }
    .yd-cloud-avatar {
        width: 52px;
        height: 52px;
    }
    .yd-cloud-item {
        min-width: 68px;
    }
    .yd-cloud-badge {
        min-width: 22px;
        height: 22px;
        font-size: 11px;
    }
    .yd-user-photo-field {
        align-items: flex-start;
    }
    .yd-user-photo-actions {
        flex: 1 1 100%;
        min-width: 0;
    }
    .yd-user-photo-upload-row {
        grid-template-columns: 1fr;
    }
    .yd-profile-photo-actions {
        flex: 1 1 100%;
        min-width: 0;
    }
    .yd-profile-photo-upload-row {
        grid-template-columns: 1fr;
    }
    .yd-control-user-table-wrap,
    .yd-control-detail-answers {
        overflow-x: auto;
    }
    .yd-progress-item,
    .yd-control-detail-answer {
        min-height: 40px;
    }
    .yd-control-detail-answer > b {
        margin-bottom: 5px;
    }
    .yd-control-detail-answer .yd-subtitle {
        margin-top: 4px;
        font-size: 13px;
    }
    .yd-control-note-inline {
        display: block !important;
    }
    .yd-control-note-inline-sep {
        display: none;
    }
    .yd-control-note-inline-item {
        display: block;
        margin-bottom: 2px;
    }
    .yd-control-detail-photo-btn {
        min-height: 40px;
    }
    .yd-location-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    #yd-structures-map {
        min-height: 360px;
    }
    .yd-location-list {
        max-height: 220px;
        padding: 8px;
    }
    .yd-location-item {
        min-height: 40px;
    }
    .yd-location-item-title {
        font-size: 15px;
    }
    .yd-location-item-meta,
    .yd-location-modal-line {
        font-size: 13px;
    }
    .yd-location-toolbar-actions {
        width: 100%;
    }
    .yd-location-toolbar-actions .yd-button {
        flex: 1 1 0;
        min-height: 40px;
    }
    #location-route-modal .yd-modal-sheet {
        width: min(100%, 680px);
    }
    .yd-inline { grid-template-columns: 1fr; }
    .yd-modal {
        padding: 10px;
        align-items: center;
        justify-content: center;
    }
    .yd-modal-sheet {
        width: min(100%, 980px);
        max-height: 94vh;
        border-radius: 16px;
    }
    #archive-level-modal {
        padding: 8px;
    }
    #archive-level-modal .yd-modal-sheet {
        width: calc(100vw - 16px) !important;
        height: calc(100vh - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 16px;
    }
    #archive-level-modal .yd-modal-body {
        overflow-x: hidden;
    }
    #archive-level-modal .yd-building-model-grid {
        grid-template-columns: 1fr;
    }
    #archive-level-modal .yd-building-stack.three {
        min-height: 320px;
    }
    #archive-level-modal .yd-building-3d-canvas-wrap,
    #archive-level-modal .yd-building-3d-canvas-wrap canvas,
    #archive-level-modal .yd-building-3d-fallback {
        min-height: 320px;
        height: min(44vh, 420px);
    }
    .yd-building-3d-tools {
        top: 8px;
        right: 8px;
    }
    .yd-building-3d-tool {
        min-width: 40px;
        min-height: 40px;
    }
    .yd-building-3d-rotate-hint {
        top: auto;
        bottom: 68px;
        font-size: 13px;
        padding: 8px 14px;
        max-width: calc(100% - 24px);
    }
    #archive-start-modal,
    #archive-flow-modal,
    #archive-flow-close-modal,
    #archive-record-picker-modal,
    #archive-delete-modal {
        align-items: center;
        padding: 12px;
    }
    #archive-start-modal .yd-modal-sheet,
    #archive-flow-modal .yd-modal-sheet,
    #archive-flow-close-modal .yd-modal-sheet,
    #archive-record-picker-modal .yd-modal-sheet,
    #archive-delete-modal .yd-modal-sheet {
        border-radius: 16px;
        max-height: 96vh;
    }
    .yd-archive-record-main {
        flex-direction: column;
        align-items: flex-start;
    }
    #archive-flow-modal .yd-modal-body {
        padding-bottom: 14px;
    }
    #archive-flow-modal .yd-flow-bottom-actions {
        margin-top: 10px;
        margin-bottom: 20px !important;
    }
    .yd-input, .yd-select, .yd-textarea, .yd-button {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-choice-grid,
    .yd-choice-grid-2,
    .yd-choice-grid-3 {
        grid-template-columns: 1fr;
    }
    .yd-choice-btn {
        min-height: 44px;
        padding: 11px 12px;
    }
    .yd-choice-btn-text,
    .yd-start-completion-info {
        font-size: 13px;
    }
    .yd-flow-section-title {
        font-size: 16px;
    }
    .yd-flow-section-switcher {
        gap: 6px;
    }
    .yd-flow-section-btn {
        min-height: 40px;
        width: 100%;
        justify-content: space-between;
        padding: 8px 12px;
    }
    .yd-top-nav-btn { min-height: 40px; padding: 8px 12px; }
    .yd-icon-btn { min-height: 40px; min-width: 40px; }
    .yd-user-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto;
        width: min(280px, calc(100vw - 20px));
        min-width: 220px;
    }
    .yd-notification-popover {
        top: 64px;
        right: 12px;
        width: min(360px, calc(100vw - 24px));
    }
    .yd-notification-panel {
        max-height: min(480px, calc(100vh - 86px));
    }
    .yd-action-btn { min-height: 40px; padding: 8px 10px; }
    .yd-building-model-wrap {
        padding: 12px;
        border-radius: 12px;
    }
    .yd-building-model-head {
        flex-direction: column;
        align-items: stretch;
    }
    .yd-building-model-head b {
        font-size: 15px;
    }
    .yd-building-model-head span,
    .yd-building-history-empty {
        font-size: 13px;
    }
    .yd-building-legend {
        justify-content: flex-start;
    }
    .yd-building-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .yd-building-info-chip {
        min-height: 54px;
    }
    .yd-building-info-chip.stage {
        grid-column: span 2;
    }
    .yd-building-model-grid {
        grid-template-columns: 1fr;
    }
    .yd-building-stack {
        padding: 10px;
        overflow-x: hidden;
    }
    .yd-building-stack.three {
        min-height: 320px;
        padding: 0;
    }
    .yd-building-3d-canvas-wrap,
    .yd-building-3d-canvas-wrap canvas,
    .yd-building-3d-fallback {
        min-height: 300px;
        height: clamp(300px, 44vh, 420px);
    }
    .yd-building-3d-caption {
        left: 10px;
        right: 10px;
        bottom: 10px;
        gap: 5px;
    }
    .yd-building-3d-badge {
        min-height: 26px;
        font-size: 13px;
        padding: 6px 10px;
    }
    .yd-building-floor {
        width: 94%;
        grid-template-columns: minmax(78px, 0.48fr) minmax(0, 1fr);
        min-height: 40px;
        padding: 8px 10px;
    }
    .yd-building-floor-label {
        font-size: 13px;
    }
    .yd-building-floor-status {
        font-size: 12px;
    }
    .yd-building-window-row,
    .yd-building-foundation-pattern {
        gap: 5px;
    }
    .yd-building-window-row i {
        height: 17px;
    }
    .yd-building-history-list {
        max-height: 280px;
    }
    .yd-building-history-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }
    .yd-building-history-control label {
        font-size: 13px;
    }
    .yd-building-history-control .yd-select {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-building-history-item {
        min-height: 40px;
    }
    .yd-building-history-item-head b {
        font-size: 14px;
    }
    .yd-building-history-open-text {
        display: none;
    }
    .yd-building-history-meta-row,
    .yd-building-history-badges {
        gap: 5px;
    }
    .yd-building-history-badge {
        min-height: 24px;
        font-size: 13px;
    }
    .yd-level-questions-sheet {
        width: calc(100vw - 16px);
        max-height: calc(100vh - 16px);
        border-radius: 16px;
    }
    .yd-level-open-hint {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-level-stage-list { grid-template-columns: 1fr; }
    .yd-level-stage-btn { min-height: 40px; font-size: 13px; }
    .yd-level-stage-btn b { font-size: 15px; }
    .yd-level-photo-grid { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
    .yd-level-photo-list-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; }
    .yd-level-photo-list-item { min-height: 100px; }
    .yd-level-photo-list-item img { height: 100px; }
    #archive-level-photo-list-modal .yd-modal-foot .yd-button { min-height: 40px; }
    .yd-photo-viewer-wrap { min-height: 220px; }
    .yd-photo-viewer-image { max-height: 64vh; }
    .yd-photo-watermark { font-size: 12px; }
    .yd-photo-note { font-size: 13px; font-weight: 700; }
    .yd-photo-answer-badge {
        margin-left: 8px;
        margin-top: 4px;
    }
    .yd-photo-note-overlay {
        font-size: 13px;
        max-width: calc(100% - 20px);
        padding: 9px 10px;
    }
    .yd-question-history-layout { grid-template-columns: 1fr; }
    .yd-question-history-item b { font-size: 15px; }
    .yd-history-status, .yd-history-resolution { font-size: 13px; }
    .yd-level-history-chip { font-size: 13px; }
    .yd-level-date-badge {
        min-height: 28px;
        font-size: 13px;
        padding: 4px 10px;
    }
    .yd-level-inline-meta {
        gap: 5px;
    }
    .yd-level-inline-pill {
        min-height: 28px;
        font-size: 13px;
        padding: 4px 9px;
    }
    .yd-answer-btn {
        min-height: 40px;
        font-size: 13px;
        padding: 9px 12px;
    }
    .yd-flow-history-btn {
        min-height: 40px;
        font-size: 13px;
    }
    #archive-flow-modal .yd-mark-action-row {
        gap: 8px;
    }
    #archive-flow-modal #archive-project-file-status {
        font-size: 13px;
        min-height: 20px;
    }
    .yd-photo-source-actions {
        gap: 8px;
    }
    .yd-photo-source-actions .yd-button {
        min-height: 40px;
    }
    .yd-photo-source-btn {
        flex: 1 1 calc(50% - 8px);
    }
    .yd-flow-floor-title {
        font-size: 15px;
    }
    .yd-progress-dot {
        width: 36px;
        height: 36px;
        min-height: 36px;
        font-size: 13px;
    }
    .yd-flow-photo-item {
        width: 80px;
        height: 80px;
    }
    .yd-flow-photo-badge {
        min-height: 20px;
        font-size: 11px;
    }
    .yd-archive-mark-sheet {
        width: min(100%, 1200px);
        max-height: 96vh;
    }
    .yd-archive-mark-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .yd-structure-project-head {
        align-items: flex-start;
    }
    .yd-upload-progress {
        padding: 10px;
    }
    .yd-upload-progress-head {
        font-size: 13px;
    }
    .yd-project-status {
        min-height: 30px;
        font-size: 12px;
    }
    .yd-structure-project-head .yd-button {
        min-height: 40px;
    }
    .yd-aps-viewer-sheet {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
        height: calc(100vh - 20px);
        max-height: calc(100vh - 20px);
    }
    .yd-aps-viewer-body {
        padding-bottom: 12px;
    }
    .yd-aps-viewer-canvas {
        min-height: 0;
        height: 100%;
    }
    .yd-aps-viewer-frame {
        min-height: 100%;
        height: 100%;
    }
    #archive-mark-add-project-btn {
        width: 100%;
        min-height: 40px;
    }
    .yd-archive-mark-page-controls {
        justify-content: flex-start;
        gap: 6px;
    }
    .yd-archive-mark-page-controls .yd-button,
    .yd-archive-mark-page-controls .yd-chip {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-archive-mark-layout {
        grid-template-columns: 1fr;
    }
    .yd-archive-mark-body.hide-side-panel .yd-archive-mark-layout {
        grid-template-columns: 1fr;
    }
    .yd-archive-mark-viewer,
    #archive-mark-pdf-stage,
    #archive-mark-pdf-stage.aps-mode,
    #archive-mark-aps-stage,
    #archive-mark-aps-viewer,
    #archive-mark-aps-overlay,
    .yd-archive-mark-tile-map,
    .yd-archive-mark-side {
        min-height: 360px;
        max-height: 42vh;
    }
    .yd-archive-mark-viewer {
        max-height: calc(96vh - 140px);
    }
    .yd-mark-pin-list {
        max-height: 150px;
    }
    .yd-mark-pin-row {
        min-height: 44px;
        grid-template-columns: 32px minmax(0, 1fr);
    }
    .yd-archive-mark-photo-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .yd-mark-pin {
        width: 28px;
        height: 40px;
    }
    .yd-mark-pin-icon::after {
        width: 10px;
        height: 10px;
        left: 8px;
        top: 8px;
    }
    .yd-users-filter-group {
        width: 100%;
    }
    .yd-list-structures thead {
        display: none;
    }
    .yd-list-structures,
    .yd-list-structures tbody,
    .yd-list-structures tr,
    .yd-list-structures td {
        display: block;
        width: 100%;
    }
    .yd-list-structures {
        border: 0;
        background: transparent;
    }
    .yd-list-structures tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        position: relative;
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
        box-shadow: var(--shadow-sm);
    }
    .yd-list-structures td {
        border-bottom: 0;
        padding: 6px 4px;
        font-size: 13px;
    }
    .yd-list-structures td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
    }
    .yd-list-structures td[data-label="İşlemler"] {
        position: absolute;
        top: 8px;
        right: 8px;
        width: auto;
        padding: 0;
    }
    .yd-list-structures td[data-label="İşlemler"]::before {
        display: none;
    }
    .yd-list-structures td[data-label="İş Durumu"] {
        padding-right: 58px;
    }
    .yd-list-users thead {
        display: none;
    }
    .yd-list-users,
    .yd-list-users tbody,
    .yd-list-users tr,
    .yd-list-users td {
        display: block;
        width: 100%;
    }
    .yd-list-users {
        border: 0;
        background: transparent;
    }
    #tab-users .yd-list-users tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 9px 10px 7px;
        padding-right: 58px;
        position: relative;
        box-shadow: var(--shadow-sm);
    }
    #tab-users .yd-list-users td {
        border-bottom: 0;
        padding: 3px 0;
        font-size: 13px;
        display: flex;
        align-items: flex-start;
        gap: 6px;
        min-height: 24px;
        line-height: 1.35;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    #tab-users .yd-list-users td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
        min-width: 90px;
        flex: 0 0 90px;
    }
    #tab-users .yd-list-users td[data-label="İşlem"] {
        position: absolute;
        top: 8px;
        right: 8px;
        width: auto;
        padding: 0;
        min-height: 0;
    }
    #tab-users .yd-list-users td[data-label="İşlem"]::before {
        display: none;
    }
    #tab-users .yd-list-users td:not([data-label="İşlem"]) {
        padding-right: 0;
    }
    #tab-users .yd-list-users td[data-label="Şantiyeler"] .yd-user-site-badge {
        margin-left: 0;
    }
    #tab-users .yd-list-users td[data-label="Durum"] .yd-chip {
        min-height: 30px;
    }
    #tab-users .yd-list-users td[data-label="İşlem"] .yd-kebab-btn {
        min-width: 40px;
        min-height: 40px;
    }
    #user-assign-modal .yd-modal-sheet {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px) !important;
        max-height: calc(100dvh - 16px);
    }
    #user-assign-modal .yd-modal-body {
        overflow-x: hidden;
    }
    #user-assign-modal .yd-toolbar {
        grid-template-columns: 1fr;
    }
    #user-assign-modal .yd-toolbar .yd-input,
    #user-assign-modal .yd-toolbar .yd-button {
        width: 100%;
    }
    .yd-user-assign-list thead {
        display: none;
    }
    .yd-user-assign-list,
    .yd-user-assign-list tbody,
    .yd-user-assign-list tr,
    .yd-user-assign-list td {
        display: block;
        width: 100%;
    }
    .yd-user-assign-list {
        border: 0;
        background: transparent;
    }
    .yd-user-assign-list tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        box-shadow: var(--shadow-sm);
    }
    .yd-user-assign-list td {
        border-bottom: 0;
        padding: 4px 2px;
        font-size: 13px;
        display: flex;
        align-items: flex-start;
        gap: 6px;
        overflow-wrap: anywhere;
        word-break: break-word;
    }
    .yd-user-assign-list td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
        min-width: 108px;
        flex: 0 0 108px;
    }
    .yd-user-assign-list td[data-label="İşlem"]::before {
        display: none;
    }
    .yd-user-assign-list td[data-label="İşlem"] .yd-button {
        width: 100%;
        min-height: 40px;
    }
    #user-modal .yd-user-modal-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }
    #user-modal .yd-user-modal-head > b {
        font-size: 15px;
        max-width: none;
    }
    #user-modal .yd-user-modal-head .yd-button {
        min-height: 40px;
    }
    #tab-roles .yd-list thead {
        display: none;
    }
    #tab-roles .yd-list,
    #tab-roles .yd-list tbody,
    #tab-roles .yd-list tr,
    #tab-roles .yd-list td {
        display: block;
        width: 100%;
    }
    #tab-roles .yd-list {
        border: 0;
        background: transparent;
    }
    #tab-roles .yd-list tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        box-shadow: var(--shadow-sm);
    }
    #tab-roles .yd-list td {
        border-bottom: 0;
        padding: 6px 4px;
        font-size: 13px;
    }
    #tab-roles .yd-list td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
    }
    #tab-roles .yd-list td[data-label="İşlem"] .yd-button {
        width: 100%;
        min-height: 40px;
    }
    .yd-list-users .yd-user-activities {
        min-width: 0;
        width: 100%;
    }
    .yd-list-user-structures thead {
        display: none;
    }
    .yd-list-user-structures,
    .yd-list-user-structures tbody,
    .yd-list-user-structures tr,
    .yd-list-user-structures td {
        display: block;
        width: 100%;
    }
    .yd-list-user-structures {
        border: 0;
        background: transparent;
    }
    .yd-list-user-structures tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        box-shadow: var(--shadow-sm);
    }
    .yd-list-user-structures td {
        border-bottom: 0;
        padding: 6px 4px;
        font-size: 13px;
    }
    .yd-list-user-structures td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
    }
    .yd-user-site-badge {
        min-height: 40px;
        min-width: 44px;
        padding: 8px 12px;
        font-size: 13px;
    }
    .yd-user-site-badge.yd-user-site-badge-all {
        padding: 8px 14px;
        font-size: 12px;
    }
    .yd-structure-status-select {
        width: 100%;
        min-height: 40px;
    }
    .yd-archive-actions {
        width: 100%;
    }
    .yd-archive-actions .yd-button {
        flex: 1 1 180px;
        min-height: 40px;
    }
    .yd-archive-table-wrap {
        max-height: none;
        overflow-x: hidden;
        overflow-y: visible;
    }
    .yd-list-archive thead {
        display: none;
    }
    .yd-list-archive,
    .yd-list-archive tbody,
    .yd-list-archive tr,
    .yd-list-archive td {
        display: block;
        width: 100%;
    }
    .yd-list-archive {
        border: 0;
        background: transparent;
    }
    .yd-list-archive tr {
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        padding-right: 58px;
        position: relative;
        box-shadow: var(--shadow-sm);
    }
    .yd-list-archive td {
        border-bottom: 0;
        padding: 6px 4px;
        font-size: 13px;
    }
    .yd-list-archive td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
    }
    .yd-list-archive td[data-label="İşlemler"] {
        position: absolute;
        top: 8px;
        right: 8px;
        width: auto;
        padding: 0;
    }
    .yd-list-archive td[data-label="İşlemler"]::before {
        display: none;
    }
    .yd-archive-pdf-inline-btn {
        min-height: 40px;
        min-width: 82px;
        padding: 7px 10px;
        font-size: 12.5px;
    }
    .yd-archive-actions-wrap {
        display: inline-flex;
        gap: 5px;
    }
    .yd-archive-actions-wrap .yd-action-btn {
        min-height: 40px;
        min-width: 40px;
        padding: 7px 8px;
    }
    .yd-list-archive tr td:last-child {
        position: static !important;
        top: auto !important;
        right: auto !important;
        width: 100% !important;
        padding: 10px 0 0 !important;
        margin-top: 8px;
        border-top: 1px dashed var(--border);
    }
    .yd-list-archive tr td:last-child::before {
        display: none !important;
    }
    .yd-list-archive tr td:first-child {
        padding-right: 0 !important;
    }
    .yd-list-archive tr td:last-child .yd-archive-actions-wrap {
        display: flex;
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
    }
    .yd-archive-delete-inline-btn {
        min-height: 40px;
    }
    .yd-archive-actions-wrap .yd-btn-text {
        display: none;
    }
    .yd-archive-record-item {
        min-height: 44px;
    }
    .yd-archive-record-meta {
        font-size: 11.5px;
    }
    .yd-archive-picker-item {
        min-height: 44px;
    }
    .yd-flow-question-card {
        touch-action: pan-y;
    }
    .yd-user-activities {
        min-width: 220px;
    }
    .yd-user-activity-item {
        padding: 7px;
    }
    .yd-kebab-menu {
        left: auto;
        right: 0;
        min-width: 200px;
        max-width: min(240px, calc(100vw - 32px));
        padding: 10px;
        gap: 8px;
    }
    .yd-kebab-menu .yd-action-btn {
        width: 100%;
        justify-content: flex-start;
    }
    .yd-form-section-title {
        font-size: 15px;
    }
    .yd-import-result {
        max-height: 200px;
    }
    .yd-import-result-item {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    #tab-structures #structures-actions {
        gap: 6px;
    }
    #tab-structures #structures-actions .yd-button {
        min-height: 40px;
        font-size: 12px;
        padding: 8px 6px;
        gap: 4px;
    }
    #tab-structures #structures-actions .yd-action-icon-autocad,
    #tab-structures #structures-actions .yd-import-excel-icon,
    #tab-structures #structures-actions .yd-add-structure-icon {
        width: 14px;
        height: 14px;
    }
    #tab-structures #structures-actions .yd-action-icon-autocad svg,
    #tab-structures #structures-actions .yd-import-excel-icon svg,
    #tab-structures #structures-actions .yd-add-structure-icon svg {
        width: 14px;
        height: 14px;
    }
    .yd-kebab-menu .yd-btn-text,
    .yd-floating-menu .yd-btn-text {
        display: inline !important;
    }
    .yd-kebab-menu .yd-btn-icon,
    .yd-floating-menu .yd-btn-icon {
        margin-right: 6px;
    }
    .yd-modal {
        align-items: flex-start;
        justify-content: flex-start;
        padding: 0;
    }
    .yd-modal-head {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .yd-modal-head > b {
        max-width: 100%;
        font-size: 15px;
    }
    .yd-modal-head .yd-button {
        width: 100%;
        min-height: 40px;
    }
    .yd-level-meta-chip {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 12px;
    }
    .yd-level-meta-chip.inspector {
        flex: 1 1 100%;
    }
    .yd-pdf-export-options .yd-button {
        min-height: 40px;
        width: 100%;
    }
    #archive-pdf-export-modal .yd-pdf-export-sheet {
        max-width: 100% !important;
    }
    .yd-pdf-export-meta-badges {
        gap: 6px;
    }
    .yd-pdf-meta-badge {
        width: 100%;
        border-radius: 10px;
        font-size: 13px;
    }
    .yd-pdf-export-loading {
        padding: 10px;
    }
    .yd-pdf-export-loading-inner {
        min-height: 96px;
        border-radius: 10px;
        padding: 10px;
    }
    .yd-pdf-export-spinner {
        width: 26px;
        height: 26px;
    }
    .yd-pdf-export-loading-text {
        font-size: 13px;
    }
    .yd-diary-doc-preview {
        min-height: 44vh;
    }
    .yd-admin-option-box {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-list-archive tr.yd-archive-row-today td {
        background: rgba(34, 197, 94, 0.2);
    }
    .yd-list-archive tr.yd-archive-row-today td:first-child::before {
        animation-duration: 0.95s;
    }
    .yd-list-archive tr.yd-archive-row-yesterday td:first-child::before {
        animation-duration: 0.95s;
    }
    .yd-list-archive tr.yd-archive-row-yesterday td {
        background: rgba(245, 158, 11, 0.24);
    }
    .yd-list-archive tr.yd-context-flash {
        border-color: rgba(220, 38, 38, 0.96);
        animation-duration: 0.46s;
    }
    .yd-list-archive tr.yd-longpress-active {
        border-color: rgba(220, 38, 38, 0.96);
        animation-duration: 0.56s;
    }
    .yd-list-structures tr.yd-context-flash {
        border-color: rgba(220, 38, 38, 0.96);
        animation-duration: 0.46s;
    }
    .yd-list-structures tr.yd-longpress-active {
        border-color: rgba(220, 38, 38, 0.96);
        animation-duration: 0.56s;
    }
    .yd-list-structures,
    .yd-list-structures tbody,
    .yd-list-structures tr,
    .yd-list-structures td {
        overflow: visible;
    }
    .yd-topbar {
        padding: 6px 10px;
        position: sticky;
        align-items: center;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        column-gap: 6px;
    }
    .yd-top-identity-card {
        max-width: none;
        width: 100%;
        min-width: 0;
        padding: 3px 7px;
        border-radius: 10px;
        gap: 6px;
    }
    .yd-top-identity-media {
        min-width: 34px;
    }
    .yd-top-brand-title {
        font-size: 15px;
        line-height: 1.1;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .yd-top-brand-subtitle {
        font-size: 10px;
        letter-spacing: 0.6px;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
    .yd-top-logo {
        height: 22px;
        max-width: 22px;
    }
    .yd-top-user-context {
        display: none;
    }
    .yd-theme-toggle-btn {
        min-width: 84px !important;
        gap: 5px;
        padding: 7px 11px !important;
        font-size: 12px;
    }
    .yd-user-btn {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
    .yd-topbar .yd-subtitle {
        display: none;
    }
    .yd-top-actions {
        padding: 0;
        gap: 2px;
        border-radius: 10px;
        min-width: 0;
    }
    .yd-user-caret-btn {
        width: 24px;
        min-width: 24px;
        height: 40px;
        min-height: 40px;
    }
    .yd-subtitle { font-size: 13px; }
    .yd-hero, .yd-card {
        border-radius: 14px;
        padding: 14px;
    }
    .yd-hero h1 { font-size: 18px; }
    .yd-card h2 { font-size: 17px; }
    .yd-overview-head h2 { font-size: 17px; }
    .yd-overview-actions {
        width: 100%;
        justify-content: flex-start;
        padding: 6px;
    }
    .yd-overview-actions .yd-button {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }
    .yd-layout {
        padding: 8px 10px 78px;
        gap: 10px;
    }
    .yd-layout-topnav { padding: 8px 10px 78px; }
    .yd-shell.yd-mobile-nav-drawer .yd-layout,
    .yd-shell.yd-mobile-nav-drawer .yd-layout-topnav {
        padding-bottom: 10px;
    }
    .yd-sidebar {
        height: 64px;
        padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    }
    .yd-sidebar {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
    .yd-nav-btn {
        min-height: 44px;
        padding: 6px 6px;
        gap: 3px;
    }
    .yd-nav-title { font-size: 10px; }
    .yd-nav-icon { width: 24px; height: 24px; flex: 0 0 24px; }
    .yd-nav-icon svg { width: 15px; height: 15px; }
    .yd-shell.yd-mobile-nav-drawer .yd-sidebar {
        width: min(296px, calc(100vw - 24px));
        padding: 12px 8px 14px;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-btn {
        min-height: 46px;
        padding: 6px 8px;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-title {
        font-size: 14px;
    }
    .yd-shell.yd-mobile-nav-drawer .yd-nav-sub {
        font-size: 11px;
    }
    .yd-chart-head h3 { font-size: 16px; }
    .yd-chart-area { min-height: 210px; }
    .yd-mini-empty { min-height: 200px; font-size: 13px; }
    .yd-bar-chart { height: 200px; }
    .yd-pie-chart { width: 186px; height: 186px; }
    .yd-list-structures tr {
        margin-bottom: 9px;
        padding: 7px;
    }
    .yd-list-structures td {
        font-size: 13px;
        padding: 6px 3px;
    }
    .yd-drawer-foot .yd-button {
        min-height: 40px;
        width: 100%;
    }
    .yd-notify-settings-item {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-list-structures td[data-label="İşlemler"] .yd-action-btn {
        min-height: 40px;
    }
    #tab-users .yd-list-users tr {
        margin-bottom: 9px;
        padding: 8px 8px 6px;
        padding-right: 54px;
    }
    #tab-users .yd-list-users td {
        font-size: 13px;
        padding: 2px 0;
        gap: 4px;
    }
    #tab-users .yd-list-users td::before {
        min-width: 84px;
        flex-basis: 84px;
        font-size: 11.5px;
    }
    #tab-users .yd-list-users td:not([data-label="İşlem"]) {
        padding-right: 0;
    }
    #user-assign-modal {
        align-items: flex-end;
        padding: 8px;
    }
    #user-assign-modal .yd-modal-sheet {
        width: 100%;
        max-width: 100% !important;
        max-height: calc(100dvh - 8px);
        border-radius: 14px 14px 0 0;
    }
    #user-assign-modal .yd-modal-head > b {
        font-size: 15px;
    }
    .yd-user-assign-list tr {
        padding: 7px;
    }
    .yd-user-assign-list td {
        font-size: 13px;
        padding: 3px 1px;
        gap: 5px;
    }
    .yd-user-assign-list td::before {
        min-width: 98px;
        flex-basis: 98px;
        font-size: 11.5px;
    }
    #user-modal .yd-user-modal-head > b {
        font-size: 15px;
    }
    #tab-roles .yd-list tr {
        margin-bottom: 9px;
        padding: 7px;
    }
    #tab-roles .yd-list td {
        font-size: 13px;
        padding: 6px 3px;
    }
    #tab-roles .yd-list td::before {
        font-size: 11.5px;
    }
    .yd-list-user-structures tr {
        margin-bottom: 9px;
        padding: 7px;
    }
    .yd-list-user-structures td {
        font-size: 13px;
        padding: 6px 3px;
    }
    .yd-user-site-badge {
        min-height: 40px;
        min-width: 46px;
        font-size: 13px;
        border-radius: 12px;
        padding: 8px 13px;
    }
    .yd-user-site-badge.yd-user-site-badge-all {
        padding: 8px 14px;
        font-size: 12px;
    }
    #yd-structures-map {
        min-height: 320px;
    }
    .yd-location-list {
        max-height: 200px;
    }
    .yd-location-item-title {
        font-size: 15px;
    }
    .yd-location-item-meta,
    .yd-location-modal-line {
        font-size: 13px;
    }
    .yd-structure-status-select {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }
    .yd-archive-actions .yd-button {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }
    .yd-user-menu {
        width: min(260px, calc(100vw - 16px));
        min-width: 200px;
    }
    .yd-list-archive tr {
        margin-bottom: 9px;
        padding: 7px;
    }
    .yd-list-archive td {
        font-size: 13px;
        padding: 6px 3px;
    }
    .yd-archive-picker-badge-label {
        font-size: 11px;
    }
    .yd-archive-picker-badge-value {
        font-size: 13px;
    }
    .yd-form-section-title {
        font-size: 15px;
        padding: 8px 9px;
    }
    .yd-import-result {
        max-height: 170px;
    }
    .yd-import-result-item {
        font-size: 13px;
        padding: 7px;
    }
    .yd-chart-list-row { min-height: 40px; padding: 7px; gap: 14px; }
    .yd-chart-list-label, .yd-chart-list-value { font-size: 13px; }
    #yd-group-chart .yd-chart-list-label,
    #yd-group-chart .yd-chart-list-value {
        font-size: 11px;
    }
    #yd-group-chart .yd-chart-list-label {
        gap: 6px;
    }
    #yd-group-chart .yd-chart-list-label span:last-child {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        line-height: 1.15;
    }
    .yd-control-period-group {
        min-width: 0;
    }
    .yd-control-period-select {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-control-range-group {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
        gap: 8px;
    }
    .yd-control-range-group .yd-input,
    .yd-control-range-group .yd-button {
        width: 100%;
        min-height: 40px;
    }
    .yd-user-cloud-wrap {
        min-height: 0;
        height: auto;
        padding: 9px;
    }
    .yd-user-cloud-title {
        font-size: 15px;
    }
    .yd-cloud-avatar {
        width: 48px;
        height: 48px;
    }
    .yd-cloud-item {
        min-width: 64px;
    }
    .yd-cloud-name {
        max-width: 74px;
        font-size: 13px;
    }
    .yd-cloud-meta {
        font-size: 11px;
    }
    .yd-cloud-badge {
        min-width: 20px;
        height: 20px;
        font-size: 11px;
    }
    .yd-user-photo-preview {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
    .yd-user-photo-actions {
        min-width: 0;
    }
    .yd-profile-photo-preview {
        width: 64px;
        height: 64px;
        flex-basis: 64px;
    }
    .yd-profile-photo-actions {
        min-width: 0;
    }
    .yd-control-user-table th,
    .yd-control-user-table td {
        font-size: 13px;
    }
    .yd-control-detail-answer {
        padding: 9px;
    }
    .yd-progress-item,
    .yd-control-detail-answer {
        min-height: 40px;
    }
    .yd-control-detail-answer > b {
        margin-bottom: 4px;
    }
    .yd-control-detail-answer .yd-subtitle {
        margin-top: 3px;
        font-size: 13px;
    }
    .yd-control-note-inline {
        display: block !important;
    }
    .yd-control-note-inline-sep {
        display: none;
    }
    .yd-control-note-inline-item {
        display: block;
        margin-bottom: 2px;
    }
    .yd-control-detail-photo-btn {
        min-height: 40px;
    }
    .yd-layout {
        gap: 10px;
    }
    .yd-stats { grid-template-columns: 1fr; }
    .yd-list th, .yd-list td {
        font-size: 13px;
        padding: 8px 6px;
    }
    .yd-input, .yd-select, .yd-textarea, .yd-button {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-top-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    .yd-top-nav-btn {
        min-height: 40px;
        white-space: nowrap;
    }
    .yd-top-actions { width: 100%; justify-content: flex-end; }
    .yd-notification-popover {
        top: 58px;
        right: 8px;
        width: min(340px, calc(100vw - 16px));
    }
    .yd-notification-panel {
        max-height: min(450px, calc(100vh - 74px));
    }
    .yd-action-btn {
        min-width: 40px;
        padding: 8px;
    }
    .yd-btn-text { display: none; }
    .yd-overview-actions .yd-btn-text,
    .yd-archive-actions .yd-btn-text {
        display: inline !important;
    }
    .yd-overview-actions .yd-action-icon,
    .yd-archive-actions .yd-action-icon {
        margin-right: 6px;
    }
    .yd-archive-actions-wrap .yd-btn-text { display: none; }
    .yd-archive-actions-wrap .yd-action-btn {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
        justify-content: center;
    }
    .yd-list-archive tr td:last-child {
        position: static !important;
        width: 100% !important;
        padding-top: 10px !important;
        margin-top: 8px;
    }
    .yd-list-archive tr td:last-child .yd-archive-actions-wrap {
        justify-content: flex-start;
        gap: 8px;
    }
    .yd-archive-delete-inline-btn {
        min-height: 40px;
    }
    .yd-archive-actions-wrap .yd-btn-icon {
        margin-right: 6px;
    }
    .yd-btn-icon { margin-right: 0; width: 18px; height: 18px; font-size: 15px; }
    .yd-drawer-head, .yd-drawer-foot { padding: 10px; }
    .yd-modal-head, .yd-modal-body, .yd-modal-foot {
        padding-left: 12px;
        padding-right: 12px;
    }
    #archive-level-modal {
        padding: 0;
    }
    #archive-level-modal .yd-modal-sheet {
        width: 100vw !important;
        height: 100vh;
        max-height: 100vh;
        border-radius: 0;
        border-left: 0;
        border-right: 0;
    }
    #archive-level-modal .yd-modal-head,
    #archive-level-questions-modal .yd-modal-head {
        min-height: 56px;
        padding-top: 10px;
        padding-bottom: 10px;
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 6px;
    }
    #archive-level-modal .yd-modal-head > b,
    #archive-level-questions-modal .yd-modal-head > b {
        font-size: 16px;
    }
    #archive-level-modal .yd-modal-head .yd-button,
    #archive-level-questions-modal .yd-modal-head .yd-button {
        width: auto !important;
        min-width: 40px;
        min-height: 40px;
        padding: 8px 10px;
    }
    #archive-level-modal .yd-archive-level-head-actions {
        gap: 6px;
    }
    #archive-level-modal #archive-level-new-inspection-btn .yd-btn-text {
        display: inline !important;
    }
    #archive-level-modal #archive-level-new-inspection-btn .yd-action-icon {
        margin-right: 6px;
    }
    #archive-level-modal .yd-building-model-wrap {
        border-radius: 12px;
    }
    #archive-level-modal .yd-building-stack.three {
        min-height: 300px;
    }
    #archive-level-modal .yd-building-3d-canvas-wrap,
    #archive-level-modal .yd-building-3d-canvas-wrap canvas,
    #archive-level-modal .yd-building-3d-fallback {
        min-height: 280px;
        height: 300px;
    }
    .yd-building-3d-tools {
        top: 6px;
        right: 6px;
        gap: 4px;
        padding: 5px;
    }
    .yd-building-3d-tool {
        min-width: 40px;
        min-height: 40px;
    }
    .yd-building-3d-tool.fit {
        min-width: 58px;
        font-size: 13px;
        padding: 0 8px;
    }
    #archive-start-modal,
    #archive-flow-modal,
    #archive-flow-close-modal,
    #archive-record-picker-modal,
    #archive-delete-modal {
        align-items: center;
        padding: 8px;
    }
    #archive-start-modal .yd-modal-sheet,
    #archive-flow-modal .yd-modal-sheet,
    #archive-flow-close-modal .yd-modal-sheet,
    #archive-record-picker-modal .yd-modal-sheet,
    #archive-delete-modal .yd-modal-sheet {
        border-radius: 14px;
        max-height: 96vh;
    }
    .yd-archive-record-item {
        padding: 9px 10px;
    }
    .yd-choice-btn {
        min-height: 42px;
        padding: 10px 11px;
    }
    .yd-choice-btn-text {
        font-size: 13px;
    }
    .yd-flow-section-title {
        font-size: 15px;
    }
    .yd-flow-section-btn {
        min-height: 40px;
        padding: 8px 11px;
        font-size: 13px;
    }
    .yd-level-stage-btn {
        min-height: 40px;
        padding: 8px;
    }
    .yd-level-stage-btn b { font-size: 15px; }
    .yd-level-photo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
    .yd-level-photo-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .yd-level-photo-list-item { min-height: 96px; }
    .yd-level-photo-list-item img { height: 96px; }
    #archive-level-photo-list-modal .yd-modal-sheet {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px) !important;
        max-height: calc(100vh - 12px);
    }
    #archive-level-photo-list-modal .yd-modal-foot .yd-button { min-height: 40px; font-size: 14px; }
    #archive-flow-history-btn,
    .yd-button.secondary.yd-level-history-btn[data-question-history-open] {
        border-radius: 9px;
        background: linear-gradient(135deg, #ffecb3, #d7ccc8) !important;
        border: 1px solid #c7b9ad !important;
        color: #4f3c2f !important;
        box-shadow: 0 5px 12px rgba(103, 78, 62, 0.24) !important;
    }
    #archive-flow-history-btn:hover,
    .yd-button.secondary.yd-level-history-btn[data-question-history-open]:hover {
        background: linear-gradient(135deg, #ffe6a0, #cfbfba) !important;
        border-color: #bda99b !important;
    }
    #archive-flow-history-btn:active,
    .yd-button.secondary.yd-level-history-btn[data-question-history-open]:active {
        transform: translateY(1px);
    }
    [data-theme="dark"] #archive-flow-history-btn,
    [data-theme="dark"] .yd-button.secondary.yd-level-history-btn[data-question-history-open] {
        background: linear-gradient(135deg, #ffecb3, #d7ccc8) !important;
        border-color: #c7b9ad !important;
        color: #4f3c2f !important;
        box-shadow: 0 4px 10px rgba(103, 78, 62, 0.24) !important;
    }
    [data-theme="dark"] #archive-flow-history-btn:hover,
    [data-theme="dark"] .yd-button.secondary.yd-level-history-btn[data-question-history-open]:hover {
        background: linear-gradient(135deg, #ffe6a0, #cfbfba) !important;
        border-color: #bda99b !important;
    }
    .yd-button.secondary.yd-level-history-btn[data-level-mark-view] {
        background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
        border: 1px solid #0c6a63 !important;
        color: #f0fdfa !important;
        box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
    }
    .yd-button.secondary.yd-level-history-btn[data-level-mark-view]:hover {
        background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
        border-color: #0a5f59 !important;
    }
    .yd-button.secondary.yd-level-history-btn[data-control-mark-view],
    #control-detail-modal [data-control-mark-view] {
        background: linear-gradient(135deg, #14b8a6, #0f766e) !important;
        border: 1px solid #0c6a63 !important;
        color: #f0fdfa !important;
        box-shadow: 0 5px 12px rgba(8, 94, 88, 0.24) !important;
        min-height: 40px;
    }
    .yd-button.secondary.yd-level-history-btn[data-control-mark-view]:hover,
    #control-detail-modal [data-control-mark-view]:hover {
        background: linear-gradient(135deg, #12a89a, #0d6b65) !important;
        border-color: #0a5f59 !important;
    }
    .yd-photo-viewer-wrap { min-height: 180px; }
    .yd-photo-note { font-size: 13px; font-weight: 700; }
    .yd-photo-answer-badge {
        display: inline-flex;
        margin-left: 0;
        margin-top: 6px;
    }
    .yd-photo-note-overlay {
        bottom: 8px;
        max-width: none;
        max-width: calc(100% - 16px);
        padding: 8px 9px;
        -webkit-line-clamp: 4;
    }
    .yd-photo-note-overlay.pos-rb,
    .yd-photo-note-overlay.pos-lb {
        bottom: 52px;
    }
    .yd-question-history-head b {
        font-size: 15px;
    }
    .yd-question-history-list,
    .yd-question-history-timeline {
        max-height: 300px;
        padding: 8px;
    }
    .yd-question-history-item b,
    .yd-history-status,
    .yd-history-resolution {
        font-size: 13px;
    }
    .yd-history-date-badge {
        min-height: 24px;
        font-size: 12px;
    }
    .yd-level-history-row {
        align-items: stretch;
    }
    .yd-building-model-wrap {
        margin-top: 10px;
        padding: 10px;
    }
    .yd-building-model-head {
        gap: 8px;
    }
    .yd-building-legend {
        gap: 6px;
        font-size: 12px;
    }
    .yd-building-info-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .yd-building-info-chip,
    .yd-building-info-chip.stage {
        grid-column: auto;
        min-height: 48px;
        padding: 8px;
    }
    .yd-building-info-chip b {
        font-size: 13px;
    }
    .yd-building-stack {
        padding: 8px;
        gap: 3px;
    }
    .yd-building-stack.three {
        min-height: 280px;
        padding: 0;
        gap: 0;
    }
    .yd-building-3d-canvas-wrap,
    .yd-building-3d-canvas-wrap canvas,
    .yd-building-3d-fallback {
        min-height: 280px;
        height: 300px;
    }
    .yd-building-3d-caption {
        left: 8px;
        right: 8px;
        bottom: 8px;
        gap: 4px;
    }
    .yd-building-3d-badge {
        min-height: 24px;
        font-size: 13px;
        padding: 5px 8px;
    }
    .yd-building-floor {
        width: 96%;
        grid-template-columns: 1fr;
        min-height: 40px;
        gap: 2px;
    }
    .yd-building-floor-copy {
        justify-items: start;
        width: 100%;
    }
    .yd-building-floor-label {
        width: 100%;
        font-size: 13px;
    }
    .yd-building-floor-status {
        max-width: 100%;
        white-space: normal;
        font-size: 12px;
    }
    .yd-building-window-row,
    .yd-building-foundation-pattern {
        width: 100%;
        grid-template-columns: repeat(4, minmax(18px, 1fr));
    }
    .yd-building-window-row i {
        height: 14px;
    }
    .yd-building-history {
        padding: 8px;
    }
    .yd-building-history-title {
        font-size: 15px;
    }
    .yd-building-history-controls {
        grid-template-columns: 1fr;
        gap: 6px;
    }
    .yd-building-history-control label {
        font-size: 13px;
    }
    .yd-building-history-control .yd-select {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-building-history-item {
        min-height: 44px;
        padding: 10px;
    }
    .yd-building-history-item-head b {
        font-size: 14px;
    }
    .yd-building-history-open-text {
        display: none;
    }
    .yd-building-history-item b {
        font-size: 13px;
    }
    .yd-building-history-meta-row,
    .yd-building-history-badges {
        gap: 4px;
    }
    .yd-building-history-badge {
        min-height: 24px;
        font-size: 13px;
        padding: 3px 7px;
    }
    .yd-level-questions-sheet {
        width: 100vw;
        max-height: 100dvh;
        height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
    }
    #archive-level-modal,
    #archive-level-questions-modal {
        align-items: stretch;
        justify-content: stretch;
        padding: 0;
    }
    #archive-level-modal .yd-modal-sheet,
    #archive-level-questions-modal .yd-modal-sheet {
        width: 100vw !important;
        height: 100dvh !important;
        max-height: 100dvh !important;
        min-height: 100dvh !important;
        margin: 0;
        border-radius: 0;
    }
    #archive-level-modal .yd-modal-head,
    #archive-level-questions-modal .yd-modal-head {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        column-gap: 6px;
        padding-top: max(8px, env(safe-area-inset-top));
        padding-bottom: 8px;
        position: sticky;
        top: 0;
        z-index: 4;
    }
    #archive-level-modal .yd-modal-head > b,
    #archive-level-questions-modal .yd-modal-head > b {
        max-width: none;
        font-size: 15px;
    }
    #archive-level-modal .yd-modal-head .yd-button,
    #archive-level-questions-modal .yd-modal-head .yd-button {
        width: auto !important;
        min-width: 40px;
        min-height: 40px;
        padding: 8px 9px;
    }
    .yd-level-question-detail {
        margin-top: 10px;
    }
    .yd-level-open-hint {
        padding: 12px;
        font-size: 13px;
    }
    .yd-level-date-badge {
        width: 100%;
        justify-content: flex-start;
    }
    .yd-level-inline-meta {
        gap: 5px;
    }
    .yd-level-inline-pill {
        min-height: 28px;
        font-size: 13px;
        padding: 4px 8px;
    }
    .yd-level-history-btn {
        width: 100%;
        min-height: 40px;
    }
    .yd-answer-btn {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 10px;
    }
    .yd-flow-history-btn {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }
    #archive-flow-modal .yd-mark-action-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    #archive-flow-modal #archive-project-file-status {
        font-size: 13px;
        min-height: 20px;
    }
    .yd-photo-source-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    .yd-photo-source-btn {
        width: 100%;
        min-height: 40px;
    }
    .yd-flow-floor-title {
        font-size: 14px;
    }
    .yd-progress-dots {
        gap: 6px;
    }
    .yd-progress-dot {
        width: 34px;
        height: 34px;
        min-height: 34px;
        font-size: 13px;
    }
    .yd-flow-photo-item {
        width: 72px;
        height: 72px;
    }
    .yd-flow-photo-badge {
        min-height: 18px;
        font-size: 10px;
        padding: 0 5px;
    }
    .yd-flow-photo-remove {
        min-height: 24px;
        min-width: 24px;
    }
    .yd-archive-mark-sheet {
        width: min(100%, calc(100vw - 10px));
        border-radius: 12px;
    }
    .yd-archive-mark-viewer,
    #archive-mark-pdf-stage,
    #archive-mark-pdf-stage.aps-mode,
    #archive-mark-aps-stage,
    #archive-mark-aps-viewer,
    #archive-mark-aps-overlay,
    .yd-archive-mark-tile-map,
    .yd-archive-mark-side {
        min-height: 280px;
    }
    .yd-archive-mark-side {
        max-height: 44vh;
        padding: 8px;
    }
    .yd-archive-mark-viewer {
        max-height: calc(96vh - 120px);
    }
    .yd-mark-pin-list {
        max-height: 132px;
    }
    .yd-mark-pin-row {
        min-height: 42px;
        padding: 6px 8px;
    }
    .yd-mark-pin-row-main b {
        font-size: 13px;
    }
    .yd-mark-pin-row-main small {
        font-size: 12px;
    }
    .yd-archive-mark-body.hide-side-panel .yd-archive-mark-layout {
        grid-template-columns: 1fr;
    }
    .yd-archive-mark-photo-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .yd-archive-mark-page-controls .yd-button {
        min-height: 40px;
    }
    .yd-structure-project-head b {
        font-size: 15px;
        line-height: 1.35;
    }
    .yd-upload-progress {
        margin-top: 8px;
        margin-bottom: 10px;
    }
    .yd-upload-progress-head {
        font-size: 13px;
        line-height: 1.35;
    }
    .yd-structure-project-meta {
        font-size: 13px;
        line-height: 1.35;
    }
    .yd-project-status {
        min-height: 30px;
        width: max-content;
    }
    .yd-aps-viewer-sheet {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        height: calc(100vh - 12px);
        max-height: calc(100vh - 12px);
    }
    #aps-viewer-modal .yd-modal-head b {
        font-size: 15px;
    }
    #aps-viewer-status {
        font-size: 13px;
    }
    .yd-aps-viewer-canvas {
        min-height: 0;
        height: 100%;
        border-radius: 10px;
    }
    .yd-aps-viewer-frame {
        min-height: 100%;
        height: 100%;
    }
    #archive-mark-add-project-btn {
        width: 100%;
        min-height: 40px;
        font-size: 13px;
    }
    .yd-mark-pin {
        width: 26px;
        height: 38px;
    }
    .yd-mark-pin-icon::after {
        width: 9px;
        height: 9px;
        left: 8px;
        top: 8px;
    }
    .yd-user-activities {
        min-width: 190px;
        gap: 6px;
    }
    .yd-user-activity-item {
        padding: 6px;
    }
    .yd-user-control-badge {
        min-height: 22px;
        font-size: 12px;
    }
    .yd-yibf-link,
    .yd-user-activity-meta,
    .yd-user-assign-state {
        font-size: 13px;
    }
}

html.yd-longpress-select-lock,
body.yd-longpress-select-lock {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.yd-checklist-page {
    overflow: hidden;
}

.yd-checklist-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 16px;
    border: 1px solid rgba(10, 96, 124, 0.14);
    border-radius: 20px;
    background: radial-gradient(circle at 12% 18%, rgba(29, 160, 184, 0.18), transparent 34%), linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(238, 248, 250, 0.82));
    box-shadow: 0 18px 42px rgba(5, 48, 67, 0.08);
    margin-bottom: 14px;
}

.yd-checklist-kicker {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    color: #075985;
    background: rgba(14, 165, 233, 0.12);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.yd-checklist-hero h2 {
    margin: 0 0 3px;
    font-size: 22px;
    line-height: 1.18;
}

.yd-checklist-hero p {
    max-width: 680px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.38;
}

.yd-checklist-hero-actions,
.yd-checklist-panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.yd-checklist-presets-sheet {
    max-width: 720px;
}

.yd-checklist-presets-body {
    padding-bottom: 0;
}

.yd-presets-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid rgba(12, 74, 110, 0.18);
    margin-bottom: 14px;
}

.yd-presets-tab {
    min-height: 40px;
    padding: 8px 14px;
    border: 0;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: var(--muted);
    font-weight: 800;
    cursor: pointer;
}

.yd-presets-tab.is-active {
    color: #075985;
    border-bottom-color: #0ea5e9;
}

.yd-presets-list {
    display: grid;
    gap: 10px;
    min-height: 60px;
}

.yd-preset-card,
.yd-preset-empty {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(12, 74, 110, 0.14);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.88);
}

.yd-preset-card.is-system {
    border-color: rgba(14, 165, 233, 0.28);
    background: rgba(240, 249, 255, 0.92);
}

.yd-preset-main {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.yd-preset-main b,
.yd-preset-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yd-preset-main span,
.yd-preset-empty {
    color: var(--muted);
    font-size: 13px;
}

.yd-preset-badge {
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.yd-preset-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.yd-preset-actions .yd-button {
    min-height: 40px;
}

.yd-preset-default-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin-top: 8px;
    color: var(--text);
    font-weight: 700;
}

[data-theme="dark"] .yd-preset-card,
[data-theme="dark"] .yd-preset-empty {
    background: rgba(15, 23, 42, 0.78);
    border-color: rgba(148, 163, 184, 0.24);
}

[data-theme="dark"] .yd-preset-card.is-system {
    background: rgba(8, 47, 73, 0.5);
    border-color: rgba(56, 189, 248, 0.28);
}

[data-theme="dark"] .yd-presets-tab.is-active {
    color: #7dd3fc;
}

[data-theme="dark"] .yd-preset-badge {
    background: rgba(22, 101, 52, 0.72);
    color: #dcfce7;
}

.yd-checklist-locked {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    margin-bottom: 14px;
    border-radius: 18px;
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: rgba(255, 251, 235, 0.94);
    color: #92400e;
}

.yd-checklist-scopebar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.yd-checklist-tabs {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
    border-bottom: 1px solid rgba(12, 74, 110, 0.2);
    padding-bottom: 0;
    position: relative;
}

.yd-checklist-tab {
    min-height: 42px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 14px 14px 0 0;
    padding: 9px 16px 10px;
    background: rgba(226, 232, 240, 0.6);
    color: var(--text);
    font-weight: 700;
    cursor: pointer;
    position: relative;
    top: 1px;
    transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s ease;
}

.yd-checklist-tab:hover {
    color: #0b5e76;
    background: rgba(203, 213, 225, 0.7);
}

.yd-checklist-tab.is-active,
.yd-checklist-tab-item.is-active .yd-checklist-tab {
    color: #0a4f63;
    border-color: rgba(8, 116, 145, 0.32);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 251, 253, 0.98));
    box-shadow: 0 -2px 0 rgba(14, 165, 233, 0.85) inset, 0 6px 18px rgba(8, 116, 145, 0.1);
    z-index: 2;
}

.yd-checklist-tab-item.is-active .yd-checklist-tab-dots {
    background: rgba(186, 230, 253, 0.3);
    color: #0369a1;
}

.yd-checklist-tab-add {
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px 12px 0 0;
    border: 1px dashed rgba(8, 116, 145, 0.45);
    border-bottom: 0;
    background: rgba(186, 230, 253, 0.36);
    color: #075985;
    font-size: 22px;
    line-height: 1;
    font-weight: 700;
    cursor: pointer;
    position: relative;
    top: 1px;
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.yd-checklist-tab-add:hover {
    background: rgba(125, 211, 252, 0.44);
    border-color: rgba(8, 116, 145, 0.65);
}

.yd-checklist-tab-tools {
    display: inline-flex;
    align-items: flex-end;
    gap: 6px;
}

/* Tab item wrapper */
.yd-checklist-tab-item {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.yd-checklist-tab-item.is-active .yd-checklist-tab {
    /* active state artık wrapper'dan geliyor */
}

/* Tab üzerinde inline rename input */
.yd-checklist-tab-inline-input {
    display: inline-block;
    width: 120px;
    min-height: 40px;
    padding: 6px 10px;
    border: 2px solid rgba(14, 165, 233, 0.70);
    border-radius: 10px 10px 0 0;
    border-bottom: 0;
    background: #ffffff;
    color: #0a4f63;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    box-shadow: 0 -2px 0 rgba(14, 165, 233, 0.85) inset;
}

/* 3 nokta butonu */
.yd-checklist-tab-dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    min-height: 100%;
    border: none;
    background: none;
    color: rgba(7, 89, 133, 0.55);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 2px;
    border-radius: 0 10px 0 0;
    transition: background .15s, color .15s;
}

.yd-checklist-tab-dots:hover {
    background: rgba(125, 211, 252, 0.35);
    color: #0369a1;
}

.yd-checklist-tab-menu-wrap {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

/* Açılır menü */
.yd-checklist-tab-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 10000040;
    background: #ffffff;
    border: 1px solid rgba(8, 116, 145, 0.22);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(5, 48, 67, 0.18);
    padding: 4px;
    min-width: 170px;
    white-space: nowrap;
}

.yd-checklist-tab-menu.is-open {
    display: block;
}

.yd-checklist-tab-menu button {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 9px 12px;
    border: none;
    background: none;
    color: #0c4a6e;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    transition: background .13s;
}

.yd-checklist-tab-menu button svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-checklist-tab-menu button:hover {
    background: rgba(186, 230, 253, 0.5);
}

.yd-checklist-tab-menu button.danger {
    color: #b91c1c;
}

.yd-checklist-tab-menu button.danger:hover {
    background: rgba(254, 226, 226, 0.65);
}
    min-width: 40px;
    min-height: 40px;
    border-radius: 12px 12px 0 0;
    border: 1px solid rgba(8, 116, 145, 0.28);
    border-bottom: 0;
    background: rgba(226, 232, 240, 0.56);
    color: #075985;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yd-checklist-tab-tool svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-checklist-tab-tool:hover {
    background: rgba(186, 230, 253, 0.5);
    border-color: rgba(8, 116, 145, 0.52);
}

.yd-checklist-tab-tool.danger {
    color: #b91c1c;
    border-color: rgba(239, 68, 68, 0.35);
    background: rgba(254, 226, 226, 0.65);
}

.yd-checklist-tab-tool.danger:hover {
    background: rgba(254, 202, 202, 0.76);
}

#checklist-scope-manage-delete-btn.is-pulse {
    animation: ydScopeDangerPulse .85s ease;
}

@keyframes ydScopeDangerPulse {
    0% { transform: scale(1); }
    45% { transform: scale(1.06); }
    100% { transform: scale(1); }
}

.yd-checklist-tabs-primary .yd-checklist-tab {
    min-width: 106px;
    font-size: 15px;
}

.yd-checklist-tabs-secondary .yd-checklist-tab {
    min-height: 38px;
    padding: 7px 14px 8px;
    font-size: 14px;
}

.yd-checklist-layout {
    display: grid;
    grid-template-columns: minmax(260px, 0.86fr) minmax(0, 1.4fr);
    gap: 16px;
    align-items: start;
}

.yd-checklist-panel {
    min-width: 0;
    border: 1px solid rgba(10, 96, 124, 0.13);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.76);
    box-shadow: 0 16px 34px rgba(5, 48, 67, 0.07);
    padding: 14px;
}

.yd-checklist-panel-head {
    justify-content: space-between;
    margin-bottom: 12px;
}

.yd-checklist-panel-head b {
    display: block;
    color: var(--text);
}

.yd-checklist-panel-head span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    margin-top: 2px;
}

.yd-checklist-section-list,
.yd-checklist-question-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yd-checklist-section-item,
.yd-checklist-question-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    min-height: 54px;
    border: 1px solid rgba(15, 97, 123, 0.12);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(243, 250, 251, 0.86));
    padding: 10px;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.yd-checklist-section-item:hover,
.yd-checklist-question-item:hover {
    border-color: rgba(8, 116, 145, 0.32);
    box-shadow: 0 12px 28px rgba(5, 48, 67, 0.08);
}

.yd-checklist-section-item.is-editing,
.yd-checklist-question-item.is-editing {
    grid-template-columns: 1fr;
    align-items: stretch;
    min-height: 64px;
}

.yd-checklist-section-item.is-active {
    border-color: rgba(8, 116, 145, 0.42);
    background: linear-gradient(135deg, rgba(232, 248, 251, 0.98), rgba(255, 255, 255, 0.9));
}

.yd-checklist-drag {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0b7893;
    background: rgba(14, 165, 233, 0.1);
    cursor: grab;
    font-weight: 900;
    user-select: none;
}

.yd-checklist-drag:active {
    cursor: grabbing;
}

.yd-checklist-title,
.yd-checklist-question-text {
    min-width: 0;
    color: var(--text);
    font-weight: 800;
    line-height: 1.35;
    word-break: break-word;
}

button.yd-checklist-title {
    min-height: 40px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.yd-checklist-question-text {
    font-weight: 700;
}

.yd-checklist-meta {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.yd-checklist-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.yd-checklist-inline-editor {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.yd-checklist-inline-editor.has-select {
    grid-template-columns: minmax(0, 1fr);
}

.yd-checklist-inline-select-actions {
    display: grid;
    grid-template-columns: minmax(170px, 220px) auto auto;
    gap: 8px;
    align-items: center;
    width: 100%;
}

.yd-checklist-inline-editor .yd-input,
.yd-checklist-inline-editor .yd-select,
.yd-checklist-inline-editor .yd-button {
    min-height: 40px;
}

.yd-checklist-icon-btn {
    min-width: 40px;
    min-height: 40px;
    border: 0;
    border-radius: 14px;
    background: rgba(8, 116, 145, 0.09);
    color: #075985;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.yd-checklist-icon-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.yd-checklist-icon-btn:hover {
    background: rgba(8, 116, 145, 0.16);
}

.yd-checklist-icon-btn.danger {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.1);
}

.yd-checklist-empty {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px dashed rgba(15, 97, 123, 0.25);
    border-radius: 20px;
    color: var(--muted);
    padding: 18px;
}

.yd-checklist-toast {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 10000020;
    max-width: min(380px, calc(100vw - 28px));
    padding: 13px 16px;
    border-radius: 18px;
    color: #063447;
    background: linear-gradient(135deg, #dff8ee, #e8f6ff);
    box-shadow: 0 18px 48px rgba(5, 48, 67, 0.22);
    font-weight: 800;
    transform: translateY(18px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
}

.yd-checklist-toast.is-visible {
    opacity: 1;
    transform: translateY(0);
}


.sortable-chosen,
.yd-checklist-sort-chosen {
    box-shadow: 0 4px 16px rgba(8, 116, 145, 0.18) !important;
    border-color: rgba(8, 116, 145, 0.45) !important;
}

/* Ghost = taşınan öğenin orijinal konumundaki boşluk göstergesi */
.sortable-ghost,
.yd-checklist-sort-ghost {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Chosen = henüz taşıma başlamadan seçili öğe */
.sortable-chosen,
.yd-checklist-sort-chosen {
    box-shadow: 0 4px 18px rgba(8, 116, 145, 0.22) !important;
}

/* Fallback clone = fareyle birlikte hareket eden gerçek kart kopyası */
.sortable-drag,
.sortable-fallback,
.yd-checklist-sort-fallback {
    transition: none !important;
    animation: none !important;
    pointer-events: none !important;
    z-index: 10000030 !important;
    opacity: 0.97 !important;
    box-shadow: 0 20px 50px rgba(5, 48, 67, 0.32), 0 0 0 2px rgba(14, 165, 233, 0.30) !important;
    cursor: grabbing !important;
}

/* .yd-checklist-source-hidden — artık kullanılmıyor, ghost slot yaklaşımıyla değiştirildi */

body.yd-checklist-drag-active .yd-checklist-drag {
    cursor: grabbing !important;
}

.yd-checklist-section-list.is-sorting .yd-checklist-section-item,
.yd-checklist-question-list.is-sorting .yd-checklist-question-item {
    transition: transform .16s cubic-bezier(0.18, 0.9, 0.22, 1), box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

.yd-checklist-section-list.is-sorting,
.yd-checklist-question-list.is-sorting {
    cursor: grabbing;
}

.yd-checklist-section-list.is-sorting .yd-checklist-section-item:not(.yd-checklist-sort-ghost),
.yd-checklist-question-list.is-sorting .yd-checklist-question-item:not(.yd-checklist-sort-ghost) {
    filter: saturate(1.04);
}

[data-theme="dark"] .yd-checklist-hero {
    border-color: rgba(125, 211, 252, 0.16);
    background: radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.16), transparent 34%), linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(8, 47, 73, 0.72));
}

[data-theme="dark"] .yd-checklist-kicker {
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.14);
}

[data-theme="dark"] .yd-checklist-hero p,
[data-theme="dark"] .yd-checklist-panel-head span,
[data-theme="dark"] .yd-checklist-meta,
[data-theme="dark"] .yd-checklist-empty {
    color: #cbd5e1;
}

[data-theme="dark"] .yd-checklist-locked {
    color: #fde68a;
    background: rgba(120, 53, 15, 0.34);
    border-color: rgba(251, 191, 36, 0.3);
}

[data-theme="dark"] .yd-checklist-tab {
    color: #dbeafe;
    background: rgba(30, 41, 59, 0.8);
    border-color: transparent;
}

[data-theme="dark"] .yd-checklist-tab-add {
    color: #e2e8f0;
    border-color: rgba(125, 211, 252, 0.48);
    background: rgba(30, 58, 138, 0.34);
}

[data-theme="dark"] .yd-checklist-tab-add:hover {
    border-color: rgba(125, 211, 252, 0.72);
    background: rgba(2, 132, 199, 0.34);
}

[data-theme="dark"] .yd-checklist-tab-tool {
    color: #dbeafe;
    border-color: rgba(125, 211, 252, 0.35);
    background: rgba(30, 58, 138, 0.24);
}

[data-theme="dark"] .yd-checklist-tab-tool:hover {
    border-color: rgba(125, 211, 252, 0.62);
    background: rgba(2, 132, 199, 0.34);
}

[data-theme="dark"] .yd-checklist-tab-tool.danger {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.38);
    background: rgba(127, 29, 29, 0.35);
}

.yd-checklist-scope-sheet .yd-input {
    min-height: 40px;
}

[data-theme="dark"] .yd-checklist-tab:hover {
    color: #7dd3fc;
    background: rgba(51, 65, 85, 0.9);
}

[data-theme="dark"] .yd-checklist-tab-dots {
    color: #bfdbfe;
    background: rgba(30, 58, 138, 0.22);
}

[data-theme="dark"] .yd-checklist-tab-dots:hover,
[data-theme="dark"] .yd-checklist-tab-dots:focus-visible {
    color: #f8fafc;
    background: rgba(2, 132, 199, 0.42);
}

[data-theme="dark"] .yd-checklist-tab-item.is-active .yd-checklist-tab-dots {
    color: #e0f2fe;
    background: rgba(56, 189, 248, 0.26);
}

[data-theme="dark"] .yd-checklist-tabs {
    border-bottom-color: rgba(125, 211, 252, 0.24);
}

[data-theme="dark"] .yd-checklist-tab.is-active {
    color: #e0f2fe;
    border-color: rgba(125, 211, 252, 0.36);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(8, 47, 73, 0.88));
    box-shadow: 0 -2px 0 rgba(56, 189, 248, 0.95) inset, 0 8px 20px rgba(8, 47, 73, 0.24);
}

[data-theme="dark"] .yd-checklist-panel,
[data-theme="dark"] .yd-checklist-section-item,
[data-theme="dark"] .yd-checklist-question-item {
    border-color: rgba(125, 211, 252, 0.14);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(8, 47, 73, 0.7));
}

[data-theme="dark"] .yd-checklist-section-item.is-active {
    border-color: rgba(125, 211, 252, 0.36);
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.9), rgba(15, 23, 42, 0.86));
}

[data-theme="dark"] .yd-checklist-title,
[data-theme="dark"] .yd-checklist-question-text,
[data-theme="dark"] .yd-checklist-panel-head b {
    color: #f8fafc;
}

[data-theme="dark"] .yd-checklist-drag,
[data-theme="dark"] .yd-checklist-icon-btn {
    color: #bae6fd;
    background: rgba(56, 189, 248, 0.12);
}

[data-theme="dark"] .yd-checklist-icon-btn.danger {
    color: #fecaca;
    background: rgba(248, 113, 113, 0.14);
}

.yd-checklist-unsaved-sheet {
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.24);
}

@media (max-width: 768px) {
    .yd-checklist-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border-radius: 18px;
    }
    .yd-checklist-hero h2 {
        font-size: 19px;
    }
    .yd-checklist-hero p {
        font-size: 13px;
    }
    .yd-checklist-hero-actions,
    .yd-checklist-panel-head {
        width: 100%;
        justify-content: stretch;
    }
    .yd-checklist-hero-actions .yd-button,
    .yd-checklist-panel-head .yd-button {
        flex: 1 1 160px;
        min-height: 40px;
    }
    .yd-checklist-presets-sheet {
        width: min(96vw, 720px);
        max-height: 92vh;
    }
    .yd-preset-card,
    .yd-preset-empty {
        grid-template-columns: minmax(0, 1fr);
        align-items: stretch;
    }
    .yd-preset-actions {
        justify-content: stretch;
    }
    .yd-preset-actions .yd-button {
        flex: 1 1 140px;
        min-height: 40px;
    }
    .yd-checklist-layout {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .yd-checklist-panel {
        border-radius: 20px;
        padding: 12px;
    }
    .yd-checklist-tab {
        flex: 1 1 128px;
        justify-content: center;
        font-size: 13px;
        border-radius: 12px 12px 0 0;
        min-height: 40px;
        padding: 8px 10px 9px;
    }
    .yd-checklist-tab-add {
        min-height: 40px;
        min-width: 40px;
    }
    .yd-checklist-tab-tool {
        min-height: 40px;
        min-width: 40px;
    }
    .yd-checklist-section-item,
    .yd-checklist-question-item {
        grid-template-columns: 34px minmax(0, 1fr);
    }
    .yd-checklist-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }
    .yd-checklist-inline-editor {
        grid-template-columns: 1fr;
    }
    .yd-checklist-inline-select-actions {
        grid-template-columns: 1fr;
    }
    .yd-checklist-inline-editor .yd-button {
        width: 100%;
    }
    .yd-checklist-toast {
        right: 14px;
        bottom: 82px;
    }
}

@media (max-width: 480px) {
    .yd-checklist-hero {
        padding: 10px;
        gap: 10px;
    }
    .yd-checklist-kicker {
        font-size: 11px;
    }
    .yd-checklist-tab,
    .yd-checklist-icon-btn,
    .yd-checklist-hero-actions .yd-button,
    .yd-checklist-panel-head .yd-button {
        min-height: 40px;
    }
    .yd-presets-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }
    .yd-presets-tab {
        min-height: 40px;
        text-align: left;
    }
    .yd-preset-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .yd-preset-actions .yd-button {
        width: 100%;
        min-height: 40px;
    }
    .yd-checklist-tabs {
        gap: 4px;
    }
    .yd-checklist-tab-add {
        min-width: 40px;
    }
    .yd-checklist-tab-tools {
        width: 100%;
    }
    .yd-checklist-section-item,
    .yd-checklist-question-item {
        padding: 9px;
        gap: 8px;
    }
    .yd-checklist-title,
    .yd-checklist-question-text {
        font-size: 13px;
    }
    .yd-checklist-meta {
        font-size: 12px;
    }
    .yd-checklist-toast {
        left: 10px;
        right: 10px;
        bottom: 78px;
        max-width: none;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .yd-modal-head {
        align-items: flex-start;
        gap: 10px;
    }
    .yd-modal-head > b {
        max-width: none;
        font-size: 16px;
        line-height: 1.35;
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
        word-break: break-word;
    }
    #archive-level-modal .yd-modal-head,
    #archive-level-questions-modal .yd-modal-head {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    #archive-level-modal .yd-archive-level-head-actions {
        width: 100%;
        justify-content: flex-end;
        flex-wrap: wrap;
    }
    #archive-level-modal .yd-building-variant-toggle {
        order: 2;
    }
    #archive-level-modal .yd-building-variant-btn {
        min-height: 40px;
        min-width: 58px;
        padding: 8px 10px;
        font-size: 13px;
    }
    .yd-building-variant-note {
        top: 8px;
        left: 8px;
        max-width: calc(100% - 120px);
        min-height: 24px;
        font-size: 11px;
        padding: 4px 8px;
    }
    #archive-level-modal .yd-modal-head .yd-button,
    #archive-level-questions-modal .yd-modal-head .yd-button {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .yd-modal-head {
        gap: 8px;
    }
    .yd-modal-head > b {
        font-size: 15px;
        line-height: 1.35;
    }
    #archive-level-modal .yd-archive-level-head-actions {
        justify-content: flex-start;
    }
    #archive-level-modal .yd-archive-level-head-actions .yd-button {
        flex: 1 1 calc(50% - 6px);
        min-height: 40px;
    }
    #archive-level-modal .yd-building-variant-toggle {
        width: 100%;
        justify-content: space-between;
        order: 3;
    }
    #archive-level-modal .yd-building-variant-btn {
        flex: 1 1 0;
        min-height: 40px;
        min-width: 0;
        padding: 8px 10px;
    }
    .yd-building-variant-note {
        max-width: calc(100% - 96px);
    }
    #archive-level-new-inspection-btn .yd-btn-text {
        font-size: 13px;
    }
}

[data-theme="dark"] .yd-project-open-structure-item,
[data-theme="dark"] .yd-project-open-file-item {
    border-color: rgba(95, 139, 190, 0.38);
    background: linear-gradient(180deg, rgba(34, 57, 87, 0.58), rgba(19, 35, 58, 0.78));
}

[data-theme="dark"] .yd-project-open-type-badge {
    border-color: rgba(95, 139, 190, 0.38);
    background: rgba(14, 25, 43, 0.85);
    color: #dbeafe;
}

@media (max-width: 768px) {
    .yd-project-open-structure-sheet,
    .yd-project-open-file-sheet {
        width: min(100%, 98vw);
        max-width: 98vw;
        max-height: 92vh;
    }
    .yd-project-open-head {
        align-items: flex-start;
        flex-direction: column;
    }
    .yd-project-open-meta {
        font-size: 13px;
    }
    .yd-project-open-structure-item,
    .yd-project-open-file-item {
        padding: 10px;
    }
    .yd-project-open-file-actions .yd-button,
    .yd-project-open-btn {
        min-height: 40px;
    }
}

@media (max-width: 480px) {
    .yd-project-open-structure-sheet,
    .yd-project-open-file-sheet {
        width: min(100%, 99vw);
        max-width: 99vw;
        max-height: 94vh;
    }
    #project-open-structure-search {
        min-height: 40px;
        font-size: 14px;
    }
    .yd-project-open-meta {
        font-size: 13px;
        line-height: 1.45;
    }
    .yd-project-open-type-badge {
        min-height: 24px;
        font-size: 12px;
    }
}

@media (max-width: 1024px) {
    #tab-structures .yd-structures-table-wrap {
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    #tab-structures .yd-list-structures th,
    #tab-structures .yd-list-structures td {
        min-width: 0 !important;
        white-space: normal !important;
    }

    #tab-structures .yd-list-structures thead {
        display: none;
    }

    #tab-structures .yd-list-structures,
    #tab-structures .yd-list-structures tbody,
    #tab-structures .yd-list-structures tr,
    #tab-structures .yd-list-structures td {
        display: block;
        width: 100%;
    }

    #tab-structures .yd-list-structures {
        border: 0;
        background: transparent;
        min-width: 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        table-layout: fixed;
    }

    #tab-structures .yd-list-structures tr {
        position: relative;
        border: 1px solid var(--border);
        border-radius: 12px;
        background: var(--surface);
        margin-bottom: 10px;
        padding: 8px;
        box-shadow: var(--shadow-sm);
        overflow: visible;
    }

    #tab-structures .yd-list-structures td {
        border-bottom: 0;
        padding: 6px 4px;
        font-size: 13px;
        line-height: 1.45;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    #tab-structures .yd-list-structures td::before {
        content: attr(data-label) ": ";
        color: var(--text-soft);
        font-weight: 800;
        font-size: 12px;
    }

    #tab-structures .yd-list-structures td:last-child {
        position: absolute;
        top: 8px;
        right: 8px;
        width: auto;
        padding: 0;
    }

    #tab-structures .yd-list-structures td:last-child::before {
        display: none;
    }

    #tab-structures .yd-list-structures td:nth-child(7) {
        padding-right: 62px;
    }

    #tab-structures .yd-list-structures td:last-child .yd-kebab-btn,
    #tab-structures .yd-list-structures td:last-child .yd-action-btn {
        min-width: 40px;
        min-height: 40px;
    }
}

@media (max-width: 768px) {
    #tab-structures .yd-structures-table-wrap {
        padding-bottom: 84px;
    }

    #tab-structures .yd-list-structures tr {
        margin-bottom: 9px;
        padding: 7px;
    }

    #tab-structures .yd-list-structures td {
        font-size: 13px;
        padding: 6px 3px;
    }
}

@media (max-width: 480px) {
    #tab-structures .yd-structures-table-wrap {
        padding-bottom: 96px;
    }

    #tab-structures .yd-list-structures td:nth-child(7) {
        padding-right: 58px;
    }
}

.yd-button.yd-close-icon-only {
    min-width: 40px;
    width: 40px;
    padding: 8px;
    justify-content: center;
    margin-left: auto;
    align-self: flex-end;
}

.yd-close-x-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
}

.yd-close-x-icon svg {
    width: 16px;
    height: 16px;
}

#structure-info-modal .yd-modal-head.yd-structure-info-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
}

#structure-info-modal .yd-modal-head.yd-structure-info-head > b {
    max-width: none;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#structure-info-modal .yd-structure-info-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

#structure-info-modal .yd-structure-info-head-actions .yd-button {
    width: auto;
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .yd-modal-head .yd-button.yd-close-icon-only {
        width: 40px !important;
        min-width: 40px !important;
        margin-left: auto !important;
        align-self: flex-end !important;
    }

    #structure-info-modal .yd-modal-head.yd-structure-info-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
    }

    #structure-info-modal .yd-modal-head.yd-structure-info-head > b {
        font-size: 15px;
    }

    #structure-info-modal .yd-structure-info-head-actions {
        gap: 6px;
    }

    #structure-info-modal .yd-structure-info-head-actions .yd-button {
        width: auto !important;
        min-height: 40px;
        padding: 8px 10px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .yd-modal-head .yd-button.yd-close-icon-only {
        width: 40px !important;
        min-width: 40px !important;
        margin-left: auto !important;
        align-self: flex-end !important;
    }

    #structure-info-modal .yd-modal-head.yd-structure-info-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 6px;
    }

    #structure-info-modal .yd-modal-head.yd-structure-info-head > b {
        font-size: 15px;
    }

    #structure-info-modal .yd-structure-info-head-actions .yd-button {
        width: auto !important;
        min-height: 40px;
        padding: 8px 9px;
        font-size: 12px;
    }

    #structure-info-modal .yd-structure-info-head-actions .yd-action-icon {
        width: 14px;
        height: 14px;
        margin-right: 4px;
    }
}

.yd-storage-management-sheet {
    width: min(980px, 100%);
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.yd-storage-management-head {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 8px;
    background: var(--surface);
    padding-top: 8px;
    padding-bottom: 8px;
}

.yd-storage-management-head > b {
    display: block;
    min-width: 0;
    font-size: 18px;
    line-height: 1.25;
    max-width: none;
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
}

.yd-storage-management-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 0;
}

.yd-storage-management-head-actions .yd-button {
    min-height: 40px;
    width: auto;
    min-width: 40px;
}

.yd-storage-management-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.yd-storage-management-foot {
    padding-left: 0;
    padding-right: 0;
    border-top: 0;
}

.yd-storage-quota-card {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px 10px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(16, 185, 129, 0.12));
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    margin-bottom: 6px;
}

.yd-storage-quota-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.yd-storage-quota-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.yd-storage-quota-icon {
    width: 32px;
    height: 32px;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(2, 132, 199, 0.14);
    color: #0369a1;
    font-size: 16px;
}

.yd-storage-quota-title {
    font-size: 15px;
    font-weight: 700;
}

.yd-storage-quota-period {
    font-size: 13px;
    color: var(--text-soft);
    margin-top: 2px;
}

.yd-storage-quota-main {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.yd-storage-quota-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    margin-top: 0;
}

.yd-storage-quota-usage {
    font-size: 13px;
    font-weight: 700;
    color: #0f4c81;
    border: 1px solid rgba(2, 132, 199, 0.22);
    background: rgba(2, 132, 199, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
    min-height: 28px;
    display: inline-flex;
    align-items: center;
}

.yd-storage-quota-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 6px;
    font-size: 13px;
}

.yd-storage-breakdown {
    margin-top: 6px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

.yd-storage-breakdown-item {
    border: 1px solid rgba(100, 116, 139, 0.24);
    background: rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    padding: 6px 8px;
    min-height: 40px;
    display: grid;
    align-content: center;
    gap: 2px;
}

.yd-storage-breakdown-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-soft);
}

.yd-storage-breakdown-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.yd-storage-breakdown-icon svg {
    width: 12px;
    height: 12px;
    display: block;
}

.yd-storage-breakdown-icon.pdf {
    background: rgba(220, 38, 38, 0.16);
}

.yd-storage-breakdown-icon.cad {
    background: rgba(14, 116, 144, 0.16);
}

.yd-storage-breakdown-icon.photo {
    background: rgba(168, 85, 247, 0.16);
}

.yd-storage-breakdown-value {
    font-size: 13px;
    line-height: 1.3;
    color: var(--text);
    overflow-wrap: anywhere;
}

.yd-storage-tree {
    display: grid;
    gap: 10px;
    overflow-x: hidden;
}

.yd-storage-structure {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.08), rgba(16, 185, 129, 0.08));
}

.yd-storage-structure-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.yd-storage-folder-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.yd-storage-caret {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.08);
    color: #0f172a;
    font-size: 12px;
    flex: 0 0 auto;
}

.yd-storage-folder-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.yd-storage-folder-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: rgba(14, 116, 144, 0.16);
    font-size: 15px;
    flex: 0 0 auto;
}

.yd-storage-folder-title {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.yd-storage-folder-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yd-storage-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 700;
    border: 1px solid transparent;
    white-space: nowrap;
}

.yd-storage-count-badge.projects {
    background: rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.35);
    color: #1d4ed8;
}

.yd-storage-count-badge.photos {
    background: rgba(217, 70, 239, 0.14);
    border-color: rgba(192, 38, 211, 0.35);
    color: #a21caf;
}

.yd-storage-structure-head span {
    font-size: 13px;
}

.yd-storage-group {
    border: 1px dashed var(--border);
    border-radius: 12px;
    padding: 10px;
    margin-top: 8px;
    background: rgba(255, 255, 255, 0.56);
}

.yd-storage-group-projects {
    border-color: rgba(37, 99, 235, 0.35);
}

.yd-storage-group-photos {
    border-color: rgba(192, 38, 211, 0.35);
}

.yd-storage-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
}

.yd-storage-group-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
    cursor: pointer;
}

.yd-storage-folder-content.is-collapsed,
.yd-storage-group-body.is-collapsed {
    display: none;
}

.yd-storage-group-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.08);
    font-size: 14px;
    flex: 0 0 auto;
}

.yd-storage-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px;
    margin-bottom: 6px;
}

.yd-storage-item-main {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.yd-storage-item-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.yd-storage-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 700;
}

.yd-storage-type-badge.is-pdf {
    background: rgba(220, 38, 38, 0.14);
    border-color: rgba(220, 38, 38, 0.32);
    color: #b91c1c;
}

.yd-storage-type-badge.is-dwg {
    background: rgba(14, 116, 144, 0.14);
    border-color: rgba(14, 116, 144, 0.32);
    color: #0e7490;
}

.yd-storage-type-badge.is-dxf {
    background: rgba(22, 163, 74, 0.15);
    border-color: rgba(22, 163, 74, 0.32);
    color: #166534;
}

.yd-storage-type-badge.is-generic {
    background: rgba(100, 116, 139, 0.16);
    border-color: rgba(100, 116, 139, 0.32);
    color: #334155;
}

.yd-storage-type-badge.is-photo {
    background: rgba(217, 70, 239, 0.14);
    border-color: rgba(192, 38, 211, 0.35);
    color: #a21caf;
}

.yd-storage-item-main b {
    font-size: 14px;
    overflow-wrap: anywhere;
}

.yd-storage-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.yd-storage-meta-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 2px 9px;
    font-size: 13px;
    border: 1px solid rgba(100, 116, 139, 0.3);
    background: rgba(100, 116, 139, 0.11);
    color: #334155;
}

.yd-storage-meta-chip.is-photo {
    border-color: rgba(192, 38, 211, 0.35);
    background: rgba(217, 70, 239, 0.12);
    color: #86198f;
}

.yd-storage-item-main span {
    font-size: 13px;
}

.yd-storage-item-actions {
    flex: 0 0 auto;
}

.yd-storage-item-actions .yd-button {
    min-height: 40px;
}

[data-theme="dark"] .yd-storage-management-sheet {
    background: linear-gradient(160deg, rgba(9, 24, 49, 0.97), rgba(11, 32, 62, 0.98));
    border-color: rgba(56, 189, 248, 0.34);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.46);
}

[data-theme="dark"] .yd-storage-management-head {
    background: transparent;
    border-bottom-color: rgba(56, 189, 248, 0.34);
}

[data-theme="dark"] .yd-storage-management-head > b,
[data-theme="dark"] .yd-storage-folder-title,
[data-theme="dark"] .yd-storage-item-main b,
[data-theme="dark"] .yd-storage-item-main span,
[data-theme="dark"] .yd-storage-group-title {
    color: #e6f1ff;
}

[data-theme="dark"] .yd-storage-quota-card {
    border-color: rgba(56, 189, 248, 0.3);
    background: linear-gradient(135deg, rgba(10, 52, 84, 0.84), rgba(8, 86, 92, 0.54));
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .yd-storage-quota-period,
[data-theme="dark"] .yd-storage-quota-meta {
    color: #b7cce4;
}

[data-theme="dark"] .yd-storage-quota-usage {
    color: #a7e8ff;
    border-color: rgba(56, 189, 248, 0.36);
    background: rgba(56, 189, 248, 0.12);
}

[data-theme="dark"] .yd-storage-breakdown-item {
    border-color: rgba(148, 163, 184, 0.32);
    background: rgba(15, 29, 52, 0.64);
}

[data-theme="dark"] .yd-storage-breakdown-label {
    color: #c3d7ee;
}

[data-theme="dark"] .yd-storage-breakdown-value {
    color: #eef6ff;
}

[data-theme="dark"] .yd-storage-structure {
    border-color: rgba(96, 165, 250, 0.34);
    background: linear-gradient(145deg, rgba(32, 66, 116, 0.38), rgba(17, 104, 104, 0.28));
}

[data-theme="dark"] .yd-storage-caret,
[data-theme="dark"] .yd-storage-group-icon {
    background: rgba(148, 163, 184, 0.2);
    color: #dbeafe;
}

[data-theme="dark"] .yd-storage-folder-icon {
    background: rgba(56, 189, 248, 0.22);
}

[data-theme="dark"] .yd-storage-count-badge.projects {
    background: rgba(59, 130, 246, 0.28);
    border-color: rgba(96, 165, 250, 0.5);
    color: #dbeafe;
}

[data-theme="dark"] .yd-storage-count-badge.photos {
    background: rgba(192, 38, 211, 0.28);
    border-color: rgba(216, 103, 255, 0.45);
    color: #fae8ff;
}

[data-theme="dark"] .yd-storage-group {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(8, 22, 42, 0.56);
}

[data-theme="dark"] .yd-storage-group-projects {
    border-color: rgba(96, 165, 250, 0.44);
}

[data-theme="dark"] .yd-storage-group-photos {
    border-color: rgba(216, 103, 255, 0.42);
}

[data-theme="dark"] .yd-storage-item {
    border-color: rgba(148, 163, 184, 0.34);
    background: rgba(8, 22, 42, 0.48);
}

[data-theme="dark"] .yd-storage-type-badge.is-pdf {
    background: rgba(220, 38, 38, 0.26);
    border-color: rgba(248, 113, 113, 0.48);
    color: #fee2e2;
}

[data-theme="dark"] .yd-storage-type-badge.is-dwg {
    background: rgba(6, 182, 212, 0.24);
    border-color: rgba(34, 211, 238, 0.46);
    color: #cffafe;
}

[data-theme="dark"] .yd-storage-type-badge.is-dxf {
    background: rgba(34, 197, 94, 0.24);
    border-color: rgba(74, 222, 128, 0.44);
    color: #dcfce7;
}

[data-theme="dark"] .yd-storage-type-badge.is-generic {
    background: rgba(148, 163, 184, 0.24);
    border-color: rgba(203, 213, 225, 0.42);
    color: #e2e8f0;
}

[data-theme="dark"] .yd-storage-type-badge.is-photo {
    background: rgba(192, 38, 211, 0.24);
    border-color: rgba(216, 103, 255, 0.44);
    color: #fae8ff;
}

[data-theme="dark"] .yd-storage-meta-chip {
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(148, 163, 184, 0.18);
    color: #dbeafe;
}

[data-theme="dark"] .yd-storage-meta-chip.is-photo {
    border-color: rgba(216, 103, 255, 0.42);
    background: rgba(192, 38, 211, 0.2);
    color: #fae8ff;
}

.yd-photo-modal-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.yd-photo-modal-head-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.yd-photo-modal-head .yd-button {
    width: auto;
}

.yd-photo-nav-btn {
    min-width: 40px;
    width: 40px;
    min-height: 40px;
    padding: 8px;
    justify-content: center;
}

.yd-photo-nav-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
}

.yd-photo-nav-icon svg {
    width: 16px;
    height: 16px;
}

@media (max-width: 768px) {
    #storage-management-modal .yd-modal-sheet {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
    }

    .yd-storage-management-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .yd-storage-management-head > b {
        min-width: 0;
        font-size: 16px;
        line-height: 1.3;
        white-space: normal;
        overflow: visible;
    }

    .yd-storage-management-head-actions {
        margin-left: 0;
        flex: 0 0 auto;
    }

    .yd-storage-management-head-actions .yd-button {
        min-height: 40px;
        padding: 8px 10px;
        width: auto;
    }

    .yd-storage-quota-title {
        font-size: 15px;
    }

    .yd-storage-quota-value {
        font-size: 26px;
    }

    .yd-storage-quota-head {
        align-items: flex-start;
    }

    .yd-storage-quota-meta,
    .yd-storage-structure-head span,
    .yd-storage-item-main span {
        font-size: 13px;
    }

    .yd-storage-quota-usage {
        min-height: 28px;
        font-size: 13px;
    }

    .yd-storage-breakdown {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
    }

    .yd-storage-breakdown-item {
        min-height: 38px;
        padding: 4px 6px;
    }

    .yd-storage-breakdown-label {
        font-size: 12px;
    }

    .yd-storage-breakdown-value {
        font-size: 12px;
        line-height: 1.25;
    }

    .yd-storage-item {
        flex-direction: column;
        align-items: stretch;
    }

    .yd-storage-folder-badges {
        width: 100%;
    }

    .yd-storage-count-badge {
        min-height: 24px;
    }

    .yd-storage-item-actions .yd-button {
        min-height: 40px;
        width: 100%;
    }

    [data-theme="dark"] .yd-storage-management-head > b,
    [data-theme="dark"] .yd-storage-folder-title,
    [data-theme="dark"] .yd-storage-item-main b {
        color: #eef6ff;
    }

    [data-theme="dark"] .yd-storage-quota-usage {
        color: #b8eeff;
    }

    #archive-photo-modal .yd-modal-sheet {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        max-height: calc(100dvh - 16px);
    }

    .yd-photo-modal-head .yd-button {
        min-height: 40px;
        width: auto;
    }
    .yd-photo-question-toggle {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-photo-question-collapse {
        font-size: 13px;
    }
    .yd-user-item-icon {
        width: 20px;
        min-width: 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    #storage-management-modal {
        align-items: flex-end;
        padding: 8px;
    }

    #storage-management-modal .yd-modal-sheet {
        width: 100%;
        max-width: 100%;
        height: calc(100dvh - 8px);
        max-height: calc(100dvh - 8px);
        border-radius: 14px 14px 0 0;
    }

    .yd-storage-management-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
    }

    .yd-storage-management-head > b {
        font-size: 15px;
        line-height: 1.3;
        margin-right: auto;
    }

    .yd-storage-management-head-actions {
        gap: 6px;
    }

    .yd-storage-management-head-actions .yd-button {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 9px;
        width: auto;
    }

    .yd-storage-quota-value {
        font-size: 21px;
    }

    .yd-storage-structure-head b {
        font-size: 15px;
    }

    .yd-storage-quota-title,
    .yd-storage-quota-period {
        font-size: 13px;
    }

    .yd-storage-quota-head {
        gap: 8px;
    }

    .yd-storage-group-title {
        font-size: 15px;
    }

    .yd-storage-item-main b {
        font-size: 13px;
    }

    .yd-storage-item-main b,
    .yd-storage-item-main span,
    .yd-storage-meta-chip {
        font-size: 13px;
    }

    .yd-storage-quota-usage {
        width: 100%;
        justify-content: flex-start;
        font-size: 13px;
        min-height: 30px;
    }

    .yd-storage-quota-meta .yd-storage-meta-chip:nth-child(2) {
        display: none;
    }

    .yd-storage-breakdown-item {
        min-height: 36px;
        padding: 4px 6px;
    }

    .yd-storage-breakdown-label {
        font-size: 12px;
    }

    .yd-storage-breakdown-value {
        font-size: 12px;
        line-height: 1.25;
    }

    [data-theme="dark"] .yd-storage-management-head > b,
    [data-theme="dark"] .yd-storage-folder-title,
    [data-theme="dark"] .yd-storage-item-main b {
        color: #f1f7ff;
    }

    [data-theme="dark"] .yd-storage-quota-usage,
    [data-theme="dark"] .yd-storage-count-badge.projects,
    [data-theme="dark"] .yd-storage-count-badge.photos {
        color: #f8fbff;
    }

    .yd-photo-modal-head {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .yd-photo-modal-head > b {
        font-size: 15px;
    }

    .yd-photo-modal-head-actions {
        gap: 6px;
    }

    .yd-photo-modal-head .yd-button {
        width: auto !important;
        min-height: 40px;
    }
    .yd-photo-question-toggle {
        min-height: 40px;
        font-size: 13px;
    }
    .yd-photo-question-collapse {
        font-size: 13px;
        line-height: 1.4;
    }
    .yd-user-item-icon {
        width: 18px;
        min-width: 18px;
        font-size: 13px;
    }

    .yd-photo-nav-btn {
        width: 40px;
        min-width: 40px;
    }

    #archive-photo-modal {
        align-items: flex-end;
        justify-content: center;
        padding: 8px;
    }

    #archive-photo-modal .yd-modal-sheet {
        width: 100%;
        max-width: 100%;
        max-height: calc(100dvh - 8px);
        border-radius: 14px 14px 0 0;
    }

    #archive-photo-modal .yd-modal-body {
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.yd-profile-security-block {
    margin-top: 28px;
    padding-top: 22px;
    border-top: 1px solid var(--yd-border, rgba(0, 0, 0, 0.08));
}

.yd-profile-security-block h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
}

.yd-2fa-qr-wrap {
    display: flex;
    justify-content: center;
    margin: 12px 0 16px;
}

.yd-2fa-qr {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 1px solid var(--yd-border, rgba(0, 0, 0, 0.08));
    background: #fff;
}

.yd-devices-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.yd-device-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--yd-border, rgba(0, 0, 0, 0.08));
    border-radius: 12px;
    background: var(--yd-surface-muted, rgba(0, 0, 0, 0.02));
}

.yd-device-item.is-current {
    border-color: rgba(102, 126, 234, 0.45);
    background: rgba(102, 126, 234, 0.06);
}

.yd-device-meta {
    min-width: 0;
}

.yd-device-meta b {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.yd-device-meta span {
    display: block;
    color: var(--yd-text-muted, #667);
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.yd-device-actions .yd-button {
    min-height: 40px;
}

.yd-forgot-password-card {
    max-width: 560px;
    margin: 0 auto;
}

.yd-forgot-step {
    display: none;
}

.yd-forgot-step.is-active {
    display: block;
}

.yd-forgot-links {
    margin-top: 16px;
    font-size: 14px;
}

.yd-forgot-links a {
    color: var(--yd-accent, #667eea);
    font-weight: 600;
    text-decoration: none;
}

@media (max-width: 768px) {
    .yd-profile-security-block h3 {
        font-size: 15px;
    }

    .yd-device-item {
        flex-direction: column;
    }

    .yd-device-actions {
        width: 100%;
    }

    .yd-device-actions .yd-button {
        width: 100%;
    }

    .yd-2fa-qr {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 480px) {
    .yd-profile-security-block {
        margin-top: 22px;
        padding-top: 18px;
    }

    .yd-device-meta b,
    .yd-device-meta span {
        font-size: 13px;
    }
}

.yd-mobile-back-toast {
    position: fixed;
    left: 50%;
    bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(12px);
    z-index: 10000020;
    max-width: min(92vw, 360px);
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(20, 24, 36, 0.94);
    color: #fff;
    font-size: 14px;
    line-height: 1.45;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.yd-mobile-back-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

#mobile-exit-modal .yd-modal-foot .yd-button {
    min-height: 44px;
}

@media (max-width: 768px) {
    #mobile-exit-modal .yd-modal-sheet {
        width: calc(100% - 24px);
        max-width: 420px;
        margin: 0 auto;
    }

    #mobile-exit-modal .yd-modal-foot {
        flex-direction: column-reverse;
        gap: 10px;
    }

    #mobile-exit-modal .yd-modal-foot .yd-button {
        width: 100%;
    }

    .yd-mobile-back-toast {
        bottom: calc(96px + env(safe-area-inset-bottom, 0px));
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .yd-mobile-back-toast {
        bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        padding: 11px 14px;
    }
}

/* --- Extended features: offline, presence, KPI, findings --- */
.yd-offline-banner {
    background: #fef3c7;
    color: #92400e;
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid #fcd34d;
    text-align: center;
}
.yd-presence-widget { margin-bottom: 16px; }
.yd-presence-widget-body { display: flex; flex-direction: column; gap: 8px; }
.yd-presence-row {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    padding: 10px 12px; border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
    font-size: 14px;
}
.yd-presence-row strong { min-width: 120px; }
.yd-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.yd-kpi-card {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.yd-kpi-label { font-size: 13px; color: var(--muted, #6b7280); }
.yd-kpi-card strong { font-size: 22px; }
.yd-kpi-insp-row {
    display: flex; justify-content: space-between; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--border, #e5e7eb);
    font-size: 14px;
}
.yd-structure-actions-row {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin: 12px 0;
}
.yd-findings-panel {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
}
.yd-findings-panel h3 { margin: 0 0 10px; font-size: 15px; }
.yd-finding-row {
    padding: 10px 0;
    border-bottom: 1px solid var(--border, #e5e7eb);
}
.yd-finding-q { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.yd-finding-meta { font-size: 13px; color: var(--muted, #6b7280); margin-bottom: 8px; }
.yd-finding-recheck {
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 13px;
}
.yd-compare-toolbar {
    display: flex; flex-wrap: wrap; gap: 12px;
    margin-bottom: 12px; padding: 10px;
    border: 1px solid var(--border, #e5e7eb); border-radius: 10px;
}
.yd-compare-diff-body { margin-top: 12px; overflow-x: auto; }
.yd-compare-diff { background: #fef9c3; }
.yd-muted { color: var(--muted, #6b7280); font-size: 13px; }

@media (max-width: 768px) {
    .yd-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .yd-structure-actions-row .yd-button { min-height: 44px; flex: 1 1 calc(50% - 8px); }
    .yd-finding-recheck .yd-button { min-height: 40px; }
    .yd-compare-toolbar { flex-direction: column; }
    .yd-compare-toolbar .yd-select { width: 100%; min-height: 40px; }
}
@media (max-width: 480px) {
    .yd-kpi-grid { grid-template-columns: 1fr; }
    .yd-structure-actions-row .yd-button { flex: 1 1 100%; }
}
