/* DCC — File Directory (Majnoon-style workspace) */
body.app-dcc-dir {
    overflow: hidden;
}

body.app-dcc-dir .app-main {
    min-height: 0;
    height: 100dvh;
    max-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

body.app-dcc-dir .main-content--dcc {
    flex: 1;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.dcc-dir {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    background: #f0f2f5;
    font-size: 13px;
    color: #1f2937;
}

/* Top bar */
.dcc-dir__top {
    flex-shrink: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 16px;
}
.dcc-dir__crumb {
    padding: 10px 0 6px;
    font-size: 13px;
    color: #8c8c8c;
}
.dcc-dir__crumb strong { color: #262626; font-weight: 600; }
.dcc-dir__tabs {
    display: flex;
    align-items: center;
    gap: 0;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-dir__aside-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: 0 12px 0 2px;
    padding: 3px;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.dcc-dir__aside-toggle:hover {
    border-color: #1677ff;
    box-shadow: 0 2px 8px rgba(22, 119, 255, 0.15);
}
.dcc-dir__aside-toggle.is-active {
    border-color: #1677ff;
    background: #e6f4ff;
}
.dcc-dir__aside-toggle img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}
.dcc-dir__tab {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #595959;
    border: none;
    background: transparent;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
}
.dcc-dir__tab.is-active {
    color: #1677ff;
    border-bottom-color: #1677ff;
}
.dcc-dir__tab--link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
}
.dcc-dir__tab--link:hover { color: #1677ff; }
.dcc-dir__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 8px 0 10px;
    font-size: 12px;
    color: #8c8c8c;
}
.dcc-dir__toolbar-user {
    font-weight: 600;
    color: #262626;
}

/* Body split */
.dcc-dir__body {
    flex: 1;
    min-height: 0;
    display: flex;
    overflow: hidden;
}
.dcc-dir__body--aside-hidden .dcc-dir__aside {
    display: none;
}
.dcc-dir__body--reports-mode .dcc-dir__aside {
    display: none;
}
.dcc-dir__body--reports-mode .dcc-dir__main {
    width: 100%;
    max-width: none;
}

/* Left folder panel */
.dcc-dir__aside {
    width: 268px;
    min-width: 268px;
    background: #fff;
    border-right: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dcc-dir__aside-head {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-dir__aside-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}
.dcc-dir__aside-actions .dcc-dir__btn--primary {
    flex: 1;
    min-width: 0;
}
.dcc-dir__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #262626;
    cursor: pointer;
}
.dcc-dir__btn:hover { border-color: #1677ff; color: #1677ff; }
.dcc-dir__btn--primary {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.dcc-dir__btn--primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.dcc-dir__btn--block { width: 100%; }
.dcc-dir__link {
    font-size: 12px;
    color: #1677ff;
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}
.dcc-dir__fav-title {
    font-size: 12px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 6px;
}
.dcc-dir__fav-meta { font-size: 11px; color: #8c8c8c; margin-bottom: 8px; }
.dcc-dir__folder-search {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 8px;
}
.dcc-dir__folder-pills {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}
.dcc-dir__folder-pills button {
    padding: 2px 8px;
    font-size: 11px;
    border-radius: 4px;
    border: 1px solid #d9d9d9;
    background: #fafafa;
    cursor: pointer;
}
.dcc-dir__folder-pills button.is-active {
    background: #e6f4ff;
    border-color: #91caff;
    color: #1677ff;
}
.dcc-dir__tree {
    flex: 1;
    overflow: auto;
    padding: 4px 8px 12px;
}
.dcc-dir__folder {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #262626;
}
.dcc-dir__folder:hover { background: #f5f5f5; }
.dcc-dir__folder.is-active { background: #e6f4ff; color: #1677ff; }
.dcc-dir__folder i { color: #faad14; font-size: 14px; flex-shrink: 0; }
.dcc-dir__folder span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcc-dir__tag {
    font-size: 10px;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
    flex-shrink: 0;
}

/* Main panel */
.dcc-dir__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 12px 14px;
}
.dcc-dir__filters-row {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}
.dcc-dir__status-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.dcc-dir__status-pills button {
    padding: 5px 14px;
    border-radius: 6px;
    border: 1px solid #d9d9d9;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
    color: #595959;
    cursor: pointer;
}
.dcc-dir__status-pills button.is-active {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.dcc-dir__stats {
    font-size: 12px;
    color: #595959;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dcc-dir__stats b { color: #1677ff; }
.dcc-dir__query {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.dcc-dir__query label {
    font-size: 11px;
    color: #8c8c8c;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.dcc-dir__query input {
    padding: 5px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    min-width: 140px;
}
.dcc-dir__table-wrap {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
}
.dcc-dir__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 960px;
}
.dcc-dir__table th,
.dcc-dir__table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
}
.dcc-dir__table th {
    background: #fafafa;
    font-weight: 700;
    color: #595959;
    position: sticky;
    top: 0;
    z-index: 1;
    white-space: nowrap;
}
.dcc-dir__table tbody tr:not(.dcc-dir__report-group) { cursor: pointer; }
.dcc-dir__table tbody tr:not(.dcc-dir__report-group):hover td { background: #fafafa; }
.dcc-dir__table .col-check { width: 36px; text-align: center; }
.dcc-dir__table .col-no { width: 48px; text-align: center; color: #8c8c8c; }
.dcc-dir__docno { font-family: ui-monospace, monospace; color: #1677ff; font-weight: 600; }
.dcc-dir__pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid transparent;
}
.dcc-dir__pill--review { background: #e6f4ff; color: #1677ff; border-color: #91caff; }
.dcc-dir__pill--approved { background: #f6ffed; color: #52c41a; border-color: #b7eb8f; }
.dcc-dir__pill--draft { background: #fafafa; color: #8c8c8c; border-color: #d9d9d9; }
.dcc-dir__pill--rejected { background: #fff2f0; color: #ff4d4f; border-color: #ffccc7; }
.dcc-dir__pill--issued { background: #f9f0ff; color: #722ed1; border-color: #d3adf7; }
.dcc-dir__table .col-approval-date { min-width: 120px; }
.dcc-dir__approval-cell {
    width: 100%;
}
.dcc-dir__approval-readonly {
    font-size: 12px;
    color: #595959;
    padding: 4px 2px;
    white-space: nowrap;
    user-select: text;
}
.dcc-dir__inline-input {
    width: 100%;
    min-width: 0;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    box-sizing: border-box;
}
.dcc-dir__inline-input:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12);
}
.dcc-dir__inline-input.is-saving {
    border-color: #91caff;
    background: #f0f7ff;
}
.dcc-dir__inline-input.is-saved {
    border-color: #52c41a;
    background: #f6ffed;
}
.dcc-dir__table .col-approval-date { min-width: 140px; }
.dcc-dir__table .col-file { width: 72px; text-align: center; }
.dcc-dir__table .col-actions { width: 88px; text-align: center; }

/* File view (eye) in table */
.dcc-file-view {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    background: #1677ff;
    color: #fff;
    font-size: 15px;
    cursor: pointer;
    vertical-align: middle;
    transition: background 0.15s ease, transform 0.15s ease;
}
.dcc-file-view:hover {
    background: #4096ff;
    transform: scale(1.06);
}
.dcc-file-view:active { transform: scale(0.98); }
.dcc-file-view--empty {
    background: #f5f5f5;
    color: #bfbfbf;
    cursor: default;
    pointer-events: none;
}

/* Legacy file badge (drawer / recycle) */
.dcc-file-badge {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: none;
    cursor: default;
    vertical-align: middle;
}
.dcc-file-badge--empty {
    background: linear-gradient(145deg, #f5f5f5, #ebebeb);
    color: #bfbfbf;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}
.dcc-file-badge--has {
    cursor: pointer;
    color: #fff;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 4px 14px rgba(0,0,0,0.12);
}
.dcc-file-badge--has:hover {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 8px 22px rgba(0,0,0,0.18);
}
.dcc-file-badge--has:active { transform: translateY(0) scale(0.98); }
.dcc-file-badge__glow {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.9), transparent 55%);
    pointer-events: none;
}
.dcc-file-badge__icon {
    position: relative;
    font-size: 20px;
    line-height: 1;
    z-index: 1;
}
.dcc-file-badge__ext {
    position: relative;
    margin-top: 2px;
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.04em;
    opacity: 0.92;
    z-index: 1;
}
.dcc-file-badge--pdf { background: linear-gradient(145deg, #ff6b6b, #ee5a24); }
.dcc-file-badge--word { background: linear-gradient(145deg, #4dabf7, #228be6); }
.dcc-file-badge--excel { background: linear-gradient(145deg, #51cf66, #2f9e44); }
.dcc-file-badge--image { background: linear-gradient(145deg, #cc5de8, #9c36b5); }
.dcc-file-badge--default { background: linear-gradient(145deg, #748ffc, #5c7cfa); }

/* Row action buttons */
.dcc-row-actions {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.dcc-row-actions__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    background: #fff;
    color: #8c8c8c;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}
.dcc-row-actions__btn:hover {
    color: #1677ff;
    border-color: #91caff;
    background: #f0f5ff;
}
.dcc-row-actions__btn--danger:hover {
    color: #ff4d4f;
    border-color: #ffccc7;
    background: #fff2f0;
}
.dcc-dir__empty {
    padding: 40px;
    text-align: center;
    color: #8c8c8c;
}
.dcc-dir__foot {
    flex-shrink: 0;
    padding: 8px 4px 0;
    font-size: 11px;
    color: #8c8c8c;
}

/* Hide inactive main panels (flex display was overriding [hidden]) */
#dccDirDirectoryView[hidden],
#dccDirReportsView[hidden],
.dcc-dir__reports[hidden] {
    display: none !important;
}

/* Reports panel */
.dcc-dir__reports {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dcc-dir__reports-head {
    padding: 12px 4px 8px;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-dir__reports-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: #262626;
    display: flex;
    align-items: center;
    gap: 8px;
}
.dcc-dir__reports-title i { color: #1677ff; }
.dcc-dir__reports-desc {
    margin: 4px 0 0;
    font-size: 12px;
    color: #8c8c8c;
}
.dcc-dir__reports-tabs {
    display: flex;
    gap: 4px;
    padding: 10px 4px;
    border-bottom: 1px solid #f0f0f0;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.dcc-dir__reports-tab {
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    background: #fff;
    color: #595959;
    cursor: pointer;
}
.dcc-dir__reports-tab.is-active {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.dcc-dir__reports-tab.is-active:hover,
.dcc-dir__reports-tab.is-active:active,
.dcc-dir__reports-tab.is-active:focus,
.dcc-dir__reports-tab.is-active:focus-visible {
    background: #0958d9;
    border-color: #0958d9;
    color: #fff;
    outline: none;
}
.dcc-dir__reports-tab:active {
    background: #e6f4ff;
    border-color: #91caff;
    color: #0958d9;
}
.dcc-dir__reports-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 4px;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-dir__reports-filters label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #8c8c8c;
}
.dcc-dir__reports-filters input,
.dcc-dir__reports-filters select {
    min-width: 140px;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
}
.dcc-dir__report-table { font-size: 12px; }
.dcc-dir__report-table thead th {
    white-space: nowrap;
    background: #d9d9d9;
    color: #262626;
    font-weight: 700;
    border-bottom: 1px solid #bfbfbf;
}
.dcc-dir__report-group td {
    background: #1f3a5f;
    color: #fff;
    font-weight: 700;
    text-align: center;
    padding: 10px 12px;
    letter-spacing: 0.02em;
    border-top: 2px solid #16325c;
    cursor: default;
    user-select: none;
}
.dcc-dir__report-group:hover td,
.dcc-dir__report-group:active td,
.dcc-dir__report-group:focus td,
.dcc-dir__report-group:focus-within td {
    background: #1f3a5f !important;
    color: #fff !important;
}
.dcc-dir__report-table tbody tr.dcc-dir__report-group:hover td {
    background: #1f3a5f !important;
    color: #fff !important;
}
.dcc-dir__report-row {
    cursor: pointer;
}
.dcc-dir__report-row:hover td {
    background: #e6f4ff !important;
}
.dcc-dir__report-row:focus {
    outline: none;
}
.dcc-dir__report-row:focus td {
    box-shadow: inset 0 0 0 2px #1677ff;
}
.dcc-dir__reports-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 4px;
    border-top: 1px solid #f0f0f0;
}
.dcc-dir__reports-page {
    font-size: 12px;
    color: #595959;
    font-weight: 600;
}
#dccDirDirectoryView {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 900px) {
    .dcc-dir__body { flex-direction: column; }
    .dcc-dir__aside {
        width: 100%;
        min-width: 0;
        max-height: 200px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
}

/* Document Register panel (add / advanced search) */
.dcc-reg-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 16px;
    overflow: auto;
}
.dcc-reg-overlay[hidden] { display: none !important; }

.dcc-reg {
    width: min(1180px, 100%);
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    font-size: 13px;
    color: #262626;
    max-height: calc(100dvh - 48px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dcc-reg__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px 10px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.dcc-reg__head-left { min-width: 0; flex: 1; }
.dcc-reg__title {
    margin: 0 0 8px;
    font-size: 15px;
    font-weight: 700;
    color: #262626;
}
.dcc-reg__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-reg__tab {
    padding: 8px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #595959;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    margin-bottom: -1px;
}
.dcc-reg__tab.is-active {
    color: #1677ff;
    border-bottom-color: #1677ff;
}
.dcc-reg__close {
    border: none;
    background: transparent;
    color: #8c8c8c;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    flex-shrink: 0;
}
.dcc-reg__close:hover { background: #f5f5f5; color: #262626; }

.dcc-reg__panel {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 14px 18px 18px;
}
.dcc-reg__panel[hidden] { display: none !important; }

.dcc-reg__search-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.dcc-reg__global-search {
    flex: 1;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 0 10px;
    background: #fff;
}
.dcc-reg__global-search i { color: #bfbfbf; font-size: 13px; }
.dcc-reg__global-search input {
    flex: 1;
    border: none;
    outline: none;
    padding: 8px 0;
    font-size: 13px;
    min-width: 0;
}
.dcc-reg__search-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.dcc-reg__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #d9d9d9;
    background: #fff;
    color: #262626;
    cursor: pointer;
}
.dcc-reg__btn:hover { border-color: #1677ff; color: #1677ff; }
.dcc-reg__btn--dark {
    background: #262626;
    border-color: #262626;
    color: #fff;
}
.dcc-reg__btn--dark:hover { background: #434343; border-color: #434343; color: #fff; }
.dcc-reg__btn--primary {
    background: #1677ff;
    border-color: #1677ff;
    color: #fff;
}
.dcc-reg__btn--primary:hover { background: #4096ff; border-color: #4096ff; color: #fff; }
.dcc-reg__btn--danger {
    color: #ff4d4f;
    border-color: #ffccc7;
    background: #fff;
}
.dcc-reg__btn--danger:hover {
    color: #fff;
    background: #ff4d4f;
    border-color: #ff4d4f;
}
.dcc-reg__linkish {
    border: none;
    background: transparent;
    color: #1677ff;
    padding: 7px 8px;
}
.dcc-reg__linkish:hover { color: #4096ff; border: none; }

.dcc-reg__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 12px;
    color: #595959;
}
.dcc-reg__checks label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dcc-reg__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
    margin-bottom: 10px;
}
.dcc-reg__no-approval-hint {
    grid-column: 1 / -1;
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
    font-size: 12px;
    line-height: 1.45;
}
.dcc-reg__no-approval-hint i {
    margin-right: 6px;
}
.dcc-reg__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.dcc-reg__field > span {
    font-size: 11px;
    font-weight: 600;
    color: #8c8c8c;
}
.dcc-reg__field input[type="text"],
.dcc-reg__field input[type="search"],
.dcc-reg__field input[type="date"],
.dcc-reg__field input[type="file"],
.dcc-reg__field select {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    color: #262626;
}
.dcc-reg__field--range .dcc-reg__range {
    display: flex;
    align-items: center;
    gap: 6px;
}
.dcc-reg__field--range input { flex: 1; min-width: 0; }
.dcc-reg__field--range span { color: #bfbfbf; font-size: 11px; }

.dcc-reg__docno-row {
    display: flex;
    gap: 6px;
    align-items: center;
}
.dcc-reg__docno-row input { flex: 1; min-width: 0; }
.dcc-reg__docno-row .dcc-reg__btn {
    flex-shrink: 0;
    padding: 6px 10px;
    font-size: 11px;
}
.dcc-reg__docno-hint {
    font-size: 11px;
    color: #ff4d4f;
    line-height: 1.35;
}
.dcc-reg__docno-hint.is-ok { color: #52c41a; }

.dcc-reg-ms {
    position: relative;
    min-height: 32px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    padding: 4px 8px;
    background: #fff;
    cursor: pointer;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}
.dcc-reg-ms.is-open { border-color: #1677ff; box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.12); }
.dcc-reg-ms__placeholder {
    color: #bfbfbf;
    font-size: 12px;
    pointer-events: none;
}
.dcc-reg-ms__tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 6px;
    border-radius: 4px;
    background: #f5f5f5;
    border: 1px solid #d9d9d9;
    font-size: 11px;
    color: #262626;
}
.dcc-reg-ms__tag button {
    border: none;
    background: transparent;
    color: #8c8c8c;
    cursor: pointer;
    padding: 0;
    font-size: 12px;
    line-height: 1;
}
.dcc-reg-ms__menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 10;
    max-height: 200px;
    overflow: auto;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
    padding: 4px 0;
}
.dcc-reg-ms__menu[hidden] { display: none !important; }
.dcc-reg-ms__opt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    font-size: 12px;
    cursor: pointer;
}
.dcc-reg-ms__opt:hover { background: #f5f5f5; }
.dcc-reg-ms__opt.is-hl { background: #e6f4ff; }

.dcc-reg__more-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 6px 0 10px;
    font-size: 12px;
}
.dcc-reg__more-toggle {
    border: none;
    background: transparent;
    color: #1677ff;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
}
.dcc-reg__reset-pinned {
    border: none;
    background: transparent;
    color: #8c8c8c;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dcc-reg__reset-pinned:hover { color: #1677ff; }

.dcc-reg__more {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 10px 0 4px;
    border-top: 1px dashed #f0f0f0;
    margin-bottom: 10px;
}
.dcc-reg__more[hidden] { display: none !important; }

.dcc-reg__foot {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}
.dcc-reg__foot [hidden] { display: none !important; }

.dcc-reg__activity-hint {
    margin: 0;
    padding: 24px;
    text-align: center;
    color: #8c8c8c;
    font-size: 13px;
}

.dcc-reg--mode-add [data-mode-only="search"],
.dcc-reg--mode-add [data-mode-only="edit"] { display: none !important; }
.dcc-reg--mode-edit [data-mode-only="search"],
.dcc-reg--mode-edit [data-mode-only="add"] { display: none !important; }
.dcc-reg--mode-search [data-mode-only="add"],
.dcc-reg--mode-search [data-mode-only="edit"] { display: none !important; }
.dcc-reg__file-current {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #2563eb;
}
.dcc-reg__file-type-other {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px dashed #93c5fd;
    background: #eff6ff;
}
.dcc-reg__file-type-other > span {
    font-size: 11px;
    font-weight: 700;
    color: #1d4ed8;
}
.dcc-reg__grid input[list],
.dcc-reg__grid select {
    width: 100%;
    box-sizing: border-box;
}
.dcc-reg__manual-input {
    width: 100%;
    box-sizing: border-box;
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px dashed #93c5fd;
    background: #eff6ff;
    font-size: 12px;
}
.dcc-reg__manual-input[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .dcc-reg__grid,
    .dcc-reg__more { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .dcc-reg__grid,
    .dcc-reg__more { grid-template-columns: 1fr; }
    .dcc-reg-overlay { padding: 8px; }
}

.dcc-reg__saved {
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    background: #fff;
    color: #262626;
    max-width: 160px;
}

/* Activity timeline */
.dcc-reg__timeline { display: flex; flex-direction: column; gap: 0; }
.dcc-reg__timeline-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 12px;
}
.dcc-reg__timeline-item time { color: #8c8c8c; font-size: 11px; }
.dcc-reg__timeline-item strong { display: block; color: #262626; margin-bottom: 2px; }
.dcc-reg__timeline-item span { color: #595959; }

.dcc-dir__table tr.is-selected td { background: #e6f4ff !important; }
.dcc-dir__data-row { cursor: pointer; }
.dcc-dir__data-row:hover td { background: #f5faff; }
.dcc-dir__data-row.is-selected:hover td { background: #e6f4ff !important; }
.dcc-dir__docno-btn {
    display: inline;
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    color: #1677ff;
    font-weight: 600;
    cursor: pointer;
    font-family: ui-monospace, monospace;
    text-decoration: none;
}
.dcc-dir__docno-btn:hover { text-decoration: underline; }

/* Document approval sidebar (right panel) */
.dcc-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 1300;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: flex-end;
    pointer-events: auto;
}
.dcc-drawer-overlay[hidden] { display: none !important; }

.dcc-drawer {
    width: min(400px, 100%);
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    pointer-events: auto;
}

.dcc-drawer__close {
    position: absolute;
    top: 12px;
    right: 12px;
    border: none;
    background: transparent;
    color: #8c8c8c;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    z-index: 2;
}
.dcc-drawer__close:hover { background: #f5f5f5; color: #262626; }

.dcc-approval-panel__head {
    position: relative;
    flex-shrink: 0;
    padding: 20px 44px 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-approval-panel__doc-title {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 700;
    color: #262626;
    line-height: 1.35;
    padding-right: 8px;
}
.dcc-approval-panel__doc-no {
    margin: 0 0 12px;
    font-size: 12px;
    color: #8c8c8c;
    font-family: ui-monospace, monospace;
}
/* File card in approval drawer */
.dcc-file-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 12px 16px 0;
    padding: 12px 14px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8faff 0%, #f0f5ff 100%);
    border: 1px solid #d6e4ff;
    box-shadow: 0 2px 12px rgba(22, 119, 255, 0.08);
}
.dcc-file-card[hidden] { display: none !important; }
.dcc-file-card__icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.dcc-file-card__icon--pdf { background: linear-gradient(145deg, #ff6b6b, #ee5a24); }
.dcc-file-card__icon--word { background: linear-gradient(145deg, #4dabf7, #228be6); }
.dcc-file-card__icon--excel { background: linear-gradient(145deg, #51cf66, #2f9e44); }
.dcc-file-card__icon--image { background: linear-gradient(145deg, #cc5de8, #9c36b5); }
.dcc-file-card__icon--default { background: linear-gradient(145deg, #748ffc, #5c7cfa); }
.dcc-file-card__body {
    flex: 1;
    min-width: 0;
}
.dcc-file-card__name {
    font-size: 13px;
    font-weight: 600;
    color: #262626;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dcc-file-card__meta {
    margin-top: 2px;
    font-size: 11px;
    color: #8c8c8c;
}
.dcc-file-card__actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}
.dcc-file-card__btn {
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dcc-file-card__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.dcc-file-card__btn--view {
    background: #1677ff;
    color: #fff;
}
.dcc-file-card__btn--view:hover { background: #4096ff; }
.dcc-file-card__btn--dl {
    background: #fff;
    color: #1677ff;
    border: 1px solid #91caff;
}
.dcc-file-card__btn--del {
    background: #fff;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}
.dcc-file-card__btn--del:hover { background: #fff2f0; }
.dcc-file-card__empty {
    margin: 12px 16px 0;
    padding: 14px;
    text-align: center;
    font-size: 12px;
    color: #bfbfbf;
    border: 1px dashed #e8e8e8;
    border-radius: 8px;
    background: #fafafa;
}
.dcc-file-card__empty[hidden] { display: none !important; }

.dcc-approval-panel__scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    padding: 16px 20px 24px;
}
.dcc-approval-panel__section-title {
    margin: 0 0 12px;
    font-size: 13px;
    font-weight: 600;
    color: #8c8c8c;
}

.dcc-approval-panel__collapse {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 8px;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background: #fafafa;
    font-size: 13px;
    font-weight: 600;
    color: #595959;
    cursor: pointer;
    text-align: left;
}
.dcc-approval-panel__collapse i {
    font-size: 11px;
    color: #8c8c8c;
    transition: transform 0.15s ease;
}
.dcc-approval-panel__collapse[aria-expanded="true"] i {
    transform: rotate(90deg);
}
.dcc-approval-panel__collapse-body {
    margin: -4px 0 12px;
    padding: 8px 12px 12px;
    font-size: 12px;
    color: #595959;
    border-left: 2px solid #f0f0f0;
    margin-left: 8px;
}
.dcc-approval-panel__collapse-body[hidden] { display: none !important; }
.dcc-approval-panel__collapse-body ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.dcc-approval-panel__collapse-body li {
    padding: 6px 0;
    border-bottom: 1px solid #f5f5f5;
}
.dcc-approval-panel__collapse-body li:last-child { border-bottom: none; }

.dcc-approval-panel__details {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #f0f0f0;
    font-size: 12px;
}
.dcc-approval-panel__details summary {
    cursor: pointer;
    font-weight: 600;
    color: #1677ff;
    margin-bottom: 10px;
}

/* Green approval timeline */
.dcc-approval-flow {
    position: relative;
    padding-left: 28px;
    margin-top: 8px;
}
.dcc-approval-flow::before {
    content: '';
    position: absolute;
    left: 9px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #52c41a;
}
.dcc-approval-step {
    position: relative;
    padding: 0 0 20px 0;
}
.dcc-approval-step:last-child { padding-bottom: 0; }
.dcc-approval-step__dot {
    position: absolute;
    left: -28px;
    top: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #52c41a;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    z-index: 1;
}
.dcc-approval-step--pending .dcc-approval-step__dot {
    background: #fff;
    border: 2px solid #d9d9d9;
    color: #d9d9d9;
}
.dcc-approval-step--current .dcc-approval-step__dot {
    background: #fff;
    border: 2px solid #1677ff;
    color: #1677ff;
}
.dcc-approval-step--rejected .dcc-approval-step__dot {
    background: #ff4d4f;
    border-color: #ff4d4f;
}
.dcc-approval-step--pending::before,
.dcc-approval-step--current::before {
    /* fade line after pending - handled by parent */
}
.dcc-approval-step__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 6px;
}
.dcc-approval-step__name {
    font-size: 14px;
    font-weight: 700;
    color: #262626;
}
.dcc-approval-step__badge {
    flex-shrink: 0;
    padding: 2px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #52c41a;
    color: #52c41a;
    background: #fff;
}
.dcc-approval-step--pending .dcc-approval-step__badge {
    border-color: #d9d9d9;
    color: #8c8c8c;
}
.dcc-approval-step--current .dcc-approval-step__badge {
    border-color: #1677ff;
    color: #1677ff;
}
.dcc-approval-step--rejected .dcc-approval-step__badge {
    border-color: #ff4d4f;
    color: #ff4d4f;
}
.dcc-approval-step__note {
    font-size: 12px;
    color: #595959;
    margin-bottom: 8px;
    line-height: 1.4;
}
.dcc-approval-step__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    font-size: 12px;
    color: #8c8c8c;
    padding-top: 4px;
    border-top: 1px solid #f5f5f5;
}
.dcc-approval-step__user { flex: 1; min-width: 0; }
.dcc-approval-step__time {
    flex-shrink: 0;
    font-size: 11px;
    white-space: nowrap;
}

.dcc-drawer__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}
.dcc-drawer__field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.dcc-drawer__field > span {
    font-size: 11px;
    font-weight: 600;
    color: #8c8c8c;
}
.dcc-drawer__field input,
.dcc-drawer__field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 12px;
    font-family: inherit;
}
.dcc-drawer__field input[readonly] { background: #fafafa; color: #595959; }

.dcc-drawer__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

.dcc-dir__btn--recycle {
    color: #722ed1;
    border-color: #d3adf7;
    background: #f9f0ff;
}
.dcc-dir__btn--recycle:hover {
    color: #531dab;
    border-color: #b37feb;
    background: #efdbff;
}

/* Recycle bin — الملفات المحذوفه */
.dcc-recycle-overlay {
    position: fixed;
    inset: 0;
    z-index: 1250;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 32px 16px;
    overflow: auto;
}
.dcc-recycle-overlay[hidden] { display: none !important; }

.dcc-recycle {
    width: min(920px, 100%);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.dcc-recycle__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #f9f0ff 0%, #fff 100%);
}
.dcc-recycle__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #531dab;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dcc-recycle__close {
    border: none;
    background: transparent;
    color: #8c8c8c;
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.dcc-recycle__close:hover { color: #262626; background: #f5f5f5; }
.dcc-recycle__hint {
    margin: 0;
    padding: 12px 20px;
    font-size: 12px;
    color: #8c8c8c;
    border-bottom: 1px solid #f5f5f5;
}
.dcc-recycle__table-wrap {
    max-height: min(60vh, 520px);
    overflow: auto;
    padding: 0 12px 16px;
}
.dcc-recycle__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}
.dcc-recycle__table th {
    position: sticky;
    top: 0;
    background: #fafafa;
    text-align: left;
    padding: 10px 8px;
    font-weight: 700;
    color: #595959;
    border-bottom: 1px solid #f0f0f0;
}
.dcc-recycle__table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f5f5f5;
    vertical-align: middle;
}
.dcc-recycle__fname {
    font-weight: 600;
    color: #262626;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dcc-recycle__type {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
}
.dcc-recycle__type--file { background: #e6f4ff; color: #1677ff; }
.dcc-recycle__type--doc { background: #f9f0ff; color: #722ed1; }
.dcc-recycle__restore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid #b7eb8f;
    background: #f6ffed;
    color: #389e0d;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.dcc-recycle__restore:hover {
    background: #52c41a;
    border-color: #52c41a;
    color: #fff;
    transform: translateY(-1px);
}
.dcc-recycle__empty {
    padding: 32px;
    text-align: center;
    color: #bfbfbf;
}
.dcc-recycle__act { text-align: right; white-space: nowrap; }
.dcc-drawer__actions [hidden] { display: none !important; }
