/* =========================================================
   NOTICE BOARD — ICT.ABUSAYED.NET
   Light Theme, Tech / Circuit Inspired
========================================================= */

/* ----- Font Import (সবার আগে থাকতে হবে) ----- */
@import url('https://fonts.googleapis.com/css2?family=Anek+Bangla:wght@500;600;700;800&family=Hind+Siliguri:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600&family=Inter:wght@500;600;700&display=swap');

/* ----- Required Variables (self-contained) ----- */
:root {
    /* Colors */
    --bg:           #F5F6FA;
    --surface:      #FFFFFF;
    --surface-2:    #EEF2FB;

    --ink:          #141B2E;
    --ink-soft:     rgba(20,27,46,.72);
    --muted:        #5B6478;
    --muted-soft:   #838CA0;
    --text-faint:   #94A3B8;

    --amber:        #C97A1E;
    --amber-bright: #F2A93B;
    --amber-soft:   rgba(201,122,30,.1);
    --blue:         #2F5FD1;
    --blue-bright:  #4C8DFF;
    --blue-soft:    rgba(47,95,209,.09);
    --teal:         #1F9D74;
    --red:          #C6483F;

    /* Lines & Grid */
    --line:         rgba(20,27,46,.12);
    --line-strong:  rgba(20,27,46,.22);
    --grid-line:    rgba(20,27,46,.05);

    /* Radius */
    --radius-sm:    8px;
    --radius:       12px;

    /* Shadow */
    --shadow-card:  0 16px 36px rgba(20,27,46,.08);

    /* Fonts */
    --font-display: 'Anek Bangla', sans-serif;
    --font-body:    'Hind Siliguri', sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;
    --font-ui:      'Inter', 'Hind Siliguri', sans-serif;
}

/* =========================================================
   WRAPPER
========================================================= */
.nb-wrapper {
    max-width: 1200px;
    width: calc(100% - 48px);
    margin: 40px auto;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    padding: 40px;
    position: relative;
    overflow: hidden;
}

/* subtle grid overlay */
.nb-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(var(--grid-line) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    opacity: 0.4;
    z-index: 0;
}

.nb-wrapper > * {
    position: relative;
    z-index: 1;
}

/* =========================================================
   SECTION LABEL
========================================================= */
.nb-section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--blue);
    background: var(--blue-soft);
    padding: 5px 14px;
    border-radius: 4px;
    border: 1px solid var(--blue-soft);
    margin-bottom: 14px;
}

.nb-section-label .line {
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--blue);
    opacity: 0.6;
}

/* =========================================================
   HEADER
========================================================= */
.nb-header {
    margin-bottom: 28px;
}

.nb-header h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.nb-header h2 .accent {
    color: var(--amber);
    -webkit-text-fill-color: var(--amber);
}

.nb-header p {
    font-size: 1rem;
    color: var(--muted);
    margin-top: 6px;
}

/* =========================================================
   FILTER BAR
========================================================= */
.nb-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.nb-controls-left,
.nb-controls-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nb-controls-left label,
.nb-controls-right label {
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.8rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.nb-controls select {
    padding: 7px 32px 7px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 6px;
    background: var(--surface);
    font-family: var(--font-ui);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--ink);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.nb-controls select:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-soft);
}

/* =========================================================
   TABLE
========================================================= */
.nb-table-scroll {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
}

.nb-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 650px;
    text-align: left;
    background: var(--surface);
}

.nb-table thead {
    background: var(--surface-2);
}

.nb-table th {
    padding: 12px 16px;
    font-family: var(--font-mono);
    font-weight: 600;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    border-bottom: 1px solid var(--line);
}

.nb-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--ink-soft);
    vertical-align: middle;
}

.nb-table tbody tr {
    transition: background-color 0.15s ease;
}

.nb-table tbody tr:hover {
    background: var(--surface-2);
}

.nb-table tbody tr:last-child td {
    border-bottom: none;
}

/* SL column */
.nb-table td:first-child {
    font-weight: 500;
    color: var(--text-faint);
    width: 60px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.8rem;
}

/* Date column */
.nb-table td:nth-child(2) {
    font-weight: 500;
    color: var(--ink);
    white-space: nowrap;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* Category badge */
.nb-category-badge {
    display: inline-block;
    background: var(--blue-soft);
    color: var(--blue);
    font-family: var(--font-mono);
    font-weight: 500;
    font-size: 0.72rem;
    padding: 3px 10px;
    border-radius: 4px;
    border: 1px solid var(--blue-soft);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Title column */
.nb-table td:nth-child(4) {
    font-weight: 500;
    color: var(--ink);
}

/* =========================================================
   ACTION BUTTONS
========================================================= */
.nb-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-view-btn,
.nb-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--blue);
}

.nb-view-btn:hover,
.nb-download-btn:hover {
    background: var(--blue);
    border-color: var(--blue);
    color: #fff;
    box-shadow: 0 0 10px var(--blue-soft);
}

.nb-eye-icon,
.nb-download-icon {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Download icon fill */
.nb-download-icon {
    fill: currentColor;
    stroke: none;
}

/* =========================================================
   PAGINATION
========================================================= */
.nb-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    flex-wrap: wrap;
}

.nb-pagination-info {
    font-size: 0.85rem;
    color: var(--muted);
    font-family: var(--font-mono);
}

.nb-pagination-info strong {
    color: var(--ink);
    font-weight: 600;
}

.nb-pagination {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.nb-pagination button {
    padding: 6px 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    border-radius: 6px;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-soft);
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
}

.nb-pagination button:hover:not(:disabled) {
    background: var(--surface-2);
    border-color: var(--muted);
}

.nb-pagination button.active {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.nb-pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--surface-2);
}

/* =========================================================
   INLINE PDF PREVIEW
========================================================= */
.nb-preview-row {
    background: var(--surface-2);
}

.nb-preview-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--line);
}

.nb-preview-container {
    padding: 16px;
    background: var(--surface);
    border-radius: 8px;
    margin: 10px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
}

.nb-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.nb-preview-header strong {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--ink);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nb-preview-header strong svg {
    color: var(--red);
}

.nb-preview-actions {
    display: flex;
    gap: 8px;
}

.nb-preview-download,
.nb-preview-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid var(--line-strong);
    transition: all .2s ease;
    font-family: var(--font-ui);
}

.nb-preview-download {
    background: var(--blue);
    color: #fff;
    border-color: var(--blue);
}

.nb-preview-download:hover {
    background: var(--blue-bright);
    border-color: var(--blue-bright);
}

.nb-preview-close {
    background: var(--surface);
    color: var(--muted);
}

.nb-preview-close:hover {
    background: var(--surface-2);
    border-color: var(--muted);
}

.nb-preview-iframe {
    width: 100%;
    height: 70vh;
    border: none;
    border-radius: 8px;
    background: var(--surface-2);
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
    .nb-wrapper {
        padding: 24px 16px;
        width: calc(100% - 32px);
        margin: 24px auto;
    }
    .nb-header h2 {
        font-size: 1.5rem;
    }
    .nb-controls {
        flex-direction: column;
        align-items: stretch;
    }
    .nb-controls-left,
    .nb-controls-right {
        justify-content: space-between;
    }
    .nb-pagination-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
}

@media (max-width: 600px) {
    .nb-preview-container {
        margin: 6px;
        padding: 10px;
    }
    .nb-preview-iframe {
        height: 60vh;
    }
    .nb-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .nb-preview-actions {
        width: 100%;
        flex-wrap: wrap;
    }
}

@media (max-width: 480px) {
    .nb-wrapper {
        padding: 20px 14px;
        width: calc(100% - 24px);
    }
    .nb-header h2 {
        font-size: 1.3rem;
    }
    .nb-controls {
        padding: 12px 14px;
        gap: 12px;
    }
    .nb-controls-left,
    .nb-controls-right {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    .nb-controls select {
        width: 100%;
    }
    .nb-pagination button {
        min-width: 32px;
        padding: 5px 10px;
        font-size: 0.75rem;
    }
}