/* =========================================================
   DSHE Notice Dashboard — Premium Style v2.0 (Fixed)
   ========================================================= */

/* Font */
@import url('https://fonts.googleapis.com/css2?family=Hind+Siliguri:wght@400;500;600;700&display=swap');

/* ── Root wrapper ─────────────────────────────────────── */
.dshe-dashboard {
    font-family: 'Hind Siliguri', Arial, sans-serif;
    font-size: 14px;
    color: #0f1923;
    margin: 24px 0;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.dshe-dashboard *,
.dshe-dashboard *::before,
.dshe-dashboard *::after {
    box-sizing: border-box;
}

/* ── Header ───────────────────────────────────────────── */
.dshe-dashboard .dshe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    background: linear-gradient(135deg, #065f38 0%, #059652 60%, #0ab860 100%);
    border-radius: 16px 16px 0 0;
    padding: 24px 28px;
    position: relative;
    overflow: hidden;
}

.dshe-dashboard .dshe-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 80% 50%, rgba(255,255,255,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.dshe-dashboard .dshe-header::after {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}

.dshe-dashboard .dshe-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 1;
}

.dshe-dashboard .dshe-header-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.25);
}

.dshe-dashboard .dshe-header-icon svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
    stroke: #ffffff;
}

.dshe-dashboard .dshe-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 3px 0;
    padding: 0;
    line-height: 1.2;
    border: none;
    background: none;
}

.dshe-dashboard .dshe-subtitle {
    font-size: 12px;
    color: rgba(255,255,255,0.72);
    margin: 0;
    padding: 0;
    letter-spacing: 0.3px;
}

.dshe-dashboard .dshe-header-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 100px;
    padding: 6px 16px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
    position: relative;
    z-index: 1;
    white-space: nowrap;
}

.dshe-dashboard .dshe-live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #86efac;
    flex-shrink: 0;
    animation: dshe-pulse 2s infinite;
}

@keyframes dshe-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(134,239,172,0.6); }
    70%  { box-shadow: 0 0 0 6px rgba(134,239,172,0); }
    100% { box-shadow: 0 0 0 0 rgba(134,239,172,0); }
}

.dshe-dashboard .dshe-total-count {
    font-weight: 700;
    font-size: 15px;
}

/* ── Controls bar ─────────────────────────────────────── */
.dshe-dashboard .dshe-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.dshe-dashboard .dshe-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}

.dshe-dashboard .dshe-search-icon {
    position: absolute;
    left: 13px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #94a3b8;
    stroke: #94a3b8;
    pointer-events: none;
}

.dshe-dashboard .dshe-search-input {
    width: 100%;
    padding: 10px 36px 10px 40px;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    font-family: 'Hind Siliguri', Arial, sans-serif;
    font-size: 14px;
    color: #0f1923;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    display: block;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.dshe-dashboard .dshe-search-input:focus {
    border-color: #059652;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(5,150,82,0.12);
}

.dshe-dashboard .dshe-search-input::placeholder {
    color: #94a3b8;
}

.dshe-dashboard .dshe-search-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #94a3b8;
    color: #ffffff;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    padding: 0;
    line-height: 1;
}

.dshe-dashboard .dshe-search-clear:hover {
    background: #ef4444;
}

.dshe-dashboard .dshe-filters {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.dshe-dashboard .dshe-filter-group {
    display: flex;
    align-items: center;
    gap: 7px;
}

.dshe-dashboard .dshe-filter-label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    white-space: nowrap;
}

.dshe-dashboard .dshe-select {
    padding: 8px 32px 8px 12px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background-color: #f8fafc;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    -webkit-appearance: none;
    appearance: none;
    font-family: 'Hind Siliguri', Arial, sans-serif;
    font-size: 13px;
    color: #334155;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.dshe-dashboard .dshe-select:focus {
    border-color: #059652;
    box-shadow: 0 0 0 3px rgba(5,150,82,0.12);
}

/* ── Stats bar ────────────────────────────────────────── */
.dshe-dashboard .dshe-stats-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 8px 20px;
    background: #f1f5f9;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12.5px;
    color: #64748b;
    min-height: 36px;
}

.dshe-dashboard .dshe-search-tag {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #d1fae5;
    color: #065f38;
    border: 1px solid #a7f3d0;
    border-radius: 100px;
    padding: 2px 10px 2px 8px;
    font-size: 12px;
    font-weight: 500;
}

.dshe-dashboard .dshe-search-tag svg {
    width: 12px;
    height: 12px;
    stroke: #065f38;
}

/* ── Table container ──────────────────────────────────── */
.dshe-dashboard .dshe-table-container {
    background: #ffffff;
    border-left: 1px solid #e2e8f0;
    border-right: 1px solid #e2e8f0;
    overflow: hidden;
    min-height: 200px;
}

/* ── Loader ───────────────────────────────────────────── */
.dshe-dashboard .dshe-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 60px 20px;
    color: #64748b;
    font-size: 14px;
}

.dshe-dashboard .dshe-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid #e2e8f0;
    border-top-color: #059652;
    border-radius: 50%;
    animation: dshe-spin 0.7s linear infinite;
}

@keyframes dshe-spin {
    to { transform: rotate(360deg); }
}

/* ── Table ────────────────────────────────────────────── */
.dshe-dashboard .dshe-table-inner {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.dshe-dashboard .dshe-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    font-size: 13.5px;
}

.dshe-dashboard .dshe-table thead tr {
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.dshe-dashboard .dshe-table thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: #64748b;
    white-space: nowrap;
    border: none;
}

.dshe-dashboard .dshe-row {
    border-bottom: 1px solid #e2e8f0;
    animation: dshe-row-in 0.3s ease both;
    transition: background 0.15s;
}

@keyframes dshe-row-in {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dshe-dashboard .dshe-row:last-child {
    border-bottom: none;
}

.dshe-dashboard .dshe-row:hover {
    background: #f0fdf7;
}

.dshe-dashboard .dshe-row td {
    padding: 14px 16px;
    vertical-align: middle;
    line-height: 1.5;
    border: none;
}

.dshe-dashboard .col-sl     { width: 52px; }
.dshe-dashboard .col-date   { width: 130px; }
.dshe-dashboard .col-files  { width: 190px; }
.dshe-dashboard .col-action { width: 95px; text-align: center; }

.dshe-dashboard .dshe-serial {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #f1f5f9;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
}

.dshe-dashboard .dshe-title-text {
    color: #0f1923;
    font-size: 13.5px;
    line-height: 1.55;
    display: block;
}

.dshe-dashboard .dshe-date-badge {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 3px 8px;
    font-size: 11.5px;
    color: #64748b;
    font-weight: 500;
    white-space: nowrap;
}

/* ── File pills ───────────────────────────────────────── */
.dshe-dashboard .dshe-file-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 100px;
    padding: 3px 10px 3px 8px;
    font-size: 11.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, color 0.15s, transform 0.15s;
    margin: 2px 3px 2px 0;
    white-space: nowrap;
}

.dshe-dashboard .dshe-file-pill svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    flex-shrink: 0;
}

.dshe-dashboard .dshe-file-pill:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    text-decoration: none;
    transform: translateY(-1px);
}

.dshe-dashboard .dshe-no-file,
.dshe-dashboard .dshe-no-link {
    color: #cbd5e1;
    font-size: 14px;
}

/* ── View button ──────────────────────────────────────── */
.dshe-dashboard .dshe-view-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: #059652;
    color: #ffffff;
    border-radius: 7px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
    white-space: nowrap;
    box-shadow: 0 1px 4px rgba(5,150,82,0.3);
    font-family: 'Hind Siliguri', Arial, sans-serif;
}

.dshe-dashboard .dshe-view-btn svg {
    width: 12px;
    height: 12px;
    stroke: #ffffff;
}

.dshe-dashboard .dshe-view-btn:hover {
    background: #065f38;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5,150,82,0.4);
}

/* ── Search highlight ─────────────────────────────────── */
.dshe-dashboard mark.dshe-highlight {
    background: #fef9c3;
    color: #713f12;
    border-radius: 3px;
    padding: 1px 2px;
    font-style: normal;
}

/* ── Empty state ──────────────────────────────────────── */
.dshe-dashboard .dshe-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 10px;
    text-align: center;
}

.dshe-dashboard .dshe-empty svg {
    width: 48px;
    height: 48px;
    stroke: #cbd5e1;
    color: #cbd5e1;
}

.dshe-dashboard .dshe-empty p {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #334155;
}

.dshe-dashboard .dshe-empty span {
    font-size: 13px;
    color: #94a3b8;
}

/* ── Error ────────────────────────────────────────────── */
.dshe-dashboard .dshe-error-row {
    padding: 30px 20px;
    text-align: center;
    color: #ef4444;
    font-weight: 500;
}

/* ── Footer & Pagination ──────────────────────────────── */
.dshe-dashboard .dshe-footer {
    padding: 14px 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dshe-dashboard .dshe-pages {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.dshe-dashboard .dshe-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    color: #334155;
    font-family: 'Hind Siliguri', Arial, sans-serif;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
    outline: none;
    white-space: nowrap;
}

.dshe-dashboard .dshe-page-btn:hover:not(:disabled):not(.active) {
    background: #f1f5f9;
    border-color: #059652;
    color: #059652;
    transform: translateY(-1px);
}

.dshe-dashboard .dshe-page-btn.active {
    background: #059652;
    border-color: #059652;
    color: #ffffff;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(5,150,82,0.35);
    pointer-events: none;
}

.dshe-dashboard .dshe-page-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.dshe-dashboard .dshe-page-ellipsis {
    color: #94a3b8;
    font-size: 14px;
    padding: 0 4px;
    user-select: none;
}

.dshe-dashboard .dshe-prev,
.dshe-dashboard .dshe-next {
    font-size: 13px;
    font-weight: 600;
    padding: 0 14px;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 640px) {
    .dshe-dashboard .dshe-header {
        padding: 18px 16px;
        border-radius: 12px 12px 0 0;
    }
    .dshe-dashboard .dshe-title  { font-size: 17px; }
    .dshe-dashboard .dshe-header-badge { font-size: 12px; padding: 5px 10px; }
    .dshe-dashboard .dshe-controls { padding: 12px 14px; flex-direction: column; align-items: stretch; }
    .dshe-dashboard .dshe-search-wrap { min-width: auto; }
    .dshe-dashboard .dshe-filters { justify-content: space-between; }
    .dshe-dashboard .dshe-stats-bar { padding: 8px 14px; }
    .dshe-dashboard .dshe-row td { padding: 11px 12px; }
    .dshe-dashboard .dshe-table  { font-size: 12.5px; }
    .dshe-dashboard .dshe-footer { padding: 12px; border-radius: 0 0 12px 12px; }
    .dshe-dashboard .dshe-page-btn { min-width: 32px; height: 32px; font-size: 12px; }
    .dshe-dashboard .dshe-prev,
    .dshe-dashboard .dshe-next  { padding: 0 10px; }
}
