/* ============================================================
   app.css – All shared styles
   Phòng Đào tạo – ĐH Sài Gòn
   ============================================================ */

/* ── VARIABLES ──────────────────────────────────────────────── */
:root {
    --sgu-blue:       #005299;
    --sgu-blue-dark:  #003f7a;
    --sgu-blue-light: #0077cc;
}

/* ── BASE ───────────────────────────────────────────────────── */
body {
    font-size: 14px;
    background-color: #f5f7fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
label { color: var(--sgu-blue); }
.note-editor  { overflow: visible !important; }
.dropdown-menu { z-index: 2050 !important; }

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
    background: linear-gradient(90deg, var(--sgu-blue-dark) 0%, var(--sgu-blue) 60%, var(--sgu-blue-light) 100%);
    box-shadow: 0 2px 10px rgba(0,0,0,.25);
    position: sticky;
    top: 0;
    z-index: 1030;
}
.header-top {
    padding: 10px 0 6px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.header-logo img { height: 52px; }
.header-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: .4px;
    text-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.header-subtitle {
    font-size: 0.78rem;
    color: rgba(255,255,255,.75);
    margin-top: 1px;
}

/* ── NAVBAR ─────────────────────────────────────────────────── */
.site-nav { background: transparent; padding: 0; }
.site-nav .navbar-nav .nav-link {
    color: rgba(255,255,255,.85) !important;
    font-size: 0.87rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background .18s, color .18s;
}
.site-nav .navbar-nav .nav-link:hover,
.site-nav .navbar-nav .nav-link.active {
    background: rgba(255,255,255,.18);
    color: #fff !important;
}
.site-nav .dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0,0,0,.14);
    font-size: 0.87rem;
    padding: 6px 4px;
    min-width: 200px;
}
.site-nav .dropdown-item {
    border-radius: 6px;
    padding: 7px 14px;
    color: #1a2a3a;
    transition: background .15s;
}
.site-nav .dropdown-item:hover {
    background: #e8f0fb;
    color: var(--sgu-blue);
}

/* ── CONTENT AREA ───────────────────────────────────────────── */
.site-content { flex: 1; padding: 24px 0 48px; }

.site-content h1, .site-content h2,
.site-content h3, .site-content h4,
.site-content h5 {
    color: var(--sgu-blue);
    font-weight: 600;
    margin-bottom: .6rem;
}
.site-content h4, .site-content h5 {
    padding-bottom: 6px;
    border-bottom: 2px solid #e3ecf7;
    margin-bottom: 14px;
}
.site-content a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: var(--sgu-blue);
    text-decoration: none;
}
.site-content a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: var(--sgu-blue-dark);
    text-decoration: underline;
}
.site-content .form-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--sgu-blue);
    margin-bottom: 4px;
}
.site-content .form-control,
.site-content .form-select {
    border-radius: 7px;
    border: 1px solid #ccd9e8;
    font-size: 0.88rem;
    transition: border-color .18s, box-shadow .18s;
}
.site-content .form-control:focus,
.site-content .form-select:focus {
    border-color: var(--sgu-blue-light);
    box-shadow: 0 0 0 3px rgba(0,119,204,.12);
}
.site-content .input-group-text {
    background: #f0f5fb;
    border-color: #ccd9e8;
    color: var(--sgu-blue);
    font-size: 0.85rem;
}
.site-content .btn {
    border-radius: 7px;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 16px;
    transition: filter .18s, box-shadow .18s;
}
.site-content .btn:hover { filter: brightness(1.08); }
.site-content .btn-primary   { background: var(--sgu-blue);   border-color: var(--sgu-blue); }
.site-content .btn-secondary { background: #6c757d; border-color: #6c757d; }
.site-content .card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,82,153,.08);
}
.site-content .card-header {
    background: #f0f5fb;
    border-bottom: 2px solid #dde8f5;
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
    color: var(--sgu-blue);
    padding: 10px 18px;
    font-size: 0.9rem;
}
.site-content .card-body { padding: 18px; }
.site-content .table { font-size: 0.87rem; vertical-align: middle; }
.site-content .table thead th {
    background: #e8f0fb;
    color: var(--sgu-blue);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    border-bottom: 2px solid #ccd9e8;
    white-space: nowrap;
}
.site-content .table tbody tr:hover { background: #f4f8fd; }
.site-content .table td,
.site-content .table th { padding: 8px 12px; border-color: #e8eef6; }
.site-content #myTable_wrapper .dataTables_filter input {
    border-radius: 7px;
    border: 1px solid #ccd9e8;
    font-size: 0.85rem;
    padding: 4px 10px;
}
.site-content #myTable_wrapper .dataTables_length select {
    border-radius: 7px;
    border: 1px solid #ccd9e8;
    font-size: 0.85rem;
}
.site-content .alert {
    border-radius: 10px;
    border: none;
    font-size: 0.88rem;
    padding: 10px 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}
.site-content .alert-success { background: #e6f4ea; color: #1e6e36; }
.site-content .alert-danger  { background: #fdecea; color: #991b1b; }
.site-content .alert-warning { background: #fff8e1; color: #7a5800; }
.site-content .alert-info    { background: #e8f0fb; color: var(--sgu-blue); }
.site-content .badge { font-size: 0.76rem; border-radius: 6px; padding: 4px 8px; font-weight: 600; }
.site-content hr { border-color: #dde8f5; opacity: 1; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(90deg, var(--sgu-blue-dark) 0%, var(--sgu-blue) 100%);
    color: rgba(255,255,255,.85);
    font-size: 0.83rem;
    padding: 22px 0 16px;
}
.site-footer .footer-title { font-weight: 700; color: #fff; font-size: 0.9rem; margin-bottom: 8px; }
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .footer-divider { border-color: rgba(255,255,255,.15); margin: 14px 0 10px; }
.site-footer .footer-copy { font-size: 0.78rem; color: rgba(255,255,255,.55); }

/* ── WELCOME PAGE ───────────────────────────────────────────── */
.login-card {
    border: none;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(0,82,153,.13);
}
.login-card .card-header {
    background: #005299;
    color: #fff;
    border-radius: 14px 14px 0 0;
    font-weight: 600;
    padding: 14px 20px;
}
.login-card .form-control { border-radius: 8px; font-size: 0.92rem; }
.login-card .btn-login {
    background: #005299;
    color: #fff;
    border-radius: 8px;
    width: 100%;
    font-weight: 600;
    letter-spacing: .3px;
    transition: background .2s;
}
.login-card .btn-login:hover { background: #003f7a; color: #fff; }
.news-card { border: none; border-radius: 14px; box-shadow: 0 2px 16px rgba(0,82,153,.08); }
.news-card .card-header {
    background: #f4f8fd;
    border-bottom: 2px solid #005299;
    border-radius: 14px 14px 0 0;
    font-weight: 600;
    color: #005299;
    padding: 12px 20px;
}
.news-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: background .15s;
}
.news-item:last-child { border-bottom: none; }
.news-item .news-icon {
    width: 32px; height: 32px; min-width: 32px;
    background: #e8f0fb;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #005299;
    font-size: 0.78rem;
    margin-top: 2px;
}
.news-item a { text-decoration: none; color: #1a1a2e; font-size: 0.9rem; font-weight: 500; line-height: 1.4; }
.news-item a:hover { color: #005299; }
.news-item .news-date { font-size: 0.76rem; color: #9aa5b4; white-space: nowrap; margin-top: 2px; }

/* ── STUDENT INFO CARD ──────────────────────────────────────── */
.st-info-card { border: none; border-radius: 14px; box-shadow: 0 3px 16px rgba(0,82,153,.11); overflow: hidden; font-size: 0.86rem; }
.st-info-header { background: linear-gradient(135deg, #005299 0%, #0077cc 100%); color: #fff; }
.st-avatar {
    width: 52px; height: 52px;
    background: rgba(255,255,255,.22);
    border: 2px solid rgba(255,255,255,.5);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 700; color: #fff;
}
.st-name { font-weight: 700; font-size: 0.95rem; margin-bottom: 4px; }
.st-badge { background: rgba(255,255,255,.25); font-size: 0.75rem; border-radius: 20px; padding: 3px 10px; letter-spacing: .3px; }
.st-info-list .list-group-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 14px; border-color: #edf2f9; font-size: 0.84rem; color: #2d3a4a; }
.st-icon { color: #005299; width: 14px; text-align: center; margin-top: 2px; flex-shrink: 0; opacity: .8; }
.st-label { color: #7a8fa6; min-width: 72px; flex-shrink: 0; }
.st-footer { background: #f4f8fd; border-top: 1px solid #dde8f5; }
.st-quicklinks-title { font-weight: 600; font-size: 0.8rem; color: #005299; text-transform: uppercase; letter-spacing: .4px; }
.st-quicklinks { list-style: none; padding: 0; margin: 0; }
.st-quicklinks li { margin-bottom: 3px; }
.st-quicklinks a { font-size: 0.83rem; color: #005299; text-decoration: none; display: block; padding: 3px 0; transition: color .15s; }
.st-quicklinks a:hover { color: #003f7a; text-decoration: underline; }

/* ── ARTICLE / BAIVIET ──────────────────────────────────────── */
.article-card { border: none; border-radius: 14px; box-shadow: 0 2px 16px rgba(0,82,153,.09); overflow: hidden; }
.article-header {
    background: #f0f5fb;
    border-bottom: 3px solid #ccd9e8;
    padding: 24px 32px 20px;
    color: #1a2a3a;
}
.article-header .article-title { font-size: 1.3rem; font-weight: 700; line-height: 1.4; margin-bottom: 10px; color: #005299; }
.article-header .article-meta { font-size: 0.82rem; color: #7a8fa6; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.article-header .article-meta i { margin-right: 4px; }
.article-body { padding: 28px 32px; background: #fff; color: #2d3a4a; font-size: 0.92rem; line-height: 1.75; }
.article-body h1, .article-body h2, .article-body h3, .article-body h4 { color: #005299; font-weight: 600; margin-top: 1.4em; margin-bottom: .5em; }
.article-body p { margin-bottom: 1em; }
.article-body a { color: #005299; text-decoration: underline; }
.article-body ul, .article-body ol { padding-left: 1.4em; margin-bottom: 1em; }
.article-body li { margin-bottom: 4px; }
.article-body img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.article-body table { width: 100%; font-size: 0.88rem; border-collapse: collapse; margin-bottom: 1em; }
.article-body table th { background: #e8f0fb; color: #005299; font-weight: 600; padding: 8px 12px; border: 1px solid #ccd9e8; }
.article-body table td { padding: 7px 12px; border: 1px solid #dde8f5; vertical-align: top; }
.article-body blockquote { border-left: 4px solid #005299; padding: 8px 16px; background: #f0f5fb; border-radius: 0 8px 8px 0; margin: 1em 0; color: #4a5a6a; font-style: italic; }
.article-footer {
    background: #f4f8fd;
    border-top: 1px solid #dde8f5;
    padding: 12px 32px;
    font-size: 0.83rem;
    color: #7a8fa6;
    display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}

/* ── RELATED ARTICLES SIDEBAR ───────────────────────────────── */
.related-card { border: none; border-radius: 14px; box-shadow: 0 2px 12px rgba(0,82,153,.09); overflow: hidden; position: sticky; top: 80px; }
.related-card .related-header { background: linear-gradient(135deg, #005299 0%, #0077cc 100%); color: #fff; padding: 12px 18px; font-weight: 600; font-size: 0.88rem; letter-spacing: .3px; }
.related-card .related-header i { margin-right: 6px; }
.related-list { list-style: none; padding: 0; margin: 0; }
.related-list li { border-bottom: 1px solid #edf2f9; }
.related-list li:last-child { border-bottom: none; }
.related-list a { display: flex; align-items: flex-start; gap: 8px; padding: 10px 16px; text-decoration: none; color: #2d3a4a; font-size: 0.84rem; line-height: 1.4; transition: background .15s, color .15s; }
.related-list a:hover { background: #f0f5fb; color: #005299; }
.related-list .rel-icon { color: #005299; opacity: .6; margin-top: 2px; flex-shrink: 0; font-size: 0.75rem; }
.related-list .rel-date { display: block; font-size: 0.75rem; color: #9aa5b4; margin-top: 2px; }
