/* ============================================
   NMR RİNN — Dizayn Sistemi v3
   Naxçıvan MR Rəqəmsal İnkişaf və Nəqliyyat Nazirliyi
   ============================================ */

/* ---------- CSS Variables ---------- */
:root {
    --primary: #1b3a5c;
    --primary-light: #2a5a8c;
    --primary-dark: #122a44;
    --accent: #2980b9;
    --accent-light: #3498db;
    --success: #27ae60;
    --warning: #e67e22;
    --danger: #c0392b;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 10px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
    --sidebar-w: 264px;
}

/* Default theme — light */
:root,
[data-theme="light"] {
    --bg: #f3f6fa;
    --bg-secondary: #ffffff;
    --bg-card: #ffffff;
    --bg-input: #f8fafc;
    --bg-hover: #e8eef7;
    --text: #172033;
    --text-secondary: #475569;
    --text-muted: #718096;
    --border: #dce4ef;
    --border-light: #ccd6e3;
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(0, 0, 0, 0.04);
    --msg-user: #eaf2fb;
    --msg-ai: #ffffff;
    --scrollbar-bg: #eef1f6;
    --scrollbar-thumb: #b7c3d3;
    --sidebar-bg: #102a43;
    --sidebar-text: #d8e5f3;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.10);
    --sidebar-active: rgba(255, 255, 255, 0.15);
    --sidebar-border: rgba(255, 255, 255, 0.10);
    --sidebar-muted: rgba(216, 229, 243, 0.58);
    --sidebar-muted-weak: rgba(216, 229, 243, 0.40);
    --sidebar-action: rgba(255, 255, 255, 0.12);
    --sidebar-action-hover: rgba(255, 255, 255, 0.20);
}

[data-theme="dark"] {
    --bg: #0f172a;
    --bg-secondary: #111c2e;
    --bg-card: #162033;
    --bg-input: #0f172a;
    --bg-hover: #1f2b44;
    --text: #e5edf7;
    --text-secondary: #b8c4d6;
    --text-muted: #8290a6;
    --border: #273449;
    --border-light: #334155;
    --glass-bg: rgba(17, 28, 46, 0.84);
    --glass-border: rgba(255, 255, 255, 0.06);
    --msg-user: #17314f;
    --msg-ai: #111c2e;
    --scrollbar-bg: #111c2e;
    --scrollbar-thumb: #40506b;
    --sidebar-bg: #071426;
    --sidebar-text: #b8c6da;
    --sidebar-text-active: #ffffff;
    --sidebar-hover: rgba(255, 255, 255, 0.09);
    --sidebar-active: rgba(255, 255, 255, 0.14);
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-muted: rgba(184, 198, 218, 0.58);
    --sidebar-muted-weak: rgba(184, 198, 218, 0.38);
    --sidebar-action: rgba(255, 255, 255, 0.11);
    --sidebar-action-hover: rgba(255, 255, 255, 0.18);
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-light);
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ---------- App Layout ---------- */
.app {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* ---------- Sidebar ---------- */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition);
    z-index: 100;
    overflow: hidden;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--sidebar-border);
}

.sidebar-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    background: #fff;
    padding: 4px;
}

.sidebar-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--sidebar-text-active);
    line-height: 1.3;
}

.sidebar-version {
    font-size: 0.65rem;
    color: var(--sidebar-muted-weak);
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
}

.sidebar-new-chat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--sidebar-action);
    color: var(--sidebar-text-active);
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.84rem;
    transition: all var(--transition);
    margin-bottom: 10px;
    border: 1px solid var(--sidebar-border);
}

.sidebar-new-chat:hover {
    background: var(--sidebar-action-hover);
    color: var(--sidebar-text-active);
}

.nav-group {
    margin-bottom: 6px;
}

.nav-group-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--sidebar-muted-weak);
    padding: 8px 14px 4px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    color: var(--sidebar-text);
    font-size: 0.84rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-item.active {
    background: var(--sidebar-active);
    color: var(--sidebar-text-active);
    font-weight: 600;
}

.nav-conv {
    justify-content: space-between;
    font-weight: 400;
    font-size: 0.78rem;
}

.nav-conv-title {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-conv-del {
    opacity: 0;
    color: var(--sidebar-muted-weak);
    font-size: 1rem;
    padding: 2px 6px;
    border-radius: 4px;
    transition: all var(--transition);
}

.nav-conv:hover .nav-conv-del {
    opacity: 1;
}

.nav-conv-del:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    padding: 6px 8px;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
}

.sidebar-user:hover {
    background: var(--sidebar-hover);
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--sidebar-text-active);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-email {
    font-size: 0.6rem;
    color: var(--sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-logout {
    padding: 8px;
    border-radius: var(--radius-xs);
    color: var(--sidebar-muted);
    transition: all var(--transition);
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 99;
}

/* ---------- Main ---------- */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    background: var(--bg);
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 24px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    min-height: 54px;
}

.topbar-menu {
    display: none;
    padding: 8px;
    border-radius: var(--radius-xs);
    color: var(--text-secondary);
}

.topbar-menu:hover {
    background: var(--bg-hover);
}

.topbar-title h1 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
}

.main-body {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* ---------- Chat ---------- */
.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    padding: 0 24px;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Welcome */
.chat-welcome {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 20px;
    text-align: center;
}

.chat-welcome-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: contain;
    background: #fff;
    padding: 10px;
    box-shadow: var(--shadow-lg);
}

.chat-welcome h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
}

.chat-welcome p {
    color: var(--text-secondary);
    max-width: 440px;
    font-size: 0.88rem;
    line-height: 1.7;
}

.prompt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 580px;
    margin-top: 8px;
}

.prompt-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: all var(--transition);
}

.prompt-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 12px rgba(41, 128, 185, 0.1);
    transform: translateY(-1px);
}

.prompt-card-icon {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.prompt-card-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.prompt-card-desc {
    font-size: 0.73rem;
    color: var(--text-muted);
}

/* Messages */
.message {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius);
    animation: msgIn 0.25s ease;
}

@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    background: var(--msg-user);
    margin-left: 32px;
}

.message.assistant {
    background: var(--msg-ai);
}

.message-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 700;
}

.message.user .message-avatar {
    background: var(--primary);
    color: #fff;
}

.message.assistant .message-avatar {
    background: var(--accent);
    color: #fff;
}

.message-body {
    flex: 1;
    min-width: 0;
}

.message-content {
    font-size: 0.88rem;
    line-height: 1.7;
    word-wrap: break-word;
    color: var(--text);
}

.message-content h2, .message-content h3, .message-content h4 {
    margin: 10px 0 5px;
    color: var(--text);
}

.message-content strong {
    color: var(--text);
}

.message-content a {
    color: var(--accent);
    text-decoration: underline;
}

.message-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.message-actions {
    display: flex;
    gap: 4px;
}

.message-actions button {
    padding: 3px 7px;
    border-radius: 4px;
    color: var(--text-muted);
    font-size: 0.73rem;
    transition: all var(--transition);
}

.message-actions button:hover {
    background: var(--bg-hover);
    color: var(--text);
}

/* Code blocks */
.code-block {
    margin: 10px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #1e293b;
    border: 1px solid var(--border);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 14px;
    background: #263245;
    font-size: 0.73rem;
    color: #94a3b8;
}

.copy-btn {
    font-size: 0.7rem;
    color: #67b8e3;
    padding: 3px 10px;
    border-radius: 4px;
    transition: background var(--transition);
}

.copy-btn:hover {
    background: rgba(103, 184, 227, 0.15);
}

.code-block pre {
    padding: 14px;
    overflow-x: auto;
    font-size: 0.82rem;
    line-height: 1.6;
    color: #e6edf3;
}

.code-block code {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

.inline-code {
    background: #eef2f7;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.85em;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    color: var(--primary);
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 16px;
    border-radius: var(--radius);
    background: var(--msg-ai);
}

.typing-dot {
    width: 7px;
    height: 7px;
    background: var(--accent);
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.4;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Chat input */
.chat-input-wrapper {
    padding: 12px 0 20px;
    position: sticky;
    bottom: 0;
}

.chat-input-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 10px 14px;
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.chat-input-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.08);
}

#messageInput {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: var(--text);
    font-family: var(--font);
    font-size: 0.88rem;
    resize: none;
    max-height: 150px;
    min-height: 22px;
    line-height: 1.5;
}

#messageInput::placeholder {
    color: var(--text-muted);
}

.chat-send-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.chat-send-btn:hover {
    background: var(--primary-light);
}

.chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.chat-input-hint {
    text-align: center;
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* File attachment */
.chat-attach-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-muted);
    transition: all var(--transition);
}

.chat-attach-btn:hover {
    color: var(--accent);
    background: var(--bg-hover);
}

.chat-file-preview {
    padding: 8px 0 4px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
}

.file-preview-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.file-preview-img {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-size {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
}

.file-preview-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.2rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.file-preview-remove:hover {
    color: var(--danger);
    background: rgba(192, 57, 43, 0.08);
}

/* Message attachments */
.message-attachment {
    margin-top: 8px;
}

.message-attachment img {
    max-width: 320px;
    max-height: 240px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--transition);
}

.message-attachment img:hover {
    transform: scale(1.02);
}

.message-file-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-hover);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 500;
    transition: all var(--transition);
}

.message-file-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.message-file-link span {
    font-size: 1.1rem;
}

/* ---------- Dashboard ---------- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    padding: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px 20px;
    transition: all var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
}

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

.stat-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.stat-card-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text);
}

.stat-card-change {
    font-size: 0.73rem;
    color: var(--success);
    margin-top: 4px;
}

.recent-section {
    padding: 0 24px 24px;
}

.recent-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.recent-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
}

.recent-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    font-weight: 600;
    background: var(--bg-hover);
}

.recent-table td {
    padding: 10px 16px;
    font-size: 0.84rem;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

.recent-table tr:hover td {
    background: var(--bg-hover);
}

/* ---------- Login / Auth ---------- */
.auth-page {
    min-height: 100vh;
    display: flex;
    overflow: auto;
}

.auth-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #fff;
}

.auth-right {
    flex: 1;
    background: linear-gradient(160deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-right::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.04) 0%, transparent 50%);
}

.auth-right-content {
    text-align: center;
    color: #fff;
    position: relative;
    z-index: 1;
    max-width: 600px !important;
}

.auth-right-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.auth-right-content p {
    font-size: 0.95rem;
    opacity: 0.8;
    max-width: 340px;
    line-height: 1.7;
    margin: auto;
}

.auth-box {
    width: 100%;
    max-width: 380px;
}

.auth-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-header img {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    margin-bottom: 14px;
    background: #fff;
    padding: 6px;
    box-shadow: var(--shadow);
}

.auth-header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.auth-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.form-input {
    width: 100%;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.88rem;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(41, 128, 185, 0.08);
    background: var(--bg-card);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-light);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 16px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider span {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.btn-mygov {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 15px 20px;
    background: #fff;
    color: #1b3a5c;
    border: 2px solid #1b3a5c;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all var(--transition);
    cursor: pointer;
}

.btn-mygov:hover {
    background: #1b3a5c;
    color: #fff;
}

.btn-mygov svg {
    flex-shrink: 0;
}

.alert {
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.84rem;
    font-weight: 500;
}

.alert-error {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fee2e2;
}

.alert-success {
    background: #f0fdf4;
    color: var(--success);
    border: 1px solid #dcfce7;
}

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-primary {
    background: #e8f4fd;
    color: var(--accent);
}

.badge-success {
    background: #ecfdf5;
    color: var(--success);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.active {
        display: block;
    }

    .topbar-menu {
        display: flex;
    }

    .chat-container {
        padding: 0 16px;
    }

    .message.user {
        margin-left: 0;
    }

    .auth-right {
        display: none;
    }

    .auth-left {
        padding: 24px;
    }

    .dashboard-grid {
        padding: 16px;
        grid-template-columns: repeat(2, 1fr);
    }

    .recent-section {
        padding: 0 16px 16px;
    }
}

@media (max-width: 480px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .prompt-grid {
        grid-template-columns: 1fr;
    }
}

.login-btn {
    margin-top: 10px;
}

.btn-mygov:hover img {
    filter: brightness(0) invert(1);
}

.btn-mygov:hover svg {
    stroke: #fff;
}

.pagination {
    margin: auto;
    display: flex;
    justify-content: center;
}

.pagination .page-link {
    color: #fff !important;
    background-color: #273449 !important;
    width: 33px !important;
    border-color: #273449 !important;
}

.pagination .active span {
    background-color: #1b3a5c !important;
    border-color: #273449 !important;
    color: #fff !important;
}

.auth-right-bottom {
    width: 100%;
    color: #fff;
    position: absolute;
    bottom: 0;
}

.auth-right-bottom .copyright {
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

.auth-right-bottom .footer-info {
    font-size: 14px;
    text-align: center;
}

.rinn-logo {
    filter: brightness(0) invert(1);
}

.rinn-name {
    margin-bottom: 15px !important;
    margin-top: 10px !important;
}

.platform-name {
    margin-bottom: 30px !important;
}

.footer-hr {
    opacity: 0.5;
}

.bottom-info {
    padding: 20px;
    /*display: flex;*/
    /*justify-content: center;*/
}
