/* ==============================================================================
 * National University (NU) Bangladesh Notice Dashboard - Modern Design System
 * ============================================================================== */

:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Color Palette */
    --bg-dark: #090d16;
    --bg-surface: #0f172a;
    --bg-card: rgba(18, 26, 47, 0.75);
    --bg-card-hover: rgba(26, 38, 68, 0.85);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    /* Accents */
    --accent-primary: #6366f1;
    --accent-primary-hover: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 15% 15%, rgba(99, 102, 241, 0.12) 0px, transparent 50%),
        radial-gradient(at 85% 25%, rgba(6, 182, 212, 0.08) 0px, transparent 50%),
        radial-gradient(at 50% 80%, rgba(168, 85, 247, 0.06) 0px, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Layout Container */
.dashboard-container {
    max-width: 1360px;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    margin-bottom: 28px;
}

.brand-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-cyan) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    font-size: 24px;
    font-weight: 800;
    color: #fff;
}

.brand-title h1 {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
    color: #fff;
}

.brand-title p {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.official-badge {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    border: 1px solid rgba(16, 185, 129, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Stat Cards Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    border-color: var(--border-highlight);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--accent-primary);
    border-radius: 4px 0 0 4px;
}

.stat-card.emerald::before { background: var(--accent-emerald); }
.stat-card.cyan::before    { background: var(--accent-cyan); }
.stat-card.amber::before   { background: var(--accent-amber); }
.stat-card.purple::before  { background: var(--accent-purple); }

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.5px;
}

.stat-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Control Panel & Filters */
.controls-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.controls-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
}

.search-box-wrapper {
    flex: 1 1 300px;
    position: relative;
}

.search-box-wrapper input {
    width: 100%;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 11px 16px 11px 40px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.search-box-wrapper input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
}

.filter-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.custom-select {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: var(--transition);
}

.custom-select:focus {
    outline: none;
    border-color: var(--accent-primary);
}

.filter-tabs {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin-top: 14px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 14px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 7px 14px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.tab-btn.active {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 10px rgba(99, 102, 241, 0.4);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}

.btn-primary:hover {
    opacity: 0.92;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* Notice Table Card */
.notices-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 24px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.notices-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.notices-table th {
    background: rgba(15, 23, 42, 0.85);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.notices-table td {
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 14px;
    vertical-align: middle;
    transition: var(--transition);
}

.notices-table tbody tr {
    transition: var(--transition);
}

.notices-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notice-title-cell {
    font-weight: 500;
    color: var(--text-primary);
    max-width: 540px;
    word-break: break-word;
}

.notice-title-link {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.notice-title-link:hover {
    color: var(--accent-cyan);
}

/* Category Pill Badges */
.badge-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid transparent;
}

.badge-exam {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.3);
}

.badge-admission {
    background: rgba(168, 85, 247, 0.15);
    color: #d8b4fe;
    border-color: rgba(168, 85, 247, 0.3);
}

.badge-form-fill {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border-color: rgba(245, 158, 11, 0.3);
}

.badge-result {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border-color: rgba(16, 185, 129, 0.3);
}

.badge-scholarship {
    background: rgba(6, 182, 212, 0.15);
    color: #67e8f9;
    border-color: rgba(6, 182, 212, 0.3);
}

.badge-tender {
    background: rgba(244, 63, 94, 0.15);
    color: #fda4af;
    border-color: rgba(244, 63, 94, 0.3);
}

.badge-general {
    background: rgba(148, 163, 184, 0.15);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.3);
}

/* Date Pill */
.date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Action Buttons Container */
.actions-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-action-view {
    background: rgba(59, 130, 246, 0.12);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.btn-action-view:hover {
    background: rgba(59, 130, 246, 0.25);
    color: #fff;
}

.btn-action-pdf {
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.btn-action-pdf:hover {
    background: rgba(16, 185, 129, 0.25);
    color: #fff;
}

.btn-action-download {
    background: rgba(245, 158, 11, 0.12);
    color: #fde68a;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.btn-action-download:hover {
    background: rgba(245, 158, 11, 0.25);
    color: #fff;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    color: var(--text-muted);
}

.empty-state h3 {
    font-size: 18px;
    color: #fff;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 420px;
    margin: 0 auto 20px;
}

/* Pagination */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.5);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-list {
    display: flex;
    gap: 6px;
    list-style: none;
}

.page-item a, .page-item span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    text-decoration: none;
    transition: var(--transition);
}

.page-item.active a, .page-item.active span {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

.page-item a:hover:not(.active) {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.page-item.disabled span {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Alert Banner */
.alert-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
}

.alert-banner.warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: #fde68a;
}

/* PDF Modal Viewer */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.modal-backdrop.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 960px;
    height: 88vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.9);
}

.modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close-btn:hover {
    color: #fff;
}

.modal-body {
    flex: 1;
    background: #1e293b;
    position: relative;
}

.modal-body iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid var(--border-highlight);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(16px);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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

/* Dual Dashboard Grid Layout */
.dual-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.dual-dashboard-grid.single-column {
    grid-template-columns: minmax(0, 1fr);
}

.board-card-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
}

.board-card-wrapper:hover {
    border-color: var(--border-highlight);
}

.board-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.85);
}

.board-header.nu-theme {
    border-top: 4px solid var(--accent-primary);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.board-header.bteb-theme {
    border-top: 4px solid var(--accent-emerald);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.12) 0%, rgba(15, 23, 42, 0.9) 100%);
}

.board-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.board-header-title h2 {
    font-size: 17px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.board-header-title p {
    font-size: 12px;
    color: var(--text-secondary);
}

.board-badge-count {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

.board-badge-count.nu {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.35);
}

.board-badge-count.bteb {
    background: rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.board-search-bar {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(15, 23, 42, 0.4);
    display: flex;
    gap: 10px;
}

.board-search-bar input {
    flex: 1;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
}

.board-search-bar input:focus {
    outline: none;
    border-color: var(--accent-primary);
}

/* Notice List in Board Cards */
.board-notices-list {
    flex: 1;
    overflow-y: auto;
    max-height: 640px;
}

.board-notice-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.board-notice-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.board-notice-item:last-child {
    border-bottom: none;
}

.notice-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.notice-headline {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.5;
    text-decoration: none;
    transition: var(--transition);
}

.notice-headline:hover {
    color: var(--accent-cyan);
}

.notice-bottom-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 4px;
}

/* Responsive Breakpoints */
@media (max-width: 1100px) {
    .dual-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .dashboard-container { padding: 14px 10px; }
    .top-nav { flex-direction: column; gap: 16px; align-items: flex-start; }
    .nav-actions { width: 100%; justify-content: flex-end; }
    .controls-row { flex-direction: column; align-items: stretch; }
    .filter-group { flex-direction: column; align-items: stretch; }
    .custom-select { width: 100%; }
    .actions-cell { flex-wrap: wrap; }
    .notices-table th, .notices-table td { padding: 12px 10px; }
}
