@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --navy: #142544;
    --navy-light: #1d355d;
    --blue: #DE3258;
    --blue-soft: #FFF0F3;
    --page: #f5f7fb;
    --surface: #ffffff;
    --text: #17233b;
    --muted: #7b879c;
    --border: #e8edf4;
    --radius: 16px;
    --shadow: 0 5px 24px rgba(20, 37, 68, .045);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--page);
    color: var(--text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

.app-shell { min-height: 100vh; }

.app-sidebar {
    width: 252px;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
    padding: 27px 18px 20px;
    display: flex;
    flex-direction: column;
    background: var(--navy);
    color: #fff;
    overflow-y: auto;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 9px 30px;
    color: #fff;
}

.brand-mark {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 13px;
    background: #fff;
    color: var(--navy);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -1px;
}

.brand-name { font-size: 16px; font-weight: 800; letter-spacing: -.4px; }
.brand-subtitle { margin-top: 3px; color: #aebbd2; font-size: 10px; }

.nav-caption {
    padding: 0 12px;
    margin: 8px 0 10px;
    color: #899ab8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.app-nav { display: grid; gap: 5px; }

.app-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 45px;
    padding: 0 13px;
    border-radius: 11px;
    color: #c3cee0;
    font-weight: 500;
    transition: background .18s ease, color .18s ease;
}

.app-nav a:hover,
.app-nav a.active {
    background: var(--navy-light);
    color: #fff;
}

.app-nav a.active {
    box-shadow: inset 3px 0 #84a6ff;
}

.nav-icon {
    width: 21px;
    text-align: center;
    font-size: 17px;
}

.sidebar-bottom {
    margin-top: auto;
    padding-top: 25px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 15px 8px;
    border-top: 1px solid rgba(255,255,255,.12);
}

.avatar {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    border-radius: 12px;
    background: #dce6ff;
    color: #2448a3;
    font-weight: 800;
}

.sidebar-user-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.sidebar-user-role {
    margin-top: 4px;
    color: #aebbd2;
    font-size: 11px;
}

.sidebar-logout .btn {
    border-color: rgba(255,255,255,.2);
    color: #d9e1ef;
    border-radius: 10px;
    font-size: 12px;
}

.sidebar-logout .btn:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.app-main {
    min-height: 100vh;
    margin-left: 252px;
    padding: 34px clamp(20px, 3vw, 48px) 45px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.eyebrow {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.page-title {
    margin: 0;
    color: var(--text);
    font-size: clamp(25px, 3vw, 31px);
    font-weight: 800;
    letter-spacing: -1.1px;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 11px;
}

.topbar-user .user-name { font-size: 12px; font-weight: 700; }
.topbar-user .user-role { margin-top: 4px; color: var(--muted); font-size: 11px; }

.stat-card,
.panel {
    height: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.stat-card {
    position: relative;
    min-height: 145px;
    padding: 22px;
    overflow: hidden;
}

.stat-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.stat-value {
    margin-top: 18px;
    color: var(--text);
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -1.3px;
}

.stat-icon {
    width: 43px;
    height: 43px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: var(--blue-soft);
    color: var(--blue);
    font-size: 19px;
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 23px 25px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: -.3px;
}

.panel-description {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.panel-body { padding: 8px 24px 18px; }

.table { margin-bottom: 0; }

.table thead th {
    padding: 15px 12px;
    border-bottom: 1px solid var(--border);
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .7px;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    padding: 17px 12px;
    border-color: #eff2f7;
    color: #4e5b70;
    font-size: 12px;
    vertical-align: middle;
}

.table tbody tr:last-child td { border-bottom: 0; }

.news-title {
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.news-id { color: #8b97aa; font-size: 11px; }

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 8px;
    background: #f0f3f8;
    color: #5b6678;
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    content: "";
}

.status-pending { background: #fff5df; color: #a66c08; }
.status-translation_pending { background: #f0ebff; color: #7250bd; }
.status-ready_for_publication { background: #e5f7ef; color: #21825b; }
.status-published { background: #e4f7ec; color: #197449; }
.status-rejected { background: #ffebeb; color: #bd4545; }

.btn-primary {
    border-color: var(--blue);
    background: var(--blue);
}

.btn-primary:hover {
    border-color: #244fd2;
    background: #244fd2;
}

.form-control, .form-select {
    min-height: 46px;
    border-color: #dfe5ef;
    border-radius: 10px;
    font-size: 13px;
}

.form-control:focus, .form-select:focus {
    border-color: #8ca8ff;
    box-shadow: 0 0 0 4px rgba(49,95,233,.1);
}

.btn { border-radius: 10px; font-weight: 600; }

.empty-state {
    padding: 45px 15px;
    color: var(--muted);
    text-align: center;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
    background: #fff;
}

.login-visual {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    padding: clamp(32px, 6vw, 75px);
    overflow: hidden;
    background:
        radial-gradient(ellipse at 15% 85%, rgba(63,103,208,.32), transparent 48%),
        linear-gradient(145deg, #101e39, #1b3765);
    color: #fff;
}

.login-visual::before,
.login-visual::after {
    position: absolute;
    width: 380px;
    height: 380px;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.login-visual::before { right: -150px; bottom: -100px; }
.login-visual::after { right: -75px; bottom: -25px; }

.login-hero { position: relative; z-index: 1; max-width: 550px; margin: auto 0; }
.login-hero h1 { font-size: clamp(36px, 5vw, 61px); font-weight: 800; letter-spacing: -2.5px; line-height: 1.08; }
.login-hero p { max-width: 420px; margin-top: 22px; color: #c0cde1; font-size: 15px; line-height: 1.8; }
.login-footer { position: relative; z-index: 1; color: #aebbd2; font-size: 11px; }

.login-form-side {
    display: grid;
    place-items: center;
    padding: 35px 24px;
}

.login-card { width: min(410px, 100%); }
.login-card h2 { margin: 0 0 10px; font-size: 28px; font-weight: 800; letter-spacing: -1px; }
.login-intro { margin-bottom: 30px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 42px; }
.login-brand .brand-name { color: var(--navy); }
.login-brand .brand-subtitle { color: var(--muted); }
.login-card .form-label { margin-bottom: 8px; font-size: 12px; font-weight: 700; }
.login-card .btn { min-height: 48px; }

@media (max-width: 991.98px) {
    .app-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        padding: 15px;
    }

    .brand { padding-bottom: 15px; }
    .app-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nav-caption { margin-top: 5px; }
    .sidebar-bottom { padding-top: 12px; }
    .sidebar-user { display: none; }
    .app-main { margin-left: 0; padding: 25px 18px 35px; }
    .topbar { align-items: flex-start; }
}

@media (max-width: 575.98px) {
    .app-nav { grid-template-columns: 1fr 1fr; }
    .app-nav a { padding: 0 9px; font-size: 11px; }
    .nav-icon { font-size: 15px; }
    .topbar-user { display: none; }
    .panel-heading { padding: 18px; }
    .panel-body { padding: 5px 12px 12px; }
    .stat-card { min-height: 125px; padding: 17px; }
    .stat-value { font-size: 29px; }
    .login-page { grid-template-columns: 1fr; }
    .login-visual { display: none; }
    .login-form-side { min-height: 100vh; padding: 30px 22px; }
    .login-brand { margin-bottom: 32px; }
}

/* Global uploaded brand logo */
.app-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: inherit;
}
.brand-mark:has(.app-brand-logo) {
    overflow: hidden;
    background: #fff;
}
