/*
 * This file is part of Moodle - https://moodle.org/
 *
 * Moodle is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Moodle is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Moodle.  If not, see <https://www.gnu.org/licenses/>.
 *
 * @package    local_academic_ticket_system
 * @copyright  2025 learn-ix support@learn-ix.com
 * @license    https://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
 */

/* local/academic_ticket_system/styles/style.css */

/* Fallback variables (Will be overridden by your PHP inline styles) */
:root {
    --ats-primary: #2563eb;
    --ats-secondary: #4f46e5;
    --ats-primary-light: #2563eb33;
}
.bg-grad-primary { background: linear-gradient(135deg, var(--ats-primary) 0%, var(--ats-secondary) 100%); }
.text-brand { color: var(--ats-primary) !important; }
.text-brand-secondary { color: var(--ats-secondary) !important; }
.bg-brand { background-color: var(--ats-primary) !important; }
.bg-brand-light { background-color: var(--ats-primary-light) !important; }
.border-brand { border-color: var(--ats-primary) !important; }
.border-brand-light { border-color: var(--ats-primary-light) !important; }
.hover-text-brand:hover { color: var(--ats-primary) !important; }
.hover-border-brand:hover { border-color: var(--ats-primary) !important; }
.group:hover .group-hover-text-brand { color: var(--ats-primary) !important; }
.focus-ring-brand:focus { box-shadow: 0 0 0 4px var(--ats-primary-light) !important; }
.shadow-brand { box-shadow: 0 10px 25px var(--ats-primary-light) !important; }
.ats-container .bg-primary-solid { background-color: var(--ats-primary) !important; }
.ats-container .bg-secondary-solid { background-color: var(--ats-secondary) !important; }
.ats-container .text-primary-solid { color: var(--ats-primary) !important; }
.ats-container .text-secondary-solid { color: var(--ats-secondary) !important; }
.ats-container .btn-primary-solid { background-color: var(--ats-primary) !important; color: white !important; transition: all 0.3s ease; border: none; }
.ats-container .btn-primary-solid:hover { background-color: var(--ats-secondary) !important; transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.ats-container .btn-secondary-solid { background-color: var(--ats-secondary) !important; color: white !important; transition: all 0.3s ease; border: none; }
.ats-container .btn-secondary-solid:hover { background-color: var(--ats-primary) !important; transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.ats-container .hover-text-secondary:hover { color: var(--ats-secondary) !important; }
.ats-container .group:hover .group-hover-text-secondary { color: var(--ats-secondary) !important; }
.ats-container .hover-border-secondary:hover { border-color: var(--ats-secondary) !important; }
.ats-container { background-color: #f0f2f5; min-height: 100vh; direction: ltr; position: relative; }
.ats-container .hidden { display: none !important; }
.ats-container #presence-container { position: relative; z-index: 100; display: block; }
.ats-container .glass-panel { background: rgba(255, 255, 255, 0.75); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.6); box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15); transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; }
.ats-container .glass-card { background: rgba(255, 255, 255, 0.5); backdrop-filter: blur(12px); border: 1px solid rgba(255, 255, 255, 0.4); transition: all 0.3s ease; }
.ats-container .glass-card:hover { background: rgba(255, 255, 255, 0.9); transform: translateY(-2px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.ats-container .glass-input { background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.6); backdrop-filter: blur(4px); border-radius: 1rem; padding: 1rem 1.25rem; width: 100%; transition: all 0.3s ease; color: #1f2937; font-size: 1rem; }
.ats-container .glass-input:focus { background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 4px var(--ats-primary-light); outline: none; border-color: var(--ats-primary); }
.ats-container .glass-select { appearance: none; background-color: rgba(255, 255, 255, 0.5); background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpath d='M6 9l6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 1rem center; background-size: 1rem; border: 1px solid rgba(255,255,255,0.6); padding: 0.75rem 1rem; border-radius: 1rem; width: 100%; transition: all 0.3s; backdrop-filter: blur(4px); }
.ats-container .glass-select:focus { outline: none; box-shadow: 0 0 0 3px var(--ats-primary-light); background-color: rgba(255, 255, 255, 0.9); }
.ats-container .rating-group { display: inline-flex; flex-direction: row-reverse; justify-content: center; gap: 0.5rem; }
.ats-container .rating-group input { display: none !important; }
.ats-container .rating-group label { cursor: pointer; color: #d1d5db; font-size: 2.5rem; transition: color 0.2s ease-in-out; }
.ats-container .rating-group input:checked ~ label { color: #f59e0b; }
.ats-container .rating-group label:hover, .ats-container .rating-group label:hover ~ label { color: #fbbf24; }
.ats-container .presence-wrapper { display: inline-flex; align-items: center; background: #ffffff; border: 1px solid #e2e8f0; padding: 6px 16px; border-radius: 9999px; box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); transition: all 0.3s ease; position: relative; z-index: 999; }
.ats-container .presence-indicator { display: flex; align-items: center; gap: 8px; margin-right: 12px; }
.ats-container .pulsing-dot { position: relative; width: 10px; height: 10px; background-color: var(--ats-primary); border-radius: 50%; }
.ats-container .presence-text { font-size: 0.75rem; font-weight: 800; color: #0f172a; text-transform: uppercase; letter-spacing: 0.05em; }
.ats-container .presence-avatars { display: flex; flex-direction: row-reverse; }
.ats-container .presence-user { position: relative; margin-left: -12px; transition: transform 0.2s ease, z-index 0.2s; border-radius: 50%; z-index: 1; cursor: help; }
.ats-container .presence-user:hover { transform: translateY(-5px) scale(1.1); z-index: 10; }
.ats-container .presence-user img { width: 34px; height: 34px; border-radius: 50%; border: 2px solid #ffffff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); object-fit: cover; }
.ats-container .presence-user::before { content: attr(title); position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(-5px); background: #1e293b; color: white; padding: 4px 8px; border-radius: 6px; font-size: 10px; font-weight: 700; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s; margin-bottom: 5px; }
.ats-container .presence-user:hover::before { opacity: 1; }
.ats-container .presence-user.is-owner { z-index: 20 !important; }
.ats-container .presence-user.is-owner img { border: 2px solid var(--ats-primary); box-shadow: 0 0 0 2px var(--ats-primary-light); }
.ats-container .presence-user.is-owner::after { content: '\f007'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; bottom: -2px; right: -2px; background: var(--ats-primary); color: white; font-size: 8px; width: 14px; height: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1px solid white; }
.ats-container .btn-gradient { border: none; color: white; font-weight: 700; border-radius: 1rem; padding: 0.75rem 1.5rem; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; font-size: 1.1rem; }
.ats-container .btn-gradient:hover { transform: translateY(-2px); box-shadow: 0 10px 25px var(--ats-primary-light); }
.ats-container .bg-grad-blue { background: linear-gradient(135deg, var(--ats-primary) 0%, var(--ats-secondary) 100%); }
.ats-container .bg-grad-purple { background: linear-gradient(135deg, var(--ats-secondary) 0%, var(--ats-primary) 100%); }
.ats-container .bg-grad-green { background: linear-gradient(135deg, var(--ats-primary) 0%, var(--ats-secondary) 100%); }
.ats-container .animated-bg { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background: radial-gradient(at 0% 0%, hsla(253,16%,7%,1) 0, transparent 50%), radial-gradient(at 50% 0%, hsla(225,39%,30%,1) 0, transparent 50%), radial-gradient(at 100% 0%, hsla(339,49%,30%,1) 0, transparent 50%); background-size: 200% 200%; }
.ats-container .blob { position: absolute; filter: blur(80px); z-index: 0; opacity: 0.6; }
.ats-container .blob-1 { top: -10%; left: -10%; width: 400px; height: 400px; background: var(--ats-primary); }
.ats-container .blob-2 { bottom: -10%; right: -10%; width: 500px; height: 500px; background: var(--ats-secondary); }
.ats-container .blob-3 { top: 30%; left: 40%; width: 300px; height: 300px; background: var(--ats-primary-light); }
.ats-container .animate-bounce-slight { animation: none !important; }
.ats-container .reply-card { padding: 1.5rem; border-radius: 16px; margin-bottom: 1.5rem; position: relative; transition: all 0.2s ease-in-out; border: 1px solid transparent; }
.ats-container .reply-card-user { background-color: #ffffff; border-left: 5px solid #f59e0b; border-right: 1px solid rgba(245, 158, 11, 0.1); border-top: 1px solid rgba(245, 158, 11, 0.1); border-bottom: 1px solid rgba(245, 158, 11, 0.1); box-shadow: 0 4px 6px rgba(245, 158, 11, 0.02); }
.ats-container .reply-card-admin { background-color: #eff6ff; border-left: 5px solid var(--ats-primary); border-right: 1px solid var(--ats-primary-light); border-top: 1px solid var(--ats-primary-light); border-bottom: 1px solid var(--ats-primary-light); box-shadow: 0 4px 6px var(--ats-primary-light); margin-left: 2rem; margin-right: 0; }
.ats-container .reply-card-admin .font-bold.text-gray-800 { color: var(--ats-secondary); }
.ats-container .reply-card-user .font-bold.text-gray-800 { color: #92400e; }
.ats-container .reply-card:hover { transform: translateY(-2px); box-shadow: 0 8px 15px rgba(0,0,0,0.05); }
.ats-container .upload-zone { border: 2px dashed #cbd5e1; background: rgba(248, 250, 252, 0.5); border-radius: 1.5rem; padding: 2.5rem; text-align: center; cursor: pointer; transition: all 0.3s ease; position: relative; }
.ats-container .upload-zone:hover { border-color: var(--ats-primary); background: rgba(239, 246, 255, 0.6); transform: scale(1.01); }
.ats-container .upload-zone.active { border-color: var(--ats-primary); background: rgba(236, 253, 245, 0.6); }
.ats-container .file-upload-zone { position: relative; border: 2px dashed #d1d5db; background: rgba(249, 250, 251, 0.5); border-radius: 1.5rem; cursor: pointer; overflow: hidden; }
.ats-container .file-upload-zone:hover { border-color: var(--ats-primary); background: rgba(255, 255, 255, 0.8); }
.ats-container .file-upload-zone.files-selected { border-color: var(--ats-primary); background: rgba(16, 185, 129, 0.03); }
.ats-container .upload-icon-wrapper { width: 60px; height: 60px; background: #e0e7ff; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; transition: all 0.3s; }
.ats-container .files-selected .upload-icon-wrapper { background: var(--ats-primary-light); color: var(--ats-primary); }
.ats-container .file-item { background: white; border: 1px solid #e5e7eb; padding: 10px 15px; border-radius: 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); }
.ats-container .file-item i { color: var(--ats-primary); font-size: 1.2rem; }
.ats-container .file-name { font-size: 0.85rem; font-weight: 700; color: #374151; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-wrapper { background-color: #f0f2f5; overflow-x: hidden; position: relative; min-height: 100vh; }
.ats-wrapper .form-label { display: block; font-weight: 700; color: #4b5563; margin-bottom: 0.5rem; font-size: 0.95rem; }
.ats-container .search-input { background: rgba(255, 255, 255, 0.5); border: 1px solid rgba(255, 255, 255, 0.8); backdrop-filter: blur(4px); transition: all 0.3s ease; }
.ats-container .search-input:focus { background: rgba(255, 255, 255, 0.9); box-shadow: 0 0 0 4px var(--ats-primary-light); outline: none; }
.ats-container .btn-action { position: relative; overflow: hidden; z-index: 1; border: none; background-size: 200% auto; transition: 0.5s; }
.ats-container .btn-action:hover { background-position: right center; box-shadow: 0 10px 20px rgba(0,0,0,0.2); }
.ats-container .custom-table th { background: rgba(243, 244, 246, 0.8); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.75rem; color: #4b5563; padding: 1rem 1.5rem; }
.ats-container .custom-table tr { transition: all 0.2s ease; border-bottom: 1px solid rgba(0,0,0,0.03); }
.ats-container .custom-table tr:hover { background-color: rgba(255, 255, 255, 0.6); transform: scale(1.005); }
.ats-container .custom-table td { vertical-align: middle; padding: 1rem 1.5rem; }
.ats-container .badge-pill { padding: 0.35em 0.8em; border-radius: 50rem; font-weight: 700; font-size: 0.75rem; letter-spacing: 0.5px; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
[lang="ar"] .ats-container, [lang="ar"] .ats-wrapper { direction: rtl; }
[lang="ar"] .ats-container .container { direction: rtl; }
[lang="ar"] .ats-container .text-right { text-align: right; }
[lang="ar"] .ats-container .text-left { text-align: left; }
[lang="ar"] .ats-container .glass-select { background-position: left 1rem center; }
[lang="ar"] .ats-container .fa-arrow-left { transform: rotate(180deg); }
[lang="ar"] .ats-container .presence-user { margin-left: 0; margin-right: -12px; }
[lang="ar"] .ats-container .presence-indicator { margin-right: 0; margin-left: 12px; }
[lang="ar"] .ats-container .reply-card-admin { margin-left: 0; margin-right: 2rem; border-left: none; border-right: 6px solid var(--ats-primary); }
[lang="ar"] .ats-container .reply-card-user { border-left: none; border-right: 6px solid #f59e0b; }
[lang="ar"] .ats-container .search-input { padding-left: 1rem; padding-right: 2.5rem; }
.ats-audio-player { height: 38px; border-radius: 8px; outline: none; transition: all 0.3s ease; }
.ats-audio-player::-webkit-media-controls-panel { background-color: rgba(255, 255, 255, 0.7); }
.ats-audio-player::-webkit-media-controls-enclosure { border-radius: 8px; }
ats-error-page { display: flex; justify-content: center; align-content: center; align-items: center; }
.ats-image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}
.ats-image-modal.active { opacity: 1; visibility: visible; }
.ats-image-modal img { max-width: 90vw; max-height: 90vh; border-radius: 12px; transform: scale(0.95); transition: transform 0.3s ease; }
.ats-image-modal.active img { transform: scale(1); }
.ats-close-btn { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; transition: transform 0.2s; }
.ats-close-btn:hover { transform: scale(1.2); color: #cbd5e1; }
.ats-download-btn { position: absolute; bottom: 30px; left: 30px; color: white; font-size: 30px; text-decoration: none; transition: all 0.3s ease; z-index: 10000; }
.ats-download-btn:hover { transform: scale(1.2); color: var(--ats-primary); }
.ats-error-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.glass-error { background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); border: 1px solid var(--ats-primary-light); box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); border-radius: 24px; padding: 3rem; text-align: center; max-width: 450px; width: 100%; }
.icon-box { width: 80px; height: 80px; background: var(--ats-primary-light); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.btn-create-ticket { background-color: var(--ats-primary); transition: background-color 0.3s ease; }
.btn-create-ticket:hover { background-color: var(--ats-secondary) !important; }
.ats-footer { margin-top: 3rem; padding: 2rem 0; text-align: center; border-top: 1px solid var(--ats-border-color); }
.ats-footer p { color: #6b7280; font-weight: 500; font-size: 0.875rem; }
.ats-footer a { color: var(--ats-primary); font-weight: 700; text-decoration: none; transition: color 0.3s ease; }
.ats-footer a:hover { color: var(--ats-secondary); }
.ats-tooltip-wrapper { position: relative; display: inline-block; }
.ats-tooltip-text { visibility: hidden; width: 160px; background-color: #1e293b; color: #fff; text-align: center; border-radius: 8px; padding: 6px; position: absolute; z-index: 1000; bottom: 125%; left: 50%; transform: translateX(-50%); font-size: 0.75rem; font-weight: 600; opacity: 0; transition: opacity 0.3s; pointer-events: none; }
.group:hover .ats-tooltip-text { visibility: visible; opacity: 1; }
.glass-panel { padding: 1.5rem !important; }
.ats-table-container th, .ats-table-container td { padding: 0.75rem 1rem !important; }
.ats-table-container { gap: 0.5rem !important; }
.ats-pagination-btn {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    color: #4b5563 !important;
    transition: all 0.3s ease !important;
}

.ats-pagination-btn:hover {
    background-color: var(--ats-secondary) !important;
    color: #ffffff !important;
    border-color: var(--ats-secondary) !important;
}

.ats-pagination-btn.active {
    background-color: var(--ats-primary) !important;
    color: #ffffff !important;
    border-color: var(--ats-primary) !important;
}
.ats-action-icon {
    background-color: var(--ats-primary) !important;
    color: var(--ats-secondary) !important;
    transition: all 0.3s ease !important;
}

.ats-action-icon:hover {
    background-color: var(--ats-secondary) !important;
    color: #ffffff !important;
}
/* ===== ATS dashboard redesign: index page ===== */
.ats-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.ats-hero-card {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 2rem;
    padding: 2.25rem 2rem;
    margin-bottom: 1.5rem;
    border-radius: 30px;
    background: linear-gradient(135deg, #f6f9ff 0%, #eef4ff 55%, #e8f0ff 100%);
    border: 1px solid #e3ebf7;
    box-shadow: 0 14px 40px rgba(15, 23, 42, 0.07);
    overflow: hidden;
    position: relative;
}

.ats-hero-card::after {
    content: '';
    position: absolute;
    width: 320px;
    height: 320px;
    right: -120px;
    top: -120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(37,99,235,0.14) 0%, rgba(37,99,235,0) 72%);
}

.ats-hero-copy,
.ats-hero-aside {
    position: relative;
    z-index: 1;
}

.ats-hero-copy {
    flex: 1 1 65%;
}

.ats-kicker {
    display: inline-block;
    margin-bottom: 0.9rem;
    color: #2563eb;
    font-weight: 800;
    letter-spacing: 0.28em;
    font-size: 0.78rem;
}

.ats-hero-title {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 3.5vw, 3.2rem);
    line-height: 1.05;
    color: #0f172a;
    font-weight: 900;
}

.ats-hero-text {
    margin: 0;
    max-width: 780px;
    color: #475569;
    font-size: 1.08rem;
    line-height: 1.7;
}

.ats-hero-aside {
    min-width: 290px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    text-align: right;
}

.ats-campus-note {
    color: #36538a;
    font-style: italic;
    font-size: 1.6rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    transform: rotate(-4deg);
    opacity: 0.9;
}

.ats-campus-shape {
    width: 230px;
    height: 130px;
    border-radius: 24px 24px 0 0;
    position: relative;
    background: linear-gradient(180deg, rgba(148,163,184,0.22), rgba(148,163,184,0.08));
    clip-path: polygon(8% 100%, 18% 15%, 76% 0, 100% 100%);
    opacity: 0.75;
}

.ats-campus-shape::before,
.ats-campus-shape::after {
    content: '';
    position: absolute;
    bottom: 0;
    background: rgba(148, 163, 184, 0.25);
}

.ats-campus-shape::before {
    left: 20px;
    width: 55px;
    height: 90px;
}

.ats-campus-shape::after {
    left: 95px;
    width: 70px;
    height: 115px;
}

.ats-welcome-card,
.ats-panel,
.ats-stat-card {
    background: #ffffff;
    border: 1px solid #e5edf7;
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.06);
}

.ats-welcome-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    border-radius: 28px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(245,249,255,0.98) 100%);
}

.ats-welcome-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1 1 auto;
}

.ats-welcome-copy h2,
.ats-panel-heading h3,
.ats-section-heading h3 {
    margin: 0;
    color: #0f172a;
    font-weight: 800;
}

.ats-welcome-copy h2 {
    font-size: 2rem;
    margin-bottom: 0.35rem;
}

.ats-welcome-copy p,
.ats-panel-heading p,
.ats-section-heading p,
.ats-pagination-text,
.ats-ticket-date,
.ats-footer p {
    color: #64748b;
}

.ats-welcome-copy p,
.ats-panel-heading p,
.ats-section-heading p {
    margin: 0;
}

.ats-micro-label {
    display: inline-block;
    margin-bottom: 0.35rem;
    font-weight: 800;
    letter-spacing: 0.28em;
    color: #3b82f6;
    font-size: 0.85rem;
}

.ats-icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 22px;
    flex-shrink: 0;
}

.ats-icon-box--primary {
    width: 98px;
    height: 98px;
    background: linear-gradient(180deg, #eff6ff 0%, #dbeafe 100%);
    color: var(--ats-primary);
    font-size: 2.6rem;
}

.ats-icon-box--soft {
    width: 72px;
    height: 72px;
    background: #eff6ff;
    color: var(--ats-primary);
    font-size: 1.9rem;
}

.ats-icon-box--small {
    width: 54px;
    height: 54px;
    background: #eff6ff;
    color: var(--ats-primary);
    font-size: 1.25rem;
}

.ats-welcome-year {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 280px;
    padding-left: 1.5rem;
    border-left: 1px solid #e8eef8;
}

.ats-year-label {
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 0.15rem;
}

.ats-year-value {
    font-size: 3rem;
    line-height: 1;
    font-weight: 900;
    color: var(--ats-primary);
}

.ats-year-pill {
    display: inline-flex;
    align-items: center;
    margin-top: 0.6rem;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    background: #eff6ff;
    color: #3160c9;
    font-size: 0.9rem;
    font-weight: 600;
}

.ats-stats-section {
    margin-bottom: 1.5rem;
}

.ats-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 1rem;
    padding: 0 0.1rem;
}

.ats-section-heading h3 {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.ats-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.ats-stat-card {
    border-radius: 24px;
    padding: 1.25rem;
}

.ats-stat-card--featured {
    background: linear-gradient(145deg, #ffffff 0%, #f5f9ff 100%);
}

.ats-stat-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ats-stat-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    font-weight: 800;
    margin-bottom: 0.45rem;
}

.ats-stat-number,
.ats-stat-title {
    display: block;
    color: #0f172a;
    font-weight: 900;
}

.ats-stat-number {
    font-size: 2.5rem;
    line-height: 1;
}

.ats-stat-title {
    font-size: 1.15rem;
    line-height: 1.35;
}

.ats-stat-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ats-primary), var(--ats-secondary));
    color: #ffffff;
    font-size: 1.1rem;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.18);
}

.ats-stat-icon--light {
    background: #eff6ff;
    color: var(--ats-primary);
    box-shadow: none;
}

.ats-stat-split {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.ats-stat-split span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: #f8fafc;
    color: #475569;
    font-size: 0.88rem;
    font-weight: 700;
}

.ats-stat-split--compact span {
    background: #eff6ff;
    color: #3056b7;
}

.ats-panel {
    border-radius: 30px;
    padding: 1.5rem;
}

.ats-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.ats-panel-heading {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ats-panel-heading h3 {
    font-size: 1.7rem;
    margin-bottom: 0.25rem;
}

.ats-panel-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.ats-search-wrap {
    position: relative;
    min-width: 360px;
    flex: 1 1 380px;
}

.ats-search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.ats-search-input {
    width: 100%;
    height: 52px;
    border-radius: 16px;
    border: 1px solid #d8e4f2;
    background: #f8fbff;
    padding: 0 1rem 0 2.8rem;
    color: #1e293b;
    font-weight: 500;
    outline: none;
    transition: all 0.25s ease;
}

.ats-search-input:focus {
    border-color: var(--ats-primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

.ats-primary-btn,
.ats-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    height: 52px;
    border-radius: 16px;
    font-weight: 800;
    transition: all 0.25s ease;
    border: none;
}

.ats-primary-btn {
    padding: 0 1.35rem;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--ats-primary), #1d4ed8);
    box-shadow: 0 12px 24px rgba(37,99,235,0.22);
}

.ats-primary-btn:hover {
    color: #ffffff !important;
    transform: translateY(-2px);
    box-shadow: 0 16px 28px rgba(37,99,235,0.28);
}

.ats-secondary-btn {
    width: 52px;
    color: var(--ats-primary) !important;
    background: #eff6ff;
}

.ats-secondary-btn:hover {
    background: #dbeafe;
    transform: translateY(-2px);
}

.ats-table-card {
    border: 1px solid #e8eef7;
    border-radius: 22px;
    background: #ffffff;
    overflow: hidden;
}

.ats-table-responsive {
    overflow-x: auto;
}

.ats-tickets-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.ats-tickets-table thead th {
    padding: 1rem 1.1rem;
    background: #f7faff;
    border-bottom: 1px solid #e8eef7;
    color: #334155;
    font-size: 0.88rem;
    text-transform: none;
    font-weight: 800;
    text-align: left;
    white-space: nowrap;
}

.ats-tickets-table tbody td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #eef3f8;
    vertical-align: middle;
    color: #334155;
}

.ats-tickets-table tbody tr:hover {
    background: #f8fbff;
}

.ats-ticket-id {
    display: inline-flex;
    padding: 0.32rem 0.7rem;
    border-radius: 999px;
    background: #eff6ff;
    color: var(--ats-primary);
    font-weight: 800;
    font-size: 0.85rem;
}

.ats-ticket-title-wrap {
    min-width: 220px;
}

.ats-ticket-title {
    color: #0f172a !important;
    font-weight: 700;
}

.ats-ticket-title:hover {
    color: var(--ats-primary) !important;
}

.ats-ticket-date {
    margin-top: 0.35rem;
    font-size: 0.85rem;
}

.ats-status-badge,
.ats-category-badge,
.ats-priority-badge,
.ats-assignment-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.1;
}

.ats-category-badge {
    background: #eff6ff;
    color: #2757b8;
}

.ats-priority-badge {
    background: #f8fafc;
    color: #475569;
    text-transform: uppercase;
}

.ats-assignment-badge {
    background: #ecfdf5;
    color: #047857;
}

.ats-empty-dash {
    color: #cbd5e1;
    font-weight: 700;
}

.ats-action-link {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--ats-primary) !important;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.ats-action-link:hover {
    background: var(--ats-primary);
    color: #ffffff !important;
    transform: translateY(-1px);
}

.ats-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3.5rem 1.5rem 4rem;
}

.ats-empty-illustration {
    position: relative;
    width: 150px;
    height: 120px;
    margin-bottom: 1rem;
}

.ats-empty-blob {
    position: absolute;
    inset: 12px 8px 0 8px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(59,130,246,0.22) 0%, rgba(59,130,246,0.06) 60%, rgba(59,130,246,0) 100%);
}

.ats-empty-box {
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 82px;
    height: 82px;
    border-radius: 24px;
    background: linear-gradient(180deg, #e0edff, #b9d2ff);
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 14px 28px rgba(37, 99, 235, 0.18);
}

.ats-empty-state h4 {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    color: #0f172a;
    font-weight: 900;
}

.ats-empty-state p {
    max-width: 680px;
    color: #64748b;
    margin: 0 0 1.4rem;
    font-size: 1rem;
}

.ats-pagination-bar {
    margin-top: 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0.25rem 0;
}

.ats-pagination-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.ats-page-btn {
    min-width: 42px;
    height: 42px;
    padding: 0 0.85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid #dce6f2;
    color: #475569 !important;
    text-decoration: none !important;
    font-weight: 700;
    transition: all 0.2s ease;
}

.ats-page-btn:hover,
.ats-page-btn.active {
    background: var(--ats-primary);
    border-color: var(--ats-primary);
    color: #ffffff !important;
}

.ats-footer--enhanced {
    margin-top: 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 992px) {
    .ats-hero-card,
    .ats-welcome-card,
    .ats-panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ats-hero-aside {
        align-items: flex-start;
        text-align: left;
        min-width: 0;
    }

    .ats-welcome-year {
        border-left: 0;
        padding-left: 0;
        padding-top: 1rem;
        border-top: 1px solid #e8eef8;
        width: 100%;
    }

    .ats-panel-toolbar {
        width: 100%;
        justify-content: stretch;
    }

    .ats-search-wrap {
        min-width: 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .ats-shell {
        padding: 1rem 0.85rem 2rem;
    }

    .ats-hero-card,
    .ats-welcome-card,
    .ats-panel {
        border-radius: 22px;
        padding: 1.2rem;
    }

    .ats-hero-title {
        font-size: 2rem;
    }

    .ats-welcome-main {
        align-items: flex-start;
    }

    .ats-welcome-copy h2,
    .ats-empty-state h4 {
        font-size: 1.5rem;
    }

    .ats-year-value {
        font-size: 2.3rem;
    }

    .ats-primary-btn,
    .ats-secondary-btn,
    .ats-search-input {
        width: 100%;
    }

    .ats-secondary-btn {
        max-width: none;
    }
}


/* Page integration for the redesigned index. Loaded only by this local plugin page. */
#page-header { display: none !important; }
.ats-container { border-radius: 0; }
@media (min-width: 1200px) {
    .ats-shell { padding-top: 1.25rem; }
}

/* ===== ATS UI FINAL / 2026-09-18 =====
 * Index dashboard is intentionally independent from Tailwind output.css.
 * All rules are plugin/page scoped to avoid affecting Moodle core/theme UI.
 */
body#page-local-academic_ticket_system-index {
    background: #f3f6fb;
}

body#page-local-academic_ticket_system-index #page.drawers .main-inner,
body#page-local-academic_ticket_system-index .main-inner {
    max-width: 1500px !important;
    width: calc(100% - 32px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
}

body#page-local-academic_ticket_system-index #page-content,
body#page-local-academic_ticket_system-index [role="main"] {
    max-width: none !important;
}

body#page-local-academic_ticket_system-index #page-header {
    display: none !important;
}

body#page-local-academic_ticket_system-index .ats-container {
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.055), transparent 26%),
        radial-gradient(circle at 92% 12%, rgba(79, 70, 229, 0.045), transparent 24%),
        #f3f6fb;
    color: #0f172a;
    overflow: hidden;
}

body#page-local-academic_ticket_system-index .ats-shell {
    max-width: 1420px;
    padding: 1.4rem 1rem 2.5rem;
}

body#page-local-academic_ticket_system-index .ats-hero-card {
    min-height: 188px;
    padding: 1.8rem 2rem;
    margin-bottom: 1.1rem;
    border-radius: 26px;
    align-items: center;
    background:
        linear-gradient(110deg, rgba(247,250,255,0.99) 0%, rgba(238,245,255,0.98) 60%, rgba(226,236,255,0.98) 100%);
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.07);
}

body#page-local-academic_ticket_system-index .ats-hero-copy {
    flex-basis: 72%;
}

body#page-local-academic_ticket_system-index .ats-kicker {
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
}

body#page-local-academic_ticket_system-index .ats-hero-title {
    margin: 0 0 0.55rem;
    font-size: clamp(2.25rem, 3.3vw, 3.65rem);
    line-height: 1.04;
    letter-spacing: -0.035em;
    color: #0b1935;
    font-weight: 900;
}

body#page-local-academic_ticket_system-index .ats-hero-text {
    max-width: 820px;
    font-size: 1.02rem;
    line-height: 1.58;
}

body#page-local-academic_ticket_system-index .ats-hero-aside {
    min-width: 245px;
}

body#page-local-academic_ticket_system-index .ats-campus-note {
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

body#page-local-academic_ticket_system-index .ats-campus-shape {
    width: 190px;
    height: 92px;
}

body#page-local-academic_ticket_system-index .ats-welcome-card {
    min-height: 132px;
    padding: 1.35rem 1.6rem;
    margin-bottom: 1.25rem;
    border-radius: 24px;
}

body#page-local-academic_ticket_system-index .ats-welcome-copy h2 {
    font-size: clamp(1.45rem, 2vw, 2rem);
    line-height: 1.18;
}

body#page-local-academic_ticket_system-index .ats-icon-box--primary {
    width: 82px;
    height: 82px;
    border-radius: 20px;
    font-size: 2.15rem;
}

body#page-local-academic_ticket_system-index .ats-welcome-year {
    min-width: 320px;
}

body#page-local-academic_ticket_system-index .ats-year-value {
    font-size: 2.65rem;
}

body#page-local-academic_ticket_system-index .ats-stats-section {
    margin-bottom: 1.25rem;
}

body#page-local-academic_ticket_system-index .ats-section-heading {
    margin-bottom: 0.8rem;
}

body#page-local-academic_ticket_system-index .ats-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.9rem;
}

body#page-local-academic_ticket_system-index .ats-stat-card {
    padding: 1.1rem 1.25rem;
    border-radius: 20px;
}

body#page-local-academic_ticket_system-index .ats-ticket-panel {
    padding: 1.35rem;
    border-radius: 26px;
}

body#page-local-academic_ticket_system-index .ats-panel-header {
    align-items: flex-end;
    margin-bottom: 1rem;
}

body#page-local-academic_ticket_system-index .ats-panel-heading {
    min-width: 320px;
}

body#page-local-academic_ticket_system-index .ats-panel-heading h3 {
    font-size: 1.6rem;
}

body#page-local-academic_ticket_system-index .ats-panel-toolbar {
    flex: 1 1 620px;
    flex-wrap: nowrap;
}

body#page-local-academic_ticket_system-index .ats-search-wrap {
    flex: 1 1 420px;
    min-width: 300px;
}

body#page-local-academic_ticket_system-index .ats-primary-btn,
body#page-local-academic_ticket_system-index .ats-secondary-btn {
    min-height: 50px;
    white-space: nowrap;
}

body#page-local-academic_ticket_system-index .ats-secondary-btn--labeled {
    width: auto;
    min-width: 150px;
    padding: 0 1rem;
    gap: 0.5rem;
    color: #244da8 !important;
    border: 1px solid #d8e6ff;
    background: #f1f6ff;
}

body#page-local-academic_ticket_system-index .ats-secondary-btn--labeled:hover {
    background: #e5efff;
    border-color: #c4d8ff;
}

body#page-local-academic_ticket_system-index .ats-table-card {
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.03);
}

body#page-local-academic_ticket_system-index .ats-tickets-table {
    min-width: 980px;
}

body#page-local-academic_ticket_system-index .ats-tickets-table thead th {
    padding: 0.9rem 1rem;
    font-size: 0.82rem;
    background: #f5f8fd;
    color: #26364f;
}

body#page-local-academic_ticket_system-index .ats-tickets-table tbody td {
    padding: 0.95rem 1rem;
}

body#page-local-academic_ticket_system-index .ats-status-badge {
    border: 1px solid transparent;
}

body#page-local-academic_ticket_system-index .ats-status--neutral {
    background: #f1f5f9;
    color: #475569;
    border-color: #e2e8f0;
}

body#page-local-academic_ticket_system-index .ats-status--open {
    background: #eaf2ff;
    color: #1d4ed8;
    border-color: #d7e6ff;
}

body#page-local-academic_ticket_system-index .ats-status--closed {
    background: #f0fdf4;
    color: #15803d;
    border-color: #dcfce7;
}

body#page-local-academic_ticket_system-index .ats-status--admin {
    background: #f3e8ff;
    color: #7e22ce;
    border-color: #ead6ff;
}

body#page-local-academic_ticket_system-index .ats-status--student {
    background: #fff7ed;
    color: #c2410c;
    border-color: #ffedd5;
}

body#page-local-academic_ticket_system-index .ats-status--progress {
    background: #eef2ff;
    color: #4338ca;
    border-color: #e0e7ff;
}

body#page-local-academic_ticket_system-index .ats-priority-badge {
    min-width: 62px;
    background: #f1f5f9;
    color: #334155;
}

body#page-local-academic_ticket_system-index .ats-action-link {
    box-shadow: inset 0 0 0 1px rgba(37,99,235,0.07);
}

body#page-local-academic_ticket_system-index .ats-empty-state {
    min-height: 330px;
    padding: 2.75rem 1.5rem 3.25rem;
}

body#page-local-academic_ticket_system-index .ats-footer--enhanced {
    margin-top: 1.35rem;
    padding: 1.35rem 0 0.25rem;
}

@media (max-width: 1200px) {
    body#page-local-academic_ticket_system-index .ats-panel-header {
        align-items: stretch;
        flex-direction: column;
    }

    body#page-local-academic_ticket_system-index .ats-panel-toolbar {
        flex-basis: auto;
        width: 100%;
    }
}

@media (max-width: 900px) {
    body#page-local-academic_ticket_system-index #page.drawers .main-inner,
    body#page-local-academic_ticket_system-index .main-inner {
        width: calc(100% - 18px) !important;
    }

    body#page-local-academic_ticket_system-index .ats-hero-card,
    body#page-local-academic_ticket_system-index .ats-welcome-card {
        flex-direction: column;
        align-items: stretch;
    }

    body#page-local-academic_ticket_system-index .ats-hero-aside {
        display: none;
    }

    body#page-local-academic_ticket_system-index .ats-welcome-year {
        min-width: 0;
        border-left: 0;
        border-top: 1px solid #e8eef8;
        padding: 1rem 0 0;
    }
}

@media (max-width: 760px) {
    body#page-local-academic_ticket_system-index .ats-shell {
        padding: 0.75rem 0.35rem 1.5rem;
    }

    body#page-local-academic_ticket_system-index .ats-hero-card,
    body#page-local-academic_ticket_system-index .ats-welcome-card,
    body#page-local-academic_ticket_system-index .ats-ticket-panel {
        border-radius: 18px;
        padding: 1rem;
    }

    body#page-local-academic_ticket_system-index .ats-hero-card {
        min-height: auto;
    }

    body#page-local-academic_ticket_system-index .ats-hero-title {
        font-size: 2rem;
    }

    body#page-local-academic_ticket_system-index .ats-hero-text {
        font-size: 0.95rem;
    }

    body#page-local-academic_ticket_system-index .ats-welcome-main {
        align-items: flex-start;
    }

    body#page-local-academic_ticket_system-index .ats-icon-box--primary {
        width: 62px;
        height: 62px;
        font-size: 1.6rem;
    }

    body#page-local-academic_ticket_system-index .ats-panel-heading {
        min-width: 0;
    }

    body#page-local-academic_ticket_system-index .ats-panel-toolbar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.65rem;
    }

    body#page-local-academic_ticket_system-index .ats-search-wrap {
        grid-column: 1 / -1;
        min-width: 0;
    }

    body#page-local-academic_ticket_system-index .ats-primary-btn,
    body#page-local-academic_ticket_system-index .ats-secondary-btn--labeled {
        width: 100%;
        min-width: 0;
        padding: 0 0.8rem;
        font-size: 0.9rem;
    }

    body#page-local-academic_ticket_system-index .ats-section-heading h3,
    body#page-local-academic_ticket_system-index .ats-panel-heading h3 {
        font-size: 1.35rem;
    }

    body#page-local-academic_ticket_system-index .ats-pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    body#page-local-academic_ticket_system-index .ats-panel-toolbar {
        grid-template-columns: 1fr;
    }

    body#page-local-academic_ticket_system-index .ats-search-wrap {
        grid-column: 1;
    }

    body#page-local-academic_ticket_system-index .ats-welcome-main {
        gap: 0.8rem;
    }

    body#page-local-academic_ticket_system-index .ats-year-pill {
        display: none;
    }
}

/* ===== ATS reusable local navigation ===== */
.ats-container > .ats-local-nav,
.ats-container .ats-local-nav {
    max-width: 1380px;
    margin: 1rem auto 0;
}

.ats-local-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 72px;
    padding: 0.75rem 0.9rem;
    background: rgba(255,255,255,0.96);
    border: 1px solid #e2eaf4;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15,23,42,0.07);
    position: relative;
    z-index: 20;
}

.ats-local-nav__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 220px;
    color: #0f172a !important;
}

.ats-local-nav__brand-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: linear-gradient(145deg, #eaf2ff, #dbe9ff);
    color: var(--ats-primary);
    font-size: 1.25rem;
    flex: 0 0 auto;
}

.ats-local-nav__brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ats-local-nav__brand-copy strong {
    font-size: 0.98rem;
    font-weight: 900;
    color: #0f172a;
}

.ats-local-nav__brand-copy small {
    margin-top: 0.25rem;
    color: #7c8aa0;
    font-size: 0.75rem;
    font-weight: 600;
}

.ats-local-nav__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.ats-local-nav__item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 44px;
    padding: 0.65rem 0.95rem;
    border-radius: 13px;
    color: #475569 !important;
    font-weight: 800;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.ats-local-nav__item:hover {
    color: var(--ats-primary) !important;
    background: #f3f7ff;
    border-color: #dce8fa;
    transform: translateY(-1px);
}

.ats-local-nav__item.is-active {
    color: #fff !important;
    background: linear-gradient(135deg, var(--ats-primary), #1d4ed8);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(37,99,235,.20);
}

/* Keep page content visually connected to the local plugin menu. */
.ats-local-nav + .ats-shell,
.ats-local-nav + .container,
.ats-local-nav + main.container {
    padding-top: 1.25rem !important;
}

@media (max-width: 820px) {
    .ats-local-nav {
        margin: 0.75rem 0.75rem 0;
        padding: 0.75rem;
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
    }
    .ats-local-nav__brand {
        min-width: 0;
        width: 100%;
    }
    .ats-local-nav__links {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0,1fr));
        gap: 0.5rem;
    }
    .ats-local-nav__item {
        min-width: 0;
        padding: 0.65rem 0.5rem;
        font-size: 0.82rem;
    }
}

@media (max-width: 560px) {
    .ats-local-nav__links {
        grid-template-columns: 1fr;
    }
    .ats-local-nav__item {
        justify-content: flex-start;
    }
}

/* ======================================================================
   ATS Unified UI 2026-09-19
   Shared visual system for index, create, departments, view and errors.
   This layer intentionally does not depend on styles/output.css.
   ====================================================================== */
body[id^="page-local-academic_ticket_system-"] {
    --ats-surface: #ffffff;
    --ats-surface-soft: #f7faff;
    --ats-border: #e3ebf5;
    --ats-border-strong: #d4e0ee;
    --ats-text: #0f172a;
    --ats-muted: #64748b;
    --ats-muted-2: #94a3b8;
    --ats-shadow: 0 14px 36px rgba(15, 23, 42, 0.07);
    --ats-shadow-soft: 0 7px 20px rgba(15, 23, 42, 0.05);
    background: #f3f6fb;
}

body[id^="page-local-academic_ticket_system-"] #page.drawers .main-inner,
body[id^="page-local-academic_ticket_system-"] .main-inner {
    width: min(100% - 32px, 1500px) !important;
    max-width: 1500px !important;
    margin-inline: auto !important;
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

body[id^="page-local-academic_ticket_system-"] #page-header,
body[id^="page-local-academic_ticket_system-"] .page-header-headings {
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.ats-app-page {
    min-height: calc(100vh - 70px);
    background: linear-gradient(180deg, #f5f8fc 0%, #eef3f8 100%);
    padding-bottom: 2rem;
}

.ats-shell--wide { max-width: 1380px; }
.ats-shell--form { max-width: 1120px; }

.ats-page-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.7rem 1.8rem;
    margin-bottom: 1.25rem;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    border: 1px solid var(--ats-border);
    box-shadow: var(--ats-shadow);
}

.ats-page-hero--compact { min-height: 130px; }
.ats-page-hero__main { display: flex; align-items: center; gap: 1.15rem; min-width: 0; }
.ats-page-hero__icon {
    width: 68px; height: 68px; flex: 0 0 68px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 20px;
    background: linear-gradient(145deg, #e9f2ff, #d9e8ff);
    color: var(--ats-primary);
    font-size: 1.75rem;
}
.ats-page-hero h1 { margin: 0.15rem 0 0.45rem; color: var(--ats-text); font-size: clamp(1.8rem, 2.7vw, 2.65rem); line-height: 1.08; font-weight: 900; }
.ats-page-hero p { margin: 0; color: var(--ats-muted); line-height: 1.55; font-size: 0.98rem; max-width: 760px; }

.ats-ghost-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.55rem;
    min-height: 46px; padding: 0.65rem 1rem; border-radius: 14px;
    background: #fff; color: #475569 !important; border: 1px solid var(--ats-border-strong);
    font-weight: 800; white-space: nowrap; transition: all .2s ease;
}
.ats-ghost-btn:hover { color: var(--ats-primary) !important; border-color: #cbdaf2; background: #f8fbff; transform: translateY(-1px); }

.ats-form-card,
.ats-panel,
.ats-assignment-card {
    background: var(--ats-surface);
    border: 1px solid var(--ats-border);
    border-radius: 26px;
    box-shadow: var(--ats-shadow-soft);
}
.ats-form-card { padding: 1.65rem; }
.ats-form-card--sticky { position: sticky; top: 1rem; align-self: start; }
.ats-form-card__heading { padding-bottom: 1.15rem; margin-bottom: 1.25rem; border-bottom: 1px solid #edf2f7; }
.ats-form-card__heading > div { display: grid; grid-template-columns: auto 1fr; column-gap: 0.9rem; align-items: start; }
.ats-form-card__heading h2 { grid-column: 2; margin: 0; color: var(--ats-text); font-size: 1.45rem; font-weight: 900; }
.ats-form-card__heading p { grid-column: 2; margin: 0.3rem 0 0; color: var(--ats-muted); font-size: 0.9rem; line-height: 1.5; }
.ats-form-step {
    grid-row: 1 / span 2; width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 13px; background: #eef5ff; color: var(--ats-primary); font-weight: 900; font-size: 0.82rem;
}

.ats-ticket-form { display: flex; flex-direction: column; gap: 1.15rem; }
.ats-form-grid { display: grid; gap: 1rem; }
.ats-form-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ats-field { min-width: 0; }
.ats-field-label { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.5rem; color: #334155; font-size: 0.9rem; font-weight: 800; }
.ats-field-label__icon { width: 28px; height: 28px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #eff6ff; color: var(--ats-primary); font-size: 0.78rem; }
.ats-field-help { display: block; margin-top: 0.4rem; color: #8290a3; font-size: 0.78rem; line-height: 1.45; }
.ats-field-optional { color: #94a3b8; font-weight: 600; font-size: 0.78rem; }
.ats-required { color: #dc2626; }

.ats-control,
#reply_message {
    width: 100%; min-height: 48px; padding: 0.72rem 0.9rem;
    border: 1px solid #d9e3ef; border-radius: 14px; background: #fbfdff;
    color: #1e293b; font-size: 0.94rem; line-height: 1.4; outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
    box-sizing: border-box;
}
.ats-control:focus,
#reply_message:focus { background: #fff; border-color: var(--ats-primary); box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.10); }
.ats-control::placeholder,
#reply_message::placeholder { color: #9aa7b8; }
.ats-select { appearance: auto; }
.ats-textarea,
#reply_message { resize: vertical; min-height: 140px; }

.ats-support-tools { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.ats-support-tool { border: 1px solid #e4ebf4; border-radius: 20px; background: #f9fbfe; padding: 1rem; min-width: 0; }
.ats-support-tool__heading { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.9rem; }
.ats-support-tool__icon { width: 40px; height: 40px; flex: 0 0 40px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #eaf2ff; color: var(--ats-primary); }
.ats-support-tool__heading h3 { margin: 0; color: #24324a; font-size: 0.95rem; font-weight: 900; }
.ats-support-tool__heading p { margin: 0.2rem 0 0; color: var(--ats-muted); font-size: 0.77rem; line-height: 1.4; }

.ats-recorder { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem; border: 1px dashed #cfdced; border-radius: 15px; background: #fff; }
.ats-recorder__actions { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.ats-recorder__status { color: #64748b; font-size: 0.82rem; font-weight: 700; }
.ats-recorder__status.is-recording { color: #dc2626; }
.ats-recorder__status.is-success { color: #15803d; }
.ats-recorder__preview { flex: 1 1 auto; min-width: 160px; }
.ats-recorder__preview audio { width: 100%; height: 34px; }
.ats-icon-action { width: 42px; height: 42px; flex: 0 0 42px; border: 0; border-radius: 13px; display: inline-flex; align-items: center; justify-content: center; background: #eaf2ff; color: var(--ats-primary); cursor: pointer; transition: all .2s ease; }
.ats-icon-action:hover { background: var(--ats-primary); color: #fff; transform: translateY(-1px); }
.ats-icon-action--danger { background: #fee2e2; color: #dc2626; }
.ats-icon-action--muted { background: #eef2f7; color: #64748b; }

.ats-upload-zone { position: relative; min-height: 132px; border: 2px dashed #ccd8e7; border-radius: 17px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.3rem; text-align: center; padding: 1rem; color: #64748b; overflow: hidden; transition: all .2s ease; }
.ats-upload-zone:hover, .ats-upload-zone.is-active { border-color: var(--ats-primary); background: #f6f9ff; }
.ats-upload-zone__icon { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #eaf2ff; color: var(--ats-primary); font-size: 1.15rem; margin-bottom: 0.2rem; }
.ats-upload-zone strong { color: #334155; font-size: 0.86rem; }
.ats-upload-zone > span:not(.ats-upload-zone__icon) { font-size: 0.76rem; color: #8a98aa; }
.ats-upload-zone input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.ats-upload-zone--reply { min-height: 150px; }
.ats-upload-placeholder { display: flex; flex-direction: column; align-items: center; gap: 0.35rem; }

.ats-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 0.75rem; padding-top: 1.15rem; border-top: 1px solid #edf2f7; }
.ats-form-actions--left { justify-content: flex-start; }
.ats-primary-btn--large { min-height: 52px; padding-inline: 1.4rem; }
.ats-primary-btn--block { width: 100%; min-height: 48px; }
.ats-primary-btn:disabled, .ats-primary-btn.is-loading { opacity: .72; cursor: wait; transform: none !important; }

.ats-page-grid { display: grid; gap: 1rem; align-items: start; }
.ats-page-grid--sidebar { grid-template-columns: minmax(320px, 0.82fr) minmax(0, 1.8fr); }
.ats-panel-header--simple { margin-bottom: 1rem; }
.ats-departments-panel { padding: 1.35rem; }
.ats-department-table { min-width: 850px; }
.ats-department-name { display: flex; align-items: center; gap: 0.55rem; }
.ats-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ats-primary); flex: 0 0 8px; }
.ats-cell-text { color: #475569; font-size: 0.88rem; line-height: 1.45; }
.ats-cell-muted { color: #8b99aa; font-size: 0.82rem; font-style: normal; }
.ats-user-chip { display: inline-flex; align-items: center; gap: 0.45rem; color: #475569; font-size: 0.85rem; font-weight: 700; }
.ats-user-chip i { color: var(--ats-primary); }
.ats-row-actions { display: flex; align-items: center; justify-content: center; gap: 0.45rem; }
.ats-row-actions form { margin: 0; }
.ats-table-action { width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 11px; background: #edf4ff; color: var(--ats-primary); cursor: pointer; transition: all .2s ease; }
.ats-table-action:hover { background: var(--ats-primary); color: #fff; }
.ats-table-action--danger { background: #fff0f0; color: #dc2626; }
.ats-table-action--danger:hover { background: #dc2626; color: #fff; }
.ats-empty-state--compact { min-height: 260px; padding: 2rem 1rem; }
.ats-empty-state--compact .ats-empty-box { position: static; transform: none; width: 66px; height: 66px; border-radius: 20px; margin-bottom: 1rem; }
.ats-empty-state--compact h4 { font-size: 1.05rem; }

/* Ticket detail workspace */
.ats-ticket-hero__title-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.ats-ticket-reference { display: inline-flex; align-items: center; padding: 0.35rem 0.65rem; border-radius: 10px; background: #eaf2ff; color: var(--ats-primary); font-weight: 900; font-size: 0.92rem; }
.ats-workspace-grid { display: grid; grid-template-columns: minmax(0,1fr); gap: 1rem; align-items: start; }
.ats-workspace-grid.has-sidebar { grid-template-columns: minmax(0, 1.95fr) minmax(320px, .85fr); }
.ats-workspace-main, .ats-workspace-sidebar { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ats-panel { padding: 1.4rem; }

.ats-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; margin-bottom: 1rem; border-bottom: 1px solid #edf2f7; }
.ats-card-heading > div:first-child { display: flex; align-items: center; gap: 0.75rem; min-width: 0; }
.ats-card-heading__icon { width: 42px; height: 42px; flex: 0 0 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; background: #eaf2ff; color: var(--ats-primary); }
.ats-card-heading__icon--warm { background: #fff7d6; color: #a16207; }
.ats-card-heading h2 { margin: 0; color: var(--ats-text); font-size: 1.35rem; font-weight: 900; }
.ats-card-heading p { margin: 0.2rem 0 0; color: var(--ats-muted); font-size: 0.82rem; line-height: 1.45; }
.ats-card-heading--sidebar { align-items: flex-start; }
.ats-card-heading--sidebar h2 { font-size: 1.05rem; }
.ats-card-heading--sidebar p { font-size: 0.76rem; }

.ats-ticket-meta-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 0.8rem; margin-bottom: 1rem; }
.ats-meta-item { display: flex; align-items: center; gap: 0.7rem; padding: 0.8rem; border: 1px solid #e8eef6; border-radius: 16px; background: #fbfdff; min-width: 0; }
.ats-meta-icon { width: 38px; height: 38px; flex: 0 0 38px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #edf4ff; color: var(--ats-primary); }
.ats-meta-icon.is-danger { background: #fff0f0; color: #dc2626; }
.ats-meta-item small { display: block; color: #8a98aa; font-size: 0.69rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 0.2rem; }
.ats-meta-item strong, .ats-meta-link { display: block; color: #24324a !important; font-size: 0.88rem; font-weight: 800; overflow-wrap: anywhere; }
.ats-meta-link:hover { color: var(--ats-primary) !important; }

.ats-description-box { padding: 1rem; border-radius: 18px; background: #f8fbff; border: 1px solid #e5edf7; }
.ats-description-box__heading, .ats-subheading { display: flex; align-items: center; gap: 0.5rem; color: #475569; font-size: 0.78rem; font-weight: 900; text-transform: uppercase; letter-spacing: .045em; }
.ats-description-box__heading i, .ats-subheading i { color: var(--ats-primary); }
.ats-rich-text { margin-top: 0.7rem; color: #334155; font-size: 0.92rem; line-height: 1.65; overflow-wrap: anywhere; }
.ats-rich-text p:last-child { margin-bottom: 0; }

.ats-attachments-section { margin-top: 1rem; }
.ats-attachments-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px,1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.ats-attachment-card { min-height: 100px; border: 1px solid #e0e9f4; border-radius: 16px; background: #fff; overflow: hidden; position: relative; color: #334155 !important; }
button.ats-attachment-card { padding: 0; cursor: pointer; }
.ats-attachment-card--image img { width: 100%; height: 120px; object-fit: cover; display: block; }
.ats-attachment-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .45rem; padding: .6rem; background: rgba(15,23,42,.48); color: #fff; opacity: 0; transition: opacity .2s ease; }
.ats-attachment-card--image:hover .ats-attachment-overlay { opacity: 1; }
.ats-attachment-card--audio { padding: .8rem; display: flex; flex-direction: column; justify-content: center; gap: .6rem; }
.ats-attachment-title { display: flex; align-items: center; gap: .45rem; font-size: .82rem; font-weight: 800; min-width: 0; }
.ats-attachment-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-attachment-card--file { padding: .85rem; display: flex; align-items: center; gap: .7rem; }
.ats-attachment-file-icon { width: 42px; height: 42px; flex: 0 0 42px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #edf4ff; color: var(--ats-primary); }
.ats-attachment-card--file span:last-child { min-width: 0; }
.ats-attachment-card--file strong, .ats-attachment-card--file small { display: block; }
.ats-attachment-card--file strong { font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-attachment-card--file small { color: #8b99aa; font-size: .72rem; margin-top: .2rem; }

.ats-conversation-list { display: flex; flex-direction: column; gap: .85rem; }
.ats-message { padding: 1rem; border-radius: 18px; border: 1px solid #e6edf5; background: #fbfdff; }
.ats-message--support { border-left: 4px solid var(--ats-primary); background: #f6f9ff; }
.ats-message--student { border-left: 4px solid #f59e0b; background: #fffaf0; }
.ats-message__header { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-bottom: .65rem; margin-bottom: .7rem; border-bottom: 1px solid rgba(148,163,184,.18); }
.ats-message__person { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.ats-message__avatar { width: 34px; height: 34px; flex: 0 0 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 11px; background: #eaf2ff; color: var(--ats-primary); }
.ats-message__person strong, .ats-message__person small { display: block; }
.ats-message__person strong { color: #25334a; font-size: .86rem; }
.ats-message__person small { color: #8492a6; font-size: .7rem; margin-top: .1rem; }
.ats-message__header time { color: #8795a8; font-size: .72rem; white-space: nowrap; }
.ats-message__body { margin-top: 0; }
.ats-reply-attachments { border-top: 1px solid rgba(148,163,184,.18); padding-top: .7rem; margin-top: .75rem; }
.ats-reply-attachments > small { color: #7c8a9d; font-weight: 800; font-size: .72rem; }
.ats-reply-files { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .45rem; }
.ats-file-pill { display: inline-flex; align-items: center; gap: .4rem; min-height: 34px; padding: .35rem .6rem; border-radius: 10px; border: 1px solid #dfe8f3; background: #fff; color: #36527d !important; font-size: .72rem; font-weight: 700; }
button.ats-file-pill { cursor: pointer; }
.ats-file-pill--audio { flex-direction: column; align-items: stretch; min-width: 220px; }
.ats-file-pill--audio audio { width: 100%; }
.ats-empty-conversation { min-height: 180px; border: 1px dashed #cfdced; border-radius: 18px; background: #fbfdff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; }
.ats-empty-conversation > span { width: 52px; height: 52px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: #edf4ff; color: var(--ats-primary); font-size: 1.2rem; }
.ats-empty-conversation h3 { margin: .65rem 0 .2rem; font-size: 1rem; color: #334155; font-weight: 900; }
.ats-empty-conversation p { margin: 0; color: #8492a6; font-size: .82rem; }

.ats-feedback-card { display: flex; align-items: flex-start; gap: 1rem; }
.ats-feedback-card__icon, .ats-feedback-result__icon { width: 52px; height: 52px; flex: 0 0 52px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center; background: #fff7d6; color: #d97706; font-size: 1.2rem; }
.ats-feedback-card__body { flex: 1 1 auto; min-width: 0; }
.ats-feedback-card h3, .ats-feedback-result h3 { margin: 0; color: #25334a; font-size: 1.05rem; font-weight: 900; }
.ats-feedback-card p { color: #7b899b; font-size: .82rem; margin: .25rem 0 .8rem; }
.ats-feedback-form { display: flex; flex-direction: column; gap: .7rem; }
.rating-group { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: .25rem; }
.rating-group input { display: none !important; }
.rating-group label { cursor: pointer; color: #dbe2ea; font-size: 1.7rem; transition: color .15s ease; }
.rating-group input:checked ~ label, .rating-group label:hover, .rating-group label:hover ~ label { color: #f59e0b; }
.ats-feedback-result { display: flex; gap: .8rem; align-items: flex-start; background: #f7fffb; border-color: #d7f3e5; }
.ats-feedback-result__icon { background: #e8f8ef; color: #15803d; }
.ats-feedback-stars { color: #f59e0b; margin: .3rem 0; }
.ats-feedback-result p { margin: .35rem 0 0; color: #5f6f82; font-style: italic; font-size: .82rem; }

.ats-presence-slot { margin-bottom: .8rem; }
.ats-reply-form { display: flex; flex-direction: column; gap: 1rem; }
.ats-selected-files { display: grid; gap: .45rem; width: 100%; position: relative; z-index: 2; }
.ats-selected-file { display: flex; align-items: center; gap: .55rem; padding: .55rem; border: 1px solid #dfe8f3; border-radius: 12px; background: rgba(255,255,255,.96); text-align: left; }
.ats-selected-file__icon { width: 32px; height: 32px; flex: 0 0 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; background: #edf4ff; color: var(--ats-primary); }
.ats-selected-file__meta { flex: 1 1 auto; min-width: 0; }
.ats-selected-file__meta strong, .ats-selected-file__meta small { display: block; }
.ats-selected-file__meta strong { color: #334155; font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-selected-file__meta small { color: #8b99aa; font-size: .68rem; }
.ats-selected-file__remove { width: 30px; height: 30px; flex: 0 0 30px; border: 0; border-radius: 9px; background: #fff0f0; color: #dc2626; cursor: pointer; }

.ats-assignment-card { display: flex; align-items: center; gap: .75rem; padding: 1rem; }
.ats-assignment-card__icon { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; }
.ats-assignment-card small, .ats-assignment-card strong { display: block; }
.ats-assignment-card small { color: #7b899b; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.ats-assignment-card strong { color: #26354b; font-size: .95rem; margin-top: .1rem; }
.ats-assignment-card.is-assigned .ats-assignment-card__icon { background: #e8f8ef; color: #15803d; }
.ats-assignment-card.is-unassigned { border-color: #fde0e0; background: #fffafa; }
.ats-assignment-card.is-unassigned .ats-assignment-card__icon { background: #fff0f0; color: #dc2626; }

.ats-admin-stack { display: flex; flex-direction: column; gap: 1rem; }
.ats-admin-form { display: flex; flex-direction: column; gap: .55rem; padding-bottom: 1rem; border-bottom: 1px solid #edf2f7; }
.ats-admin-form:last-child { border-bottom: 0; padding-bottom: 0; }
.ats-admin-form > label { color: #526175; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 900; }
.ats-secondary-action { min-height: 46px; padding: .65rem .9rem; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; border-radius: 13px; border: 1px solid #d5e2f2; background: #f1f6ff; color: #3156a7; font-weight: 800; cursor: pointer; }
.ats-secondary-action--block { width: 100%; }
.ats-assignee-picker { position: relative; }
.ats-assignee-search { position: relative; }
.ats-assignee-search > i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #94a3b8; z-index: 1; }
.ats-assignee-search .ats-control { padding-left: 2.35rem; }
.ats-assignee-list { position: absolute; z-index: 100; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow: auto; padding: .35rem; border: 1px solid #dce6f2; border-radius: 14px; background: #fff; box-shadow: 0 14px 30px rgba(15,23,42,.14); }
.ats-assignee-option { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; padding: .65rem .7rem; border: 0; border-radius: 10px; background: transparent; color: #334155; text-align: left; cursor: pointer; }
.ats-assignee-option:hover, .ats-assignee-option.is-selected { background: #eef5ff; }
.ats-assignee-option strong { font-size: .8rem; }
.ats-assignee-option small { color: #8492a6; font-size: .68rem; }

.ats-notes-list { display: flex; flex-direction: column; gap: .45rem; max-height: 260px; overflow: auto; margin-bottom: .7rem; }
.ats-note { padding: .7rem; border-radius: 12px; border: 1px solid #ece7cf; background: #fffdf5; }
.ats-note.is-me { background: #fff8d9; }
.ats-note > div { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.ats-note strong { color: #475569; font-size: .72rem; }
.ats-note time { color: #94a3b8; font-size: .65rem; }
.ats-note p { color: #475569; font-size: .76rem; line-height: 1.45; margin: .3rem 0 0; }
.ats-note-form { display: grid; grid-template-columns: 1fr auto; gap: .45rem; align-items: center; }
.ats-inline-empty { padding: 1rem; border-radius: 12px; background: #f8fafc; color: #8a98aa; text-align: center; font-size: .78rem; }
.ats-recent-list { display: flex; flex-direction: column; gap: .45rem; }
.ats-recent-ticket { display: flex; align-items: center; justify-content: space-between; gap: .65rem; padding: .65rem; border: 1px solid #e5edf7; border-radius: 12px; background: #fbfdff; }
.ats-recent-ticket span { min-width: 0; }
.ats-recent-ticket strong, .ats-recent-ticket small { display: block; }
.ats-recent-ticket strong { color: #334155; font-size: .76rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ats-recent-ticket small { color: #94a3b8; font-size: .66rem; margin-top: .12rem; }
.ats-recent-ticket em { font-style: normal; font-size: .65rem; flex: 0 0 auto; }
.ats-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .75rem; }
.ats-timeline li { display: grid; grid-template-columns: 14px 1fr; gap: .55rem; align-items: start; }
.ats-timeline li > span { width: 9px; height: 9px; border-radius: 50%; margin-top: .25rem; background: var(--ats-primary); box-shadow: 0 0 0 4px #eaf2ff; }
.ats-timeline p { margin: 0; color: #526175; font-size: .75rem; line-height: 1.4; }
.ats-timeline time { display: block; margin-top: .2rem; color: #9aa7b8; font-size: .65rem; }

/* Semantic status palette used by all unified screens. */
.ats-status-badge { display: inline-flex; align-items: center; justify-content: center; min-height: 28px; padding: .3rem .62rem; border-radius: 999px; border: 1px solid transparent; font-size: .72rem; font-weight: 900; line-height: 1; white-space: nowrap; }
.ats-status--neutral { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.ats-status--open { background: #eaf2ff; color: #1d4ed8; border-color: #d7e6ff; }
.ats-status--closed { background: #ecfdf5; color: #15803d; border-color: #d1fae5; }
.ats-status--admin { background: #f3e8ff; color: #7e22ce; border-color: #ead6ff; }
.ats-status--student { background: #fff7ed; color: #c2410c; border-color: #ffedd5; }
.ats-status--progress { background: #eef2ff; color: #4338ca; border-color: #e0e7ff; }
.ats-status--urgent { background: #fff1f2; color: #be123c; border-color: #ffe4e6; }

/* Unified error screens. */
.ats-error-shell { max-width: 760px; margin: 0 auto; padding: 3rem 1rem; }
.ats-error-card { padding: 2rem; border-radius: 26px; border: 1px solid var(--ats-border); background: #fff; box-shadow: var(--ats-shadow); text-align: center; }
.ats-error-card__icon { width: 76px; height: 76px; margin: 0 auto 1rem; border-radius: 22px; display: inline-flex; align-items: center; justify-content: center; background: #edf4ff; color: var(--ats-primary); font-size: 1.8rem; }
.ats-error-card h1 { margin: 0; color: var(--ats-text); font-size: 1.7rem; font-weight: 900; }
.ats-error-card p { margin: .55rem auto 1.2rem; color: var(--ats-muted); max-width: 520px; line-height: 1.55; }

@media (max-width: 1100px) {
    .ats-workspace-grid.has-sidebar { grid-template-columns: 1fr; }
    .ats-workspace-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); }
    .ats-admin-panel { grid-row: span 2; }
    .ats-page-grid--sidebar { grid-template-columns: 1fr; }
    .ats-form-card--sticky { position: static; }
}

@media (max-width: 820px) {
    body[id^="page-local-academic_ticket_system-"] #page.drawers .main-inner,
    body[id^="page-local-academic_ticket_system-"] .main-inner { width: calc(100% - 14px) !important; }
    .ats-page-hero { flex-direction: column; align-items: stretch; padding: 1.2rem; border-radius: 20px; }
    .ats-page-hero__icon { width: 58px; height: 58px; flex-basis: 58px; border-radius: 17px; }
    .ats-page-hero h1 { font-size: 1.8rem; }
    .ats-ghost-btn { align-self: flex-start; }
    .ats-form-grid--2, .ats-support-tools, .ats-ticket-meta-grid { grid-template-columns: 1fr; }
    .ats-form-card, .ats-panel { border-radius: 20px; padding: 1rem; }
    .ats-workspace-sidebar { grid-template-columns: 1fr; }
    .ats-admin-panel { grid-row: auto; }
    .ats-recorder { align-items: stretch; flex-direction: column; }
    .ats-form-actions { align-items: stretch; flex-direction: column-reverse; }
    .ats-form-actions .ats-primary-btn, .ats-form-actions .ats-ghost-btn { width: 100%; }
}

@media (max-width: 560px) {
    .ats-page-hero__main { align-items: flex-start; }
    .ats-page-hero__icon { width: 50px; height: 50px; flex-basis: 50px; font-size: 1.3rem; }
    .ats-page-hero h1 { font-size: 1.45rem; }
    .ats-page-hero p { font-size: .86rem; }
    .ats-card-heading { align-items: flex-start; flex-direction: column; }
    .ats-card-heading > div:first-child { align-items: flex-start; }
    .ats-message__header { align-items: flex-start; flex-direction: column; }
    .ats-feedback-card { flex-direction: column; }
    .ats-attachments-grid { grid-template-columns: 1fr; }
}

/* ===== Functional workflow 3.3: queues, filters, SLA ===== */
.ats-status--assigned { background: #eef6ff; color: #075985; border-color: #dbeafe; }
.ats-status--resolved { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.ats-role-metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .85rem;
    margin: 0 0 1.4rem;
}
.ats-metric-chip {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .95rem 1rem;
    border: 1px solid #e4ebf5;
    border-radius: 18px;
    background: #fff;
    color: #0f172a !important;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .045);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.ats-metric-chip:hover {
    transform: translateY(-2px);
    border-color: #cfe0fb;
    box-shadow: 0 12px 28px rgba(37, 99, 235, .09);
}
.ats-metric-chip > span {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: var(--ats-primary);
    flex: 0 0 auto;
}
.ats-metric-chip div { min-width: 0; display: flex; flex-direction: column; }
.ats-metric-chip small { color: #64748b; font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ats-metric-chip strong { font-size: 1.45rem; line-height: 1.15; color: #0f172a; }

.ats-panel-actions { display: flex; gap: .7rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ats-filter-bar {
    display: grid;
    grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(155px, .7fr)) auto auto;
    gap: .7rem;
    align-items: center;
    margin: 0 0 1rem;
    padding: .9rem;
    border-radius: 18px;
    background: #f8fbff;
    border: 1px solid #e6edf7;
}
.ats-search-wrap--grow { min-width: 0; width: 100%; }
.ats-filter-select { min-width: 0; height: 52px; background-color: #fff; }
.ats-filter-submit { white-space: nowrap; }
.ats-ticket-activity { margin-top: .25rem; font-size: .75rem; color: #94a3b8; }
.ats-ticket-activity i { margin-right: .25rem; }
.ats-sla-badge {
    display: flex;
    align-items: center;
    gap: .3rem;
    width: max-content;
    margin-top: .38rem;
    padding: .22rem .5rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 800;
    border: 1px solid transparent;
}
.ats-sla--ok .ats-meta-icon, .ats-sla-badge.ats-sla--ok { background: #ecfdf5; color: #047857; border-color: #bbf7d0; }
.ats-sla--risk .ats-meta-icon, .ats-sla-badge.ats-sla--risk { background: #fffbeb; color: #b45309; border-color: #fde68a; }
.ats-sla--breached .ats-meta-icon, .ats-sla-badge.ats-sla--breached { background: #fff1f2; color: #be123c; border-color: #fecdd3; }
.ats-sla--done .ats-meta-icon, .ats-sla-badge.ats-sla--done { background: #f1f5f9; color: #475569; border-color: #e2e8f0; }
.ats-meta-item em { display: block; margin-top: .18rem; color: #64748b; font-style: normal; font-size: .72rem; }
.ats-assignee-name { font-size: .78rem; font-weight: 700; color: #475569; }
.ats-claim-form {
    margin: .85rem 0 1rem;
    padding: .85rem;
    border: 1px dashed #bfdbfe;
    border-radius: 16px;
    background: #f8fbff;
}
.ats-claim-form small { display: block; margin-top: .55rem; color: #64748b; text-align: center; line-height: 1.35; }
.ats-reopen-card { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ats-reopen-card p { margin: .25rem 0 0; color: #64748b; }

@media (max-width: 1200px) {
    .ats-role-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ats-filter-bar { grid-template-columns: 1fr 1fr 1fr; }
    .ats-search-wrap--grow { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
    .ats-role-metrics { grid-template-columns: 1fr 1fr; }
    .ats-filter-bar { grid-template-columns: 1fr; }
    .ats-filter-bar > * { width: 100%; }
    .ats-reopen-card { flex-direction: column; align-items: stretch; }
}
@media (max-width: 480px) {
    .ats-role-metrics { grid-template-columns: 1fr; }
}

/* ===== Integrated help centre ===== */
.ats-page-hero__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .65rem;
    flex-wrap: wrap;
}

.ats-context-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 42px;
    padding: .55rem .85rem;
    border-radius: 13px;
    border: 1px solid #dbe6f4;
    background: #eef5ff;
    color: var(--ats-primary) !important;
    font-weight: 800;
    font-size: .86rem;
    white-space: nowrap;
    transition: all .2s ease;
}
.ats-context-help-btn:hover { background: #e2edff; border-color: #c9daf4; transform: translateY(-1px); }

.ats-help-page { background: linear-gradient(180deg, #f5f8fc 0%, #edf3f9 100%); }
.ats-help-hero { margin-bottom: 1rem; }

.ats-help-role-banner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #0f2f63 0%, #1d4f91 55%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 14px 32px rgba(37, 99, 235, .16);
}
.ats-help-role-banner__icon {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,.14);
    font-size: 1.3rem;
}
.ats-help-role-banner small { display: block; color: #dbeafe; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.ats-help-role-banner strong { display: block; margin-top: .05rem; font-size: 1.2rem; }
.ats-help-role-banner p { margin: .2rem 0 0; color: #dbeafe; font-size: .86rem; }
.ats-help-role-banner__user { font-weight: 800; color: #fff; opacity: .95; text-align: right; }

.ats-help-tools {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: .85rem;
    border: 1px solid var(--ats-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--ats-shadow-soft);
}
.ats-help-search {
    position: relative;
    flex: 1 1 420px;
    max-width: 560px;
}
.ats-help-search > i {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #94a3b8;
}
.ats-help-search input {
    width: 100%;
    height: 48px;
    padding: 0 2.8rem 0 2.7rem;
    border-radius: 14px;
    border: 1px solid #dbe4ef;
    background: #f8fbff;
    color: #0f172a;
    outline: none;
    transition: all .2s ease;
}
.ats-help-search input:focus { background: #fff; border-color: var(--ats-primary); box-shadow: 0 0 0 4px var(--ats-primary-light); }
.ats-help-search button {
    position: absolute;
    top: 50%;
    right: .65rem;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
}
.ats-help-search button:hover { background: #eef4fb; color: #475569; }
.ats-help-jumps { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.ats-help-jumps a {
    padding: .5rem .75rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569 !important;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none !important;
}
.ats-help-jumps a:hover { background: #e8f1ff; color: var(--ats-primary) !important; }

.ats-help-layout {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}
.ats-help-sidebar { position: sticky; top: 86px; display: grid; gap: .85rem; }
.ats-help-sidebar__card {
    padding: 1rem;
    border: 1px solid var(--ats-border);
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--ats-shadow-soft);
}
.ats-help-sidebar__card > strong {
    display: block;
    padding: .15rem .35rem .65rem;
    color: #0f172a;
    font-size: .92rem;
}
.ats-help-sidebar__card a {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .62rem .7rem;
    border-radius: 12px;
    color: #475569 !important;
    text-decoration: none !important;
    font-size: .82rem;
    font-weight: 700;
}
.ats-help-sidebar__card a i { width: 18px; text-align: center; color: #7890ad; }
.ats-help-sidebar__card a:hover { background: #f1f6fd; color: var(--ats-primary) !important; }
.ats-help-sidebar__card a:hover i { color: var(--ats-primary); }
.ats-help-sidebar__actions { background: linear-gradient(145deg, #fff, #f5f9ff); }

.ats-help-content { min-width: 0; display: grid; gap: 1rem; }
.ats-help-section {
    scroll-margin-top: 88px;
    padding: 1.35rem;
    border: 1px solid var(--ats-border);
    border-radius: 24px;
    background: #fff;
    box-shadow: var(--ats-shadow-soft);
}
.ats-help-section[hidden] { display: none !important; }
.ats-help-section__heading {
    display: flex;
    align-items: flex-start;
    gap: .9rem;
    margin-bottom: 1rem;
}
.ats-help-section__number {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #eaf2ff;
    color: var(--ats-primary);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .06em;
}
.ats-help-section__heading h2 { margin: 0 0 .22rem; color: #0f172a; font-size: 1.45rem; font-weight: 900; }
.ats-help-section__heading p { margin: 0; color: #64748b; line-height: 1.55; }

.ats-help-flow {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: .7rem;
}
.ats-help-flow article {
    position: relative;
    min-height: 190px;
    padding: 1rem;
    border: 1px solid #e7edf5;
    border-radius: 18px;
    background: linear-gradient(180deg, #fbfdff, #f7faff);
}
.ats-help-flow article > span {
    position: absolute;
    top: .75rem;
    right: .75rem;
    width: 25px;
    height: 25px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eaf2ff;
    color: var(--ats-primary);
    font-size: .72rem;
    font-weight: 900;
}
.ats-help-flow article > i { display: block; margin: .25rem 0 1rem; color: var(--ats-primary); font-size: 1.35rem; }
.ats-help-flow strong { display: block; margin-bottom: .35rem; color: #0f172a; }
.ats-help-flow p { margin: 0; color: #64748b; font-size: .82rem; line-height: 1.5; }

.ats-help-tip,
.ats-help-warning,
.ats-help-final-note {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-top: 1rem;
    padding: .9rem 1rem;
    border-radius: 16px;
}
.ats-help-tip { background: #eff6ff; border: 1px solid #dbeafe; color: #1e3a8a; }
.ats-help-warning { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.ats-help-final-note { background: #f8fafc; border: 1px solid #e2e8f0; color: #475569; }
.ats-help-tip > i,
.ats-help-warning > i,
.ats-help-final-note > i { margin-top: .15rem; font-size: 1.05rem; }
.ats-help-tip strong { color: #1e3a8a; }
.ats-help-tip p,
.ats-help-warning p,
.ats-help-final-note p { margin: 0; line-height: 1.55; font-size: .86rem; }

.ats-help-steps { display: grid; gap: .65rem; }
.ats-help-steps article {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: .8rem;
    align-items: start;
    padding: .85rem;
    border-radius: 16px;
    border: 1px solid #e8eef6;
    background: #fbfdff;
}
.ats-help-steps article > span {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ats-primary);
    color: #fff;
    font-weight: 900;
}
.ats-help-steps h3 { margin: 0 0 .2rem; color: #0f172a; font-size: .98rem; font-weight: 850; }
.ats-help-steps p { margin: 0; color: #64748b; font-size: .86rem; line-height: 1.55; }

.ats-help-feature-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}
.ats-help-feature-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ats-help-feature-grid article {
    padding: 1rem;
    border: 1px solid #e8eef6;
    border-radius: 18px;
    background: #fbfdff;
}
.ats-help-feature-grid article > i { color: var(--ats-primary); font-size: 1.15rem; margin-bottom: .7rem; }
.ats-help-feature-grid h3 { margin: 0 0 .35rem; color: #0f172a; font-size: .98rem; }
.ats-help-feature-grid p { margin: 0; color: #64748b; font-size: .84rem; line-height: 1.55; }

.ats-help-admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.ats-help-admin-grid article {
    display: flex;
    gap: .8rem;
    padding: .9rem;
    border: 1px solid #e8eef6;
    border-radius: 17px;
    background: #fbfdff;
}
.ats-help-admin-grid__icon {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: #eef5ff;
    color: var(--ats-primary);
}
.ats-help-admin-grid h3 { margin: 0 0 .25rem; color: #0f172a; font-size: .96rem; }
.ats-help-admin-grid p { margin: 0; color: #64748b; font-size: .83rem; line-height: 1.5; }

.ats-help-button-row { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1rem; }
.ats-help-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    padding: .72rem 1rem;
    border-radius: 14px;
    background: var(--ats-primary);
    color: #fff !important;
    font-size: .86rem;
    font-weight: 850;
    box-shadow: 0 10px 22px rgba(37,99,235,.18);
}
.ats-help-cta:hover { color: #fff !important; transform: translateY(-1px); }
.ats-help-cta--secondary { background: #eef5ff; color: var(--ats-primary) !important; box-shadow: none; border: 1px solid #d9e6f8; }
.ats-help-cta--secondary:hover { color: var(--ats-primary) !important; }

.ats-help-status-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.ats-help-status-list article { display: flex; gap: .7rem; padding: .8rem .9rem; border-radius: 15px; background: #f9fbfd; border: 1px solid #e8eef5; }
.ats-help-status-list strong { display: block; margin-bottom: .18rem; color: #0f172a; font-size: .9rem; }
.ats-help-status-list p { margin: 0; color: #64748b; font-size: .8rem; line-height: 1.45; }
.ats-help-status-dot { width: 12px; height: 12px; flex: 0 0 12px; margin-top: .3rem; border-radius: 50%; background: #94a3b8; }
.ats-help-status-dot.is-blue { background: #3b82f6; }
.ats-help-status-dot.is-indigo { background: #6366f1; }
.ats-help-status-dot.is-purple { background: #8b5cf6; }
.ats-help-status-dot.is-amber { background: #f59e0b; }
.ats-help-status-dot.is-orange { background: #f97316; }
.ats-help-status-dot.is-green { background: #10b981; }
.ats-help-status-dot.is-slate { background: #64748b; }
.ats-help-status-dot.is-red { background: #ef4444; }

.ats-help-table-wrap { overflow-x: auto; border: 1px solid #e8eef5; border-radius: 17px; }
.ats-help-table { width: 100%; border-collapse: collapse; min-width: 540px; }
.ats-help-table th { padding: .8rem .9rem; background: #f5f8fc; color: #334155; text-align: left; font-size: .82rem; }
.ats-help-table td { padding: .8rem .9rem; border-top: 1px solid #edf2f7; color: #475569; font-size: .84rem; }
.ats-help-caption { margin: .65rem 0 1rem; color: #64748b; font-size: .8rem; }

.ats-help-checklist { display: grid; gap: .6rem; }
.ats-help-checklist > div { display: flex; gap: .7rem; align-items: flex-start; padding: .72rem .85rem; border-radius: 14px; background: #f8fbff; border: 1px solid #e7eef7; }
.ats-help-checklist i { width: 24px; height: 24px; flex: 0 0 24px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: .7rem; }
.ats-help-checklist p { margin: .05rem 0 0; color: #475569; font-size: .85rem; line-height: 1.5; }

.ats-help-faq { display: grid; gap: .55rem; }
.ats-help-faq details { border: 1px solid #e6edf5; border-radius: 15px; background: #fbfdff; overflow: hidden; }
.ats-help-faq summary { position: relative; padding: .85rem 2.7rem .85rem .95rem; cursor: pointer; color: #0f172a; font-weight: 800; list-style: none; }
.ats-help-faq summary::-webkit-details-marker { display: none; }
.ats-help-faq summary::after { content: '+'; position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); color: var(--ats-primary); font-size: 1.2rem; font-weight: 800; }
.ats-help-faq details[open] summary::after { content: '–'; }
.ats-help-faq details p { margin: 0; padding: 0 .95rem .9rem; color: #64748b; font-size: .84rem; line-height: 1.55; }

.ats-help-troubleshooting { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem; }
.ats-help-troubleshooting article { padding: .85rem; border: 1px solid #e8eef5; border-radius: 15px; background: #fbfdff; }
.ats-help-troubleshooting strong { display: block; margin-bottom: .25rem; color: #0f172a; font-size: .9rem; }
.ats-help-troubleshooting p { margin: 0; color: #64748b; font-size: .82rem; line-height: 1.5; }

.ats-help-no-results { padding: 3rem 1rem; border: 1px dashed #cbd5e1; border-radius: 20px; text-align: center; background: #fff; color: #64748b; }
.ats-help-no-results i { font-size: 2rem; color: #94a3b8; margin-bottom: .6rem; }
.ats-help-no-results h3 { margin: 0 0 .35rem; color: #0f172a; }
.ats-help-no-results p { margin: 0; }

@media (max-width: 1120px) {
    .ats-help-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ats-help-tools { flex-direction: column; align-items: stretch; }
    .ats-help-search { max-width: none; flex-basis: auto; }
    .ats-help-jumps { justify-content: flex-start; }
}

@media (max-width: 900px) {
    .ats-help-layout { grid-template-columns: 1fr; }
    .ats-help-sidebar { position: static; grid-template-columns: 1fr 1fr; }
    .ats-help-sidebar__card:first-child { display: none; }
    .ats-help-sidebar__actions { grid-column: 1 / -1; }
    .ats-help-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ats-help-feature-grid,
    .ats-help-feature-grid--3,
    .ats-help-admin-grid,
    .ats-help-status-list,
    .ats-help-troubleshooting { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .ats-page-hero__actions { width: 100%; justify-content: stretch; }
    .ats-page-hero__actions > * { flex: 1 1 auto; }
    .ats-help-role-banner { grid-template-columns: auto 1fr; }
    .ats-help-role-banner__user { display: none; }
    .ats-help-flow { grid-template-columns: 1fr; }
    .ats-help-flow article { min-height: 0; }
    .ats-help-section { padding: 1rem; border-radius: 19px; }
    .ats-help-section__heading h2 { font-size: 1.2rem; }
    .ats-help-jumps { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .15rem; }
    .ats-help-jumps a { white-space: nowrap; }
}

@media print {
    .ats-local-nav,
    .ats-help-tools,
    .ats-help-sidebar,
    .ats-page-hero__actions,
    .ats-help-button-row,
    #page-footer,
    .drawer-toggles,
    .secondary-navigation { display: none !important; }
    .ats-help-layout { display: block; }
    .ats-help-section { break-inside: avoid; box-shadow: none; margin-bottom: 1rem; }
    .ats-help-page, .ats-app-page { background: #fff !important; }
}
