/* 
 * ANM Modern Theme - Clean osTicket Client Override
 * Built from scratch after full HTML structure analysis.
 * 
 * KEY HTML STRUCTURES:
 * 
 * 1. Register/Profile (table.padded):
 *    Mix of 2-column manual rows and 1-column dynamic rows.
 *    UNIFIED to stacked layout in this custom CSS.
 *
 * 2. Dynamic Forms (open.inc.php via dynamic-form.tmpl.php):
 *    <tr><td colspan="2">
 *      <label>
 *        <span>Title</span><br/><em>Hint</em><br/>
 *        INPUT_RENDERED_LAST (checkbox, text, select, etc.)
 *      </label>
 *    </td></tr>
 *    Single-column. Checkbox is LAST in DOM but must appear LEFT visually.
 */

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

/* ===== CSS VARIABLES (METEO Brand) ===== */
:root {
    --primary: #005fc3;
    /* Deep Blue from logo */
    --primary-dark: #00267a;
    --secondary: #FFF200;
    /* Bright Yellow from logo */
    --secondary-hover: #e6da00;
    --bg-main: #f0f4f8;
    --card-bg: #ffffff;
    --border: #dbe4ed;
    --text-dark: #001a53;
    /* Darker blue for text */
    --text-muted: #64748b;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 10px 30px rgba(0, 49, 157, 0.08);
}

/* ===== GLOBAL RESET & TYPOGRAPHY ===== */
body {
    font-family: 'Inter', -apple-system, sans-serif !important;
    background: linear-gradient(135deg, #e7efff 0%, #f4f7f9 100%) !important;
    background-attachment: fixed !important;
    color: var(--text-dark) !important;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}
/* Global Link Reset - Remove osTicket default dotted lines */
a {
    text-decoration: none !important;
    border-bottom: none !important;
    outline: none !important;
}

a:hover {
    text-decoration: none !important;
    border-bottom: none !important;
}

/* ===== MAIN CONTAINER (Unified White Card) ===== */
#container {
    max-width: 1140px !important;
    /* Slightly wider for modern look */
    width: 95% !important;
    margin: 40px auto !important;
    border-radius: 20px !important;
    border: none !important;
    box-shadow: 0 20px 60px rgba(0, 49, 157, 0.12) !important;
    /* Deeper, softer shadow */
    overflow: hidden !important;
    background: var(--card-bg) !important;
    display: flex !important;
    flex-direction: column !important;
}

/* THE MAIN CONTENT WRAPPER - Aggressive Cleanup */
#content {
    padding: 50px !important;
    /* Generous breathing room */
    margin: 0 !important;
    background: #fff !important;
    min-height: 600px !important;
    position: relative;
}

/* Global Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Inter', sans-serif !important;
    color: var(--text-dark) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
}

h1 {
    font-size: 32px !important;
    margin-bottom: 24px !important;
}

h2 {
    font-size: 24px !important;
    margin: 35px 0 20px 0 !important;
    position: relative;
}

h3 {
    font-size: 19px !important;
    margin: 25px 0 15px 0 !important;
}

/* Subtitle under major headers */
.page-subtitle {
    font-size: 16px;
    color: var(--text-muted);
    margin: -15px 0 35px 0;
    line-height: 1.6;
}

/* BREADCRUMBS UNIFICATION */
.anm-breadcrumbs,
#breadcrumbs {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    margin-bottom: 25px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-muted) !important;
    background: #f8fafc !important;
    padding: 10px 20px !important;
    border-radius: 50px !important;
    width: fit-content !important;
}

.anm-breadcrumbs a,
#breadcrumbs a {
    color: var(--primary) !important;
    text-decoration: none !important;
    transition: color 0.2s !important;
}

.anm-breadcrumbs a:hover,
#breadcrumbs a:hover {
    color: var(--primary-dark) !important;
    text-decoration: underline !important;
}

/* ===== HEADER - Logo Left, Login Right ===== */
#header {
    background: #fff !important;
    height: auto !important;
    padding: 24px 40px !important;
    display: flex !important;
    flex-direction: row-reverse !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-bottom: 2px solid var(--primary) !important;
}

#header #logo {
    display: flex !important;
    align-items: center !important;
    margin-right: auto !important;
}

#header #logo img {
    max-height: 90px !important;
    width: auto !important;
}

#header .pull-right {
    text-align: right !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: normal !important;
}

#header .pull-right a {
    color: var(--primary) !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

/* ===== NAVIGATION ===== */
/* ===== TICKET LIST PAGE ===== */
.anm-list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 30px;
    gap: 30px;
    flex-wrap: wrap;
}

.anm-title-block h1 {
    margin-bottom: 10px !important;
}

.anm-list-stats {
    display: flex;
    gap: 10px;
}

.anm-stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: #f1f4f6;
    border-radius: 50px;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted) !important;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.anm-stat-pill:hover {
    background: #eef2f5;
    color: var(--text-dark) !important;
}

.anm-stat-pill.active {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary) !important;
    box-shadow: 0 4px 10px rgba(0, 174, 239, 0.1);
}

.anm-stat-count {
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.anm-stat-pill.active .anm-stat-count {
    background: rgba(0, 174, 239, 0.1);
}

/* Search Tools */
.anm-search-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.anm-search-input-wrapper {
    position: relative;
    width: 280px;
}

.anm-search-input-wrapper i {
    position: absolute;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.anm-search-input-wrapper input {
    padding-left: 35px !important;
    width: 100% !important;
}

.anm-clear-filters {
    color: #e74c3c;
    font-size: 18px;
    display: flex;
    align-items: center;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.anm-clear-filters:hover {
    background: rgba(231, 76, 60, 0.05);
}

/* TABLE SYSTEM */
.anm-table-container {
    background: #fff;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.anm-table {
    width: 100%;
    border-collapse: collapse;
}

.anm-table th {
    background: #f8fafc;
    padding: 15px 20px;
    text-align: left;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
}

.anm-table th a {
    color: inherit;
    text-decoration: none;
    display: block;
}

.anm-table td {
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-dark);
}

.anm-table tr:last-child td {
    border-bottom: none;
}

.anm-table tr:hover td {
    background: #fafbfc;
}

.anm-table tr.is-answered td {
    background: rgba(0, 174, 239, 0.02);
}

.anm-ticket-id a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}

.anm-subject {
    font-weight: 500;
}

.anm-subject a {
    color: var(--text-dark);
    text-decoration: none;
}

.anm-subject a:hover {
    color: var(--primary);
}

.anm-table tr.is-answered .anm-subject a {
    font-weight: 700;
}

.anm-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.anm-status-badge.open {
    background: #e1f5fe;
    color: #01579b;
}

.anm-status-badge.closed {
    background: #f5f5f5;
    color: #616161;
}

.anm-empty-state {
    text-align: center;
    padding: 60px !important;
    color: var(--text-muted);
    font-style: italic;
}

/* PAGINATION */
.anm-pagination {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.anm-pagination a,
.anm-pagination .active {
    display: inline-block;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
}

.anm-pagination a {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-dark);
}

.anm-pagination a:hover {
    background: #f1f4f6;
    border-color: var(--border-dark);
}

.anm-pagination .active {
    background: var(--primary);
    color: #fff;
}

/* ===== MODERN HEADER & NAV ===== */
.anm-header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.anm-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 0;
    margin: 0 40px;
}

.anm-brand img {
    max-height: 75px;
    width: auto;
    display: block;
    transition: transform 0.2s;
}

.anm-brand:hover img {
    transform: scale(1.02);
}

.anm-user-nav {
    display: flex;
    align-items: center;
    gap: 25px;
}

.anm-user-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
    font-weight: 600;
}

.anm-user-links a {
    color: var(--primary) !important;
    text-decoration: none;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700 !important;
}

.anm-user-links a:hover {
    color: var(--secondary-hover) !important;
}

.anm-user-name {
    font-weight: 800;
    color: #fff;
    background: var(--primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 49, 157, 0.15);
}

.anm-user-name i {
    font-size: 14px;
}

/* Primary Action Button (Yellow like logo) */
.anm-signin-btn {
    background: var(--secondary) !important;
    color: #000 !important;
    /* Black text on yellow for contrast */
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(255, 242, 0, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
}

.anm-signin-btn:hover {
    background: #fff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
    color: var(--primary) !important;
}

.anm-signin-btn i {
    font-size: 18px !important;
}

/* Secondary Action Button */
.anm-button-secondary {
    background: #fff !important;
    color: var(--primary) !important;
    border: 2px solid var(--primary) !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    cursor: pointer !important;
}

.anm-button-secondary:hover {
    background: var(--primary) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

.anm-lang-switcher {
    display: flex;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid #f1f4f6;
}

/* /* ===== NAVIGATION BAR (METEO BRAND) ===== */
.anm-nav {
    background: #00319D !important;
    /* Deep Blue from logo */
    border-bottom: 4px solid var(--secondary) !important;
    /* Prominent Yellow line */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.anm-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 10px;
}

.anm-nav-list a {
    color: #fff !important;
    font-weight: 700 !important;
    padding: 20px 25px !important;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease !important;
}

.anm-nav-list a:hover,
.anm-nav-list a.active {
    background: rgba(255, 242, 0, 0.1);
    color: var(--secondary) !important;
}

.anm-nav-list a::after {
    background: var(--secondary) !important;
    height: 3px !important;
}

.anm-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 15px;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anm-nav-item::before {
    font-family: "FontAwesome";
    font-size: 16px;
    opacity: 0.7;
    transition: all 0.2s;
}

.anm-nav-item:hover {
    color: var(--primary);
}

.anm-nav-item:hover::before {
    opacity: 1;
    transform: translateY(-1px);
}

.anm-nav-item.active {
    color: var(--primary);
}

.anm-nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 15px;
    right: 15px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 174, 239, 0.3);
}

/* PRIMARY CTA IN NAV */
.anm-nav-item.new,
.anm-nav-item.open {
    background: var(--primary);
    color: #fff !important;
    padding: 10px 20px !important;
    border-radius: 50px;
    margin: 8px 10px 8px 0;
    box-shadow: 0 4px 12px rgba(0, 174, 239, 0.2);
    text-transform: none;
    letter-spacing: 0;
}

.anm-nav-item.new:hover,
.anm-nav-item.open:hover {
    background: #1e40af;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(0, 174, 239, 0.3);
}

.anm-nav-item.new::after,
.anm-nav-item.open::after {
    display: none !important;
}

.anm-nav-item.new::before,
.anm-nav-item.open::before {
    color: #fff !important;
    opacity: 1 !important;
}

/* ICON MAPPING */
.anm-nav-item.home::before {
    content: "\f015";
}

.anm-nav-item.kb::before {
    content: "\f02d";
}

.anm-nav-item.tickets::before {
    content: "\f145";
}

.anm-nav-item.status::before {
    content: "\f002";
}

.anm-nav-item.new::before,
.anm-nav-item.open::before {
    content: "\f067";
}

/* CONTENT AREA */
.anm-main-content {
    background: transparent !important;
    padding: 20px 40px !important;
    min-height: 600px;
}

#container {
    max-width: 1200px !important;
    width: 95% !important;
    background: #fff !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.06) !important;
}

/* GLOBAL PAGES SUBTITLE */
.page-subtitle {
    color: var(--text-muted);
    font-size: 15px;
    margin: -10px 0 30px 0;
    max-width: 700px;
    line-height: 1.6;
}

/* ===== MAIN CONTENT ===== */
#content {
    padding: 40px !important;
    min-height: 450px !important;
}

#content h1 {
    font-weight: 800 !important;
    color: var(--text-dark) !important;
    border-bottom: none !important;
    margin-bottom: 15px !important;
    font-size: 28px !important;
    letter-spacing: -0.5px !important;
}

#content h1 i {
    color: var(--primary) !important;
}

/* ===== TICKET PAGE TABS ===== */
.st {
    font-weight: 700 !important;
    color: var(--primary) !important;
    border-bottom: 3px solid var(--primary) !important;
    padding-bottom: 15px !important;
    margin-right: 20px !important;
    text-decoration: none !important;
}

.st:not(.active) {
    color: var(--text-muted) !important;
    border-bottom-color: transparent !important;
}

/* KNOWLEDGE BASE PORTAL */
.anm-kb-container {
    display: flex;
    gap: 40px;
    margin-top: 10px;
    align-items: flex-start;
}

.anm-kb-main {
    flex: 1;
}

.anm-kb-intro {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 30px;
    background: #f8fafc;
    padding: 15px 25px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
}

.anm-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
    gap: 25px;
}

.anm-kb-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.anm-kb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 49, 157, 0.12);
    border-color: var(--primary);
}

.anm-kb-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.anm-kb-card-header i {
    font-size: 24px;
    color: var(--primary);
    background: rgba(0, 49, 157, 0.05);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.3s ease;
}

.anm-kb-card:hover .anm-kb-card-header i {
    background: var(--primary);
    color: var(--secondary);
}

.anm-kb-card h4 {
    margin: 0 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
}

.anm-kb-card h4 a {
    color: inherit;
    text-decoration: none;
}

.anm-kb-count {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 400;
}

.anm-kb-description {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.anm-kb-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    padding: 15px 0;
    margin-bottom: 15px;
    border-top: 1px solid #f1f4f6;
}

.anm-kb-sub-item {
    font-size: 13px;
    color: var(--text-dark);
    background: #f8fafc;
    padding: 6px 12px;
    border-radius: 50px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--border);
}

.anm-kb-sub-item:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary);
}

.anm-kb-popular {
    border-top: 1px solid #f1f4f6;
    padding-top: 15px;
}

.anm-kb-faq-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.anm-kb-faq-link:hover {
    color: var(--primary);
}

.anm-kb-faq-link i {
    color: var(--text-muted);
    font-size: 12px;
}

.anm-kb-sidebar {
    width: 320px;
}

.anm-sidebar-widget {
    background: #ffffff;
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    /* Blue accent on sidebar */
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
}

.anm-sidebar-widget h3 {
    font-size: 17px !important;
    margin-top: 0 !important;
    margin-bottom: 20px !important;
    color: var(--primary);
    font-weight: 800 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--secondary);
    display: inline-block;
    padding-bottom: 5px;
}

.anm-select-full {
    width: 100% !important;
    max-width: 100% !important;
}

.anm-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.anm-sidebar-link.primary-action {
    background: var(--secondary);
    color: #000 !important;
    border-color: var(--secondary);
}

.anm-sidebar-link.primary-action i {
    color: #000;
}

.anm-sidebar-link.primary-action:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary) !important;
}

.anm-sidebar-link.primary-action:hover i {
    color: var(--primary);
}

.anm-sidebar-link.secondary-action {
    border-width: 2px;
}

.anm-sidebar-link:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(0, 49, 157, 0.1);
}

.anm-sidebar-link i {
    color: var(--primary);
    font-size: 16px;
}

/* SEARCH FIELD WIDGET */
.search.well {
    background: #f8fafc !important;
    border: 1px solid #eef2f5 !important;
    padding: 25px !important;
    border-radius: 12px !important;
    margin-bottom: 30px !important;
}

#ticketSearchForm {
    display: flex !important;
    gap: 15px !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

#ticketSearchForm input[type="text"] {
    flex: 1 !important;
    min-width: 250px !important;
    max-width: none !important;
    margin: 0 !important;
}

#ticketSearchForm input[type="submit"] {
    margin: 0 !important;
}

/* ===== LANDING PAGE SEARCH - HERO STYLE ===== */
#landing_page #kb-search {
    background: #ffffff;
    padding: 50px 30px !important;
    border-radius: 24px !important;
    margin: 20px 0 50px 0 !important;
    border: 1px solid #eef2f5 !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.03) !important;
    text-align: center !important;
}

#kb-search form {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    max-width: 700px !important;
    margin: 0 auto !important;
}

#kb-search input#query {
    padding: 18px 30px !important;
    border-radius: 50px 0 0 50px !important;
    border: 2px solid #e1e8ed !important;
    border-right: none !important;
    font-size: 16px !important;
    width: 100% !important;
    max-width: 500px !important;
    background: #fbfdfe !important;
    transition: all 0.3s ease !important;
}

#kb-search input#query:focus {
    border-color: var(--primary) !important;
    background: #fff !important;
    outline: none !important;
}

#kb-search #searchSubmit {
    padding: 18px 40px !important;
    border-radius: 0 50px 50px 0 !important;
    background: var(--primary) !important;
    color: white !important;
    font-weight: 700 !important;
    border: 2px solid var(--primary) !important;
    font-size: 16px !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    margin: 0 !important;
    box-shadow: none !important;
}

#kb-search #searchSubmit:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(0, 174, 239, 0.3) !important;
}

/* ===== LANDING PAGE ACTION BUTTONS ===== */
#landing_page a.front-page-button {
    display: block !important;
    padding: 22px !important;
    margin-bottom: 20px !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
    color: white !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05) !important;
}

#landing_page #new_ticket {
    background: linear-gradient(135deg, #00AEEF 0%, #0088ba 100%) !important;
}

#landing_page #check_status {
    background: linear-gradient(135deg, #82b440 0%, #689132 100%) !important;
}

#landing_page a.front-page-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}


/* global form button unification */
.anm-form input[type="submit"],
.anm-form .btn {
    background: linear-gradient(135deg, var(--primary) 0%, #004ba0 100%) !important;
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(0, 95, 195, 0.2) !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.anm-form input[type="submit"]:hover,
.anm-form .btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(0, 95, 195, 0.3) !important;
    filter: brightness(1.1);
}

.anm-form input[type="reset"],
.anm-form input[type="button"] {
    background: #f1f5f9 !important;
    color: var(--text-dark) !important;
    padding: 12px 30px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    border: 1px solid var(--border) !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
}

.anm-form input[type="reset"]:hover,
.anm-form input[type="button"]:hover {
    background: #e2e8f0 !important;
}

/* Captcha Styling */
.anm-captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.anm-captcha-container img {
    border-radius: 8px;
    border: 1px solid var(--border);
}

.anm-captcha-container input {
    width: 150px !important;
    flex: none !important;
}

/* =============================================================
 * ANM FORM SYSTEM
 * Used by: register.inc.php, profile.inc.php, dynamic-form.tmpl.php
 * Clean div-based layout - no more table hacks!
 * ============================================================= */

/* Form wrapper */
.anm-form {
    width: 100%;
    max-width: 680px;
}

/* Section block (e.g. "Contact Information", "Preferences") */
.anm-form-section {
    margin-bottom: 10px;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
}

.anm-form-section:last-of-type {
    border-bottom: none;
}

.anm-form-section h3 {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    letter-spacing: -0.2px !important;
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    display: flex;
    align-items: center;
    gap: 12px;
}

.anm-form-section h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #f1f4f6;
    margin-left: 10px;
}

.anm-form-instructions {
    font-size: 14px;
    color: var(--text-muted);
    margin: -16px 0 20px 0;
    line-height: 1.6;
}

/* Individual field */
.anm-field {
    margin-bottom: 30px;
}

.anm-field:last-child {
    margin-bottom: 0;
}

/* Field Layout (Improved Horizontal Grid) */
.anm-field-layout {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 5px;
    min-height: 48px;
}

.anm-field-label {
    flex: 0 0 280px;
    padding-top: 14px;
    /* Align with input better */
}

/* Specific styling for labels and spans and hints */
.anm-field-label label,
.anm-field-label span:not(.anm-required-star) {
    display: block;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    line-height: 1.4 !important;
    cursor: default;
    text-transform: capitalize;
}

/* Required star */
.anm-required-star {
    color: #e74c3c !important;
    margin-left: 5px !important;
    font-size: 16px !important;
    display: inline !important;
    vertical-align: middle !important;
    line-height: 1 !important;
}

.anm-field-control {
    flex: 1;
    min-width: 0;
    max-width: 500px;
    position: relative !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Field footer (Hints & Errors) */
.anm-field-footer {
    padding-left: 290px;
}

.anm-field-hint {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 8px 0;
    line-height: 1.6;
    font-style: normal;
}

/* Field error */
.anm-field-error {
    color: #e74c3c;
    font-size: 13px;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.anm-field-error::before {
    content: '!';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    background: #e74c3c;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    flex-shrink: 0;
}

/* Static value display (read-only field) */
.anm-static-value {
    font-size: 14px;
    color: var(--text-dark);
    padding: 10px 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
}

.anm-field input[type="text"],
.anm-field input[type="password"],
.anm-field input[type="email"],
.anm-field input[type="tel"],
.anm-field textarea,
.anm-field select {
    width: 100% !important;
    max-width: 500px !important;
    display: block !important;
    margin: 0 !important;
    padding: 12px 16px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 14px !important;
    line-height: 1.4 !important;
    transition: all 0.2s ease !important;
    background-color: #fff !important;
    box-sizing: border-box !important;
}

.anm-field select {
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
    cursor: pointer !important;
}

.anm-field input:focus,
.anm-field textarea:focus,
.anm-field select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.08) !important;
    outline: none !important;
}

/* Checkboxes inside .anm-field: flex row layout */
.anm-field label.checkbox {
    display: inline-flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 600 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    margin: 4px 0 !important;
}

.anm-field label.checkbox input[type="checkbox"],
.anm-field label.checkbox input[type="radio"] {
    margin: 0 !important;
    flex-shrink: 0 !important;
}

/* BOOLEAN / CHECKBOX FIELDS */
.anm-bool-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.anm-bool-widget {
    flex-shrink: 0;
}

.anm-bool-label {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin: 0 !important;
    cursor: pointer;
}

.anm-kb-card-header i {
    font-size: 24px;
    color: var(--primary);
    background: rgba(0, 49, 157, 0.05);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.anm-kb-card h4 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: var(--primary) !important;
    margin: 0 !important;
}

.anm-bool-field .anm-field-footer {
    padding-left: 36px;
    margin-top: -5px;
}

.anm-bool-widget label.checkbox {
    margin: 0 !important;
    padding: 0 !important;
}

.anm-bool-widget input[type="checkbox"] {
    width: 20px !important;
    height: 20px !important;
}

/* Captcha wrapper */
.anm-captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 8px;
}

.anm-captcha-container img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    height: 38px;
}

.anm-captcha-container input {
    max-width: 120px !important;
}

/* BREADCRUMBS */
.anm-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 13px;
    font-weight: 500;
}

.anm-breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
}

.anm-breadcrumbs .sep {
    color: var(--text-muted);
    font-size: 10px;
}

/* FAQ ARTICLE */
.anm-kb-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 30px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.anm-faq-header {
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.anm-faq-header h1 {
    font-size: 28px !important;
    margin: 0 0 10px 0 !important;
}

.anm-faq-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

/* KB SUBCATEGORIES */
.anm-kb-sub-header {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 30px 0 15px 0;
}

.anm-kb-sub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.anm-kb-sub-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}

.anm-kb-sub-card:hover {
    border-color: var(--primary);
    background: #f8fafc;
    transform: translateX(5px);
}

.anm-kb-sub-card i {
    color: var(--primary);
    font-size: 18px;
}

.anm-kb-sub-card-text strong {
    display: block;
    color: var(--text-dark);
    font-size: 14px;
}

.anm-kb-sub-card-text .count {
    font-size: 12px;
    color: var(--text-muted);
}

/* KB RESULTS LIST */
.anm-kb-results-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anm-kb-result-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.anm-kb-result-item:hover {
    border-color: var(--primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.anm-kb-result-item i {
    color: var(--text-muted);
}

.anm-sidebar-static-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-muted);
}

.anm-sidebar-static-item i {
    color: var(--primary);
    opacity: 0.5;
}

/* LOGIN PAGE SPECIFIC - Aggressive Reset for Unified Look */
.anm-login-container {
    display: flex;
    gap: 40px;
    margin: 30px 0 50px 0;
    align-items: stretch;
}

.anm-login-box {
    flex: 1;
    background: #fff;
    padding: 45px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

/* TOTAL OVERRIDE of legacy #clientLogin */
#clientLogin {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 25px !important;
    /* Kill the osTicket padlock icon once and for all */
}

/* Specifically target the background on legacy IDs */
#clientLogin,
#clientLogin .instructions,
#clientForm {
    background-image: none !important;
    background-color: transparent !important;
}

.anm-login-sidebar {
    width: 320px;
    background: #f8fafc;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.anm-registration-prompt {
    text-align: center;
}

.anm-registration-prompt h3 {
    margin-bottom: 12px !important;
    font-size: 20px !important;
    color: var(--primary) !important;
}

.anm-registration-prompt p {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.6;
}

.anm-login-footer {
    margin-top: 50px;
    text-align: center;
}

.anm-login-footer p {
    background: #f1f5f9;
    padding: 15px 30px;
    border-radius: 50px;
    display: inline-block;
    color: var(--text-muted);
    font-size: 14px;
}

/* UTILITIES */
.anm-hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

.anm-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.anm-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.anm-button-secondary {
    display: inline-block;
    padding: 10px 20px;
    background: #fff;
    border: 1px solid var(--border-dark);
    border-radius: 50px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    text-align: center;
}

.anm-button-secondary:hover {
    background: #f1f4f6;
    border-color: var(--border-dark);
}

/* ===== FORM COMPONENTS ===== */
.anm-form-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f1f4f6;
}

.anm-form-section h3 {
    font-size: 17px !important;
    margin-bottom: 25px !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

.anm-form-instructions {
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 25px;
    line-height: 1.5;
    background: #f0f7ff;
    padding: 15px 20px;
    border-radius: 4px var(--radius-sm) var(--radius-sm) 4px;
    border-left: 3px solid var(--primary);
    font-weight: 500;
}

.anm-static-value {
    padding: 12px 0;
    font-size: 15px;
    color: var(--text-dark);
    font-weight: 600;
}

/* ===== SINGLE TICKET VIEW ===== */
.anm-ticket-view {
    margin-top: 10px;
}

.anm-ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 30px;
    gap: 30px;
    flex-wrap: wrap;
    background: #f8fafc;
    padding: 30px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.anm-ticket-title-block {
    flex-grow: 1;
}

.anm-ticket-number {
    display: block;
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.anm-ticket-header h1 {
    margin: 0 0 15px 0 !important;
    font-size: 24px !important;
    color: var(--primary) !important;
}

/* TICKET REPLY PREMIUM CARD */
.anm-reply-container {
    margin-top: 50px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.anm-reply-container .anm-form {
    padding: 40px;
}

.anm-reply-title {
    font-size: 18px !important;
    margin: 0 0 20px 0 !important;
    padding: 0 0 8px 0 !important;
    border-bottom: 2px solid var(--secondary);
    color: var(--primary) !important;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.anm-attachments-wrapper {
    margin-top: 25px;
    padding: 20px;
    background: #fcfdfe;
    border: 2px dashed #e2e8f0;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.anm-attachments-wrapper:hover {
    border-color: var(--primary);
    background: #fff;
}

/* Redactor Integration Polish - Premium Look */
.redactor-box {
    border-radius: 8px !important;
    border: 1px solid var(--border) !important;
    overflow: hidden !important;
    background: #fff !important;
    box-shadow: 0 2px 8px rgba(0, 49, 157, 0.03) !important;
    transition: all 0.2s ease !important;
}

.redactor-box:focus-within {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 95, 195, 0.1) !important;
}

.redactor-toolbar {
    border-bottom: 1px solid var(--border) !important;
    background: #f8fafc !important;
    padding: 10px !important;
}

.redactor-editor {
    min-height: 150px !important;
    padding: 15px 20px !important;
    color: var(--text-dark) !important;
    line-height: 1.6 !important;
}

.redactor-toolbar li a {
    border-radius: 4px !important;
    margin-right: 2px !important;
}

/* Hide original raw textarea when redactor is active */
.redactor-box textarea {
    display: none !important;
}

.anm-ticket-meta-pills {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.anm-meta-pill {
    background: #fff;
    border: 1px solid var(--border);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}

.anm-ticket-actions {
    display: flex;
    gap: 10px;
}

/* DETAILS GRID */
.anm-ticket-details-grid {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-bottom: 40px;
}

.anm-detail-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.anm-detail-card h3 {
    margin: 0 0 20px 0 !important;
    font-size: 16px !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    color: var(--text-dark);
}

.anm-detail-item {
    display: flex;
    margin-bottom: 12px;
    font-size: 14px;
}

.anm-detail-item label {
    width: 450px;
    color: var(--text-muted);
    font-weight: 600;
    flex-shrink: 0;
    padding-right: 20px;
}

@media (max-width: 768px) {
    .anm-detail-item {
        flex-direction: column;
    }
    .anm-detail-item label {
        width: 100% !important;
        margin-bottom: 4px;
    }
}

.anm-detail-item span {
    color: var(--text-dark);
    word-break: break-word;
}

/* PREMIUM ALERTS */
.anm-alert,
.error_bar,
.warning_bar,
.notice_bar,
#msg_error,
#msg_warning,
#msg_notice {
    display: flex !important;
    align-items: center !important;
    padding: 20px 24px !important;
    border-radius: 12px !important;
    margin-bottom: 35px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    position: relative !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
    border: 1px solid transparent !important;
    border-left-width: 6px !important;
    height: auto !important;
    line-height: 1.5 !important;
    animation: alertSlideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: auto !important;
}

/* Error - Red */
.error_bar,
#msg_error {
    background: #fff5f5 !important;
    border-color: #fee2e2 !important;
    border-left-color: #ef4444 !important;
    color: #991b1b !important;
}

.error_bar::before,
#msg_error::before {
    content: "\f057";
    font-family: "FontAwesome";
    font-size: 22px;
    margin-right: 15px;
    color: #ef4444;
}

/* Warning - Orange */
.warning_bar,
#msg_warning,
.anm-alert-warning {
    background: #fffbeb !important;
    border-color: #fef3c7 !important;
    border-left-color: #f59e0b !important;
    color: #92400e !important;
}

.warning_bar::before,
#msg_warning::before,
.anm-alert-warning::before {
    content: "\f071";
    font-family: "FontAwesome";
    font-size: 20px;
    margin-right: 15px;
    color: #f59e0b;
}

/* Notice/Info - Blue */
.notice_bar,
#msg_notice,
.anm-alert-info {
    background: #eff6ff !important;
    border-color: #dbeafe !important;
    border-left-color: #3b82f6 !important;
    color: #1e40af !important;
}

.notice_bar::before,
#msg_notice::before,
.anm-alert-info::before {
    content: "\f05a";
    font-family: "FontAwesome";
    font-size: 20px;
    margin-right: 15px;
    color: #3b82f6;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* REPLY SECTION */
.anm-reply-container {
    margin-top: 40px;
    background: #f8fafc;
    padding: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.anm-reply-title {
    margin-bottom: 20px !important;
    font-size: 20px !important;
}

.anm-attachments-wrapper {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

/* THREAD */
#ticketThread {
    margin: 30px 0;
}

.anm-form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 30px 0 10px 0;
    margin-top: 10px;
}

/* --- Legacy table inside #ticketForm (open.inc.php) - keep working --- */
#ticketForm>table {
    width: 100% !important;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
}

/* Legacy table.padded on pages not yet rewritten - neutral reset */
table.padded {
    width: 100% !important;
    border-spacing: 0 !important;
    border-collapse: collapse !important;
}

/* ===== STANDARD INPUT STYLING ===== */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
textarea,
select {
    max-width: 480px !important;
    padding: 10px 14px !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    background: #fff !important;
    font-size: 14px !important;
    font-family: 'Inter', sans-serif !important;
    transition: border-color 0.2s, box-shadow 0.2s !important;
    outline: none !important;
    box-sizing: border-box !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(0, 174, 239, 0.08) !important;
}

/* In legacy ticketForm (open.inc.php), inputs inside colspan cells go full width */
#ticketForm td[colspan] input[type="text"],
#ticketForm td[colspan] textarea,
#ticketForm td[colspan] select {
    width: 100% !important;
    display: block !important;
    margin-top: 6px !important;
}

/* Timezone select inside .anm-field can be wider */
.anm-field select#timezone-dropdown {
    max-width: 600px !important;
}


/* ===== BUTTONS ===== */
input[type="submit"],
button.button {
    background: var(--primary) !important;
    color: #fff !important;
    padding: 12px 35px !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    font-family: 'Inter', sans-serif !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 4px 15px rgba(0, 174, 239, 0.2) !important;
    display: inline-block !important;
}

input[type="submit"]:hover {
    background: var(--primary-dark) !important;
    transform: translateY(-1px) !important;
}

input[type="button"],
input[type="reset"] {
    background: #f1f4f6 !important;
    color: var(--text-muted) !important;
    padding: 12px 25px !important;
    border: none !important;
    border-radius: 50px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    font-family: 'Inter', sans-serif !important;
}


/* ===== MODERN CHECKBOXES & RADIOS (Base Appearance) ===== */
input[type="checkbox"],
input[type="radio"] {
    appearance: none !important;
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    /* Prevent shrinking */
    border: 2px solid #d1d9e0 !important;
    border-radius: 4px !important;
    background: #fff !important;
    cursor: pointer !important;
    position: relative !important;
    transition: all 0.2s !important;
    vertical-align: middle !important;
    margin: 0 8px 0 0 !important;
}

input[type="radio"] {
    border-radius: 50% !important;
}

input[type="checkbox"]:checked,
input[type="radio"]:checked {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

input[type="checkbox"]:checked::after {
    content: "\f00c" !important;
    font-family: "FontAwesome" !important;
    color: white !important;
    font-size: 12px !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

input[type="radio"]:checked::after {
    content: "" !important;
    width: 8px !important;
    height: 8px !important;
    background: white !important;
    border-radius: 50% !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}


/* =============================================================
 * CHECKBOX/RADIO LAYOUT
 * 
 * CONFIRMED HTML STRUCTURE (from dynamic-form.tmpl.php + CheckboxWidget):
 *
 *   <td colspan="2">
 *     <label for="...">                     ← OUTER LABEL
 *       <span>Title</span>                  ← 1st child
 *       <br>                                ← 2nd child
 *       <em>Hint description</em>           ← 3rd child
 *       <br>                                ← 4th child
 *       <label class="checkbox">            ← LAST child (needs to appear LEFT)
 *         <input type="checkbox"/>
 *       </label>
 *     </label>
 *   </td>
 *
 * GOAL: Move checkbox to left of title text.
 * SOLUTION: Absolute position the inner label.checkbox to the left edge
 *           of the outer label, which gets padding-left to make room.
 * ============================================================= */

/* --- OUTER LABEL that wraps a checkbox field --- */
#content td[colspan]>label:has(> label.checkbox) {
    display: block !important;
    position: relative !important;
    padding-left: 38px !important;
    min-height: 26px !important;
}

/* --- INNER label.checkbox: anchored to top-left --- */
#content td[colspan]>label>label.checkbox {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-block !important;
}

/* Checkbox input inside label.checkbox */
label.checkbox input[type="checkbox"],
label.checkbox input[type="radio"] {
    vertical-align: middle !important;
    margin: 0 !important;
    cursor: pointer !important;
}

/* --- OUTER LABEL title and hint --- */
#content td[colspan]>label:has(> label.checkbox)>span:not(.error) {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    line-height: 1.4 !important;
    margin-bottom: 2px !important;
}

#content td[colspan]>label:has(> label.checkbox)>em {
    display: block !important;
    font-style: normal !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin-bottom: 4px !important;
}

/* Hide <br> tags inside these specific labels */
#content td[colspan]>label:has(> label.checkbox)>br {
    display: none !important;
}

/* --- OUTER LABELS that do NOT contain checkboxes (text fields, selects, etc.) ---
 * We style these separately to avoid contamination.
 */
#content td[colspan]>label:not(:has(> label.checkbox))>span:not(.error) {
    display: block !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 3px !important;
}

#content td[colspan]>label:not(:has(> label.checkbox))>em {
    display: block !important;
    font-style: normal !important;
    font-size: 13px !important;
    color: var(--text-muted) !important;
    line-height: 1.5 !important;
    margin-bottom: 6px !important;
}

#content td[colspan]>label:not(:has(> label.checkbox))>br {
    display: none !important;
}

/* Section break headers in dynamic forms */
.form-header h3 {
    color: var(--primary) !important;
    font-weight: 700 !important;
    font-size: 17px !important;
    margin: 15px 0 5px 0 !important;
    border-bottom: 1px solid var(--border) !important;
    padding-bottom: 8px !important;
}

.form-header em {
    font-style: normal !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
}




/* ===== SELECT2 / MULTI-SELECT (PREMIUM) ===== */
.select2-container {
    max-width: 500px !important;
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple,
.select2-container--default .select2-selection--single {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    padding: 4px 8px !important;
    min-height: 48px !important;
    background: #fff !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    align-items: center !important;
}

.select2-container--default .select2-selection--multiple {
    padding-bottom: 2px !important;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, 0.08) !important;
    outline: none !important;
}

/* Multi-select Pills (REFINED & COMPACT) */
.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0369a1 !important;
    border-radius: 6px !important;
    padding: 2px 10px 2px 24px !important;
    /* Compact padding */
    font-weight: 700 !important;
    font-size: 13px !important;
    margin: 4px 6px 4px 0 !important;
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
}

/* The 'x' remove button */
.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: #0369a1 !important;
    opacity: 0.8 !important;
    position: absolute !important;
    left: 8px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    margin: 0 !important;
    font-size: 14px !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    opacity: 1 !important;
    background: none !important;
}

/* The Dropdown Menu */
.select2-dropdown {
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
    z-index: 10001 !important;
    overflow: hidden !important;
}

.select2-results__option {
    padding: 10px 15px !important;
    font-size: 14px !important;
    color: var(--text-dark) !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: var(--primary) !important;
    color: #fff !important;
}

.select2-container--default .select2-results__option[aria-selected="true"] {
    background-color: #f1f4f6 !important;
    color: var(--primary) !important;
    font-weight: 700 !important;
}

/* Search field inside dropdown */
.select2-search--dropdown .select2-search__field {
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    background: #f8fafc !important;
}

/* Fix for inline search field in multi-selects */
.select2-container--default .select2-selection--multiple .select2-search--inline .select2-search__field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
}

/* Single Select Arrow */
.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 46px !important;
    right: 10px !important;
}

/* =============================================================
 * OTHER DYNAMIC FIELD ENHANCEMENTS
 * ============================================================= */

/* File Upload Area */
.filedrop {
    border: 2px dashed var(--border) !important;
    background: #f8fafc !important;
    padding: 30px !important;
    border-radius: var(--radius) !important;
    text-align: center !important;
    transition: all 0.2s !important;
    margin-top: 10px !important;
}

.filedrop:hover {
    border-color: var(--primary) !important;
    background: #eff6ff !important;
}

.filedrop i.icon-upload {
    font-size: 28px !important;
    color: var(--primary) !important;
    display: block !important;
    margin-bottom: 10px !important;
}

/* Datepicker (jQuery UI) override */
.ui-datepicker {
    border: none !important;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15) !important;
    border-radius: 12px !important;
    padding: 10px !important;
    background: #fff !important;
    font-family: inherit !important;
    z-index: 10001 !important;
}

.ui-datepicker-header {
    background: var(--primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 10px 0 !important;
}

.ui-state-default,
.ui-widget-content .ui-state-default {
    border: none !important;
    background: #f8fafc !important;
    text-align: center !important;
    border-radius: 4px !important;
    padding: 8px !important;
}

.ui-state-active,
.ui-widget-content .ui-state-active {
    background: var(--primary) !important;
    color: #fff !important;
    font-weight: 700 !important;
}

/* Date/Time text input */
.anm-field-control input.dp {
    padding-left: 44px !important;
    background: #fff !important;
    /* Remove any background icon/image */
}

/* FIXED CALENDAR ICON - Better alignment and color */
.anm-field-control:has(input.dp)::before {
    content: "\f073" !important;
    font-family: "FontAwesome" !important;
    position: absolute !important;
    left: 14px !important;
    top: 24px !important;
    /* Fixed position relative to input start */
    transform: translateY(-50%) !important;
    color: var(--primary) !important;
    font-size: 16px !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    z-index: 5 !important;
}

/* Timezone picker / Extras (Rendered via renderExtras) - HIDDEN BY REQUEST */
.anm-field-control .faded,
.anm-field-control span.faded {
    display: none !important;
}

/* Hide duplicated osTicket core calendar icons */
.dp+img,
.ui-datepicker-trigger,
img.ui-datepicker-trigger,
.dp~img,
.dp~.ui-datepicker-trigger {
    display: none !important;
}

.anm-field-control .faded a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px dashed var(--primary);
}

.anm-field-control .faded img {
    width: 14px;
    height: 14px;
    filter: grayscale(1);
    opacity: 0.6;
}


/* ===== TICKET LIST TABLE ===== */
#ticketTable {
    border-collapse: collapse !important;
    width: 100% !important;
    margin-top: 20px !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
}

#ticketTable thead th {
    background: #f8fafc !important;
    padding: 14px 16px !important;
    font-size: 12px !important;
    text-transform: uppercase !important;
    color: var(--text-muted) !important;
    border-bottom: 2px solid var(--border) !important;
}

#ticketTable td {
    padding: 13px 16px !important;
    border-bottom: 1px solid #f1f4f6 !important;
    font-size: 14px !important;
}

#ticketTable tr:hover td {
    background: #f9fbff !important;
}

/* ===== STATUS LABELS ===== */
.status_label {
    padding: 6px 14px !important;
    border-radius: 50px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

/* LEGACY FORM CLEANUPS (Ensuring login inputs don't fall back to Helvetica) */
.anm-form input[type="text"],
.anm-form input[type="password"],
.anm-form input[type="email"],
.anm-form textarea,
.nowarn {
    font-family: 'Inter', sans-serif !important;
}

/* ===== HR & MISC ===== */
hr {
    border: 0 !important;
    border-top: 1px solid var(--border) !important;
}

/* Cleanup redundant HRs in specialized pages */
#content>form>hr,
#content>table+hr,
#content>table.padded+hr {
    display: none !important;
}

/* ===== FOOTER ===== */
/* ===== FOOTER (METEO Brand) ===== */
.anm-footer {
    padding: 60px 0;
    margin-top: 60px;
    background: #00319D;
    /* Deep Blue footer */
    color: #fff;
    position: relative;
    overflow: hidden;
}

.anm-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--secondary);
    /* Yellow line on top of footer */
}

.anm-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.anm-footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    margin: 0;
}

.anm-footer-info strong {
    color: var(--secondary);
    font-weight: 700;
}

#poweredBy {
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    font-size: 11px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

#poweredBy:hover {
    color: var(--secondary);
}

/* ===== TICKET THREAD ===== */
.anm-thread-entry {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: box-shadow 0.2s;
}

.anm-thread-entry:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.anm-thread-entry.response {
    /* Staff Response */
    background: #f8fafc;
    border-left: 4px solid var(--primary);
}

.anm-thread-entry.message {
    /* Client Message */
    border-left: 4px solid #64748b;
}

.anm-thread-avatar {
    flex-shrink: 0;
}

.anm-thread-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.anm-thread-content {
    flex-grow: 1;
    min-width: 0;
    /* Important for truncate */
}

.anm-thread-header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

/* LEGACY MAPPING: Make core osTicket thread entries look like ANM premium cards */
.thread-entry,
.anm-thread-entry {
    display: block !important;
    position: relative !important;
    padding: 30px !important;
    background: #fff !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius) !important;
    margin-bottom: 30px !important;
    box-shadow: 0 4px 15px rgba(0, 49, 157, 0.04) !important;
    transition: all 0.3s ease !important;
}

.thread-entry header,
.thread-entry .header {
    background: #f8fafc !important;
    margin: -30px -30px 20px -30px !important;
    padding: 15px 30px !important;
    border-radius: var(--radius) var(--radius) 0 0 !important;
    border-bottom: 1px solid var(--border) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    font-weight: 700 !important;
    color: var(--text-dark) !important;
}

.thread-entry.response {
    border-left: 5px solid var(--primary) !important;
}

.thread-entry.message {
    border-left: 5px solid #64748b !important;
}

.thread-entry.response header {
    background: #eff6ff !important;
}

.thread-entry.message header {
    background: #f8fafc !important;
}

/* Thread Icons Overrides */
.thread-entry .icon {
    font-size: 18px !important;
    color: var(--primary) !important;
}

/* Thread event styling - ascuns la client */
.thread-event,
.anm-thread-event {
    display: none !important;
}

.thread-event::before {
    content: '' !important;
    position: absolute !important;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #f1f4f6;
    z-index: 1;
}

.thread-event span {
    background: #f8fafc !important;
    color: var(--text-muted) !important;
    padding: 8px 20px !important;
    border-radius: 50px !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    position: relative !important;
    z-index: 2;
    border: 1px solid var(--border) !important;
}

.anm-thread-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
}

.anm-thread-name {
    font-weight: 700;
    color: var(--text-dark);
    font-size: 15px;
}

.anm-thread-date {
    font-size: 13px;
    color: var(--text-muted);
}

.anm-thread-edited {
    font-size: 12px;
    color: #e65100;
    background: #fff3e0;
    padding: 2px 8px;
    border-radius: 4px;
}

.anm-thread-title {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
}

/* ===== PASSWORD VISIBILITY TOGGLE ===== */
.anm-pw-wrapper {
    display: block;
    position: relative;
    width: 100%;
    max-width: 500px;
}

.anm-pw-wrapper input[type="password"],
.anm-pw-wrapper input[type="text"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-right: 46px !important;
    -webkit-box-sizing: border-box;
    box-sizing: border-box !important;
}

.anm-pw-toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    position: absolute;
    right: 10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    background: transparent;
    border: none;
    outline: none;
    margin: 0;
    padding: 0;
    width: 28px;
    height: 28px;
    cursor: pointer;
    color: var(--text-muted);
    display: block;
    line-height: 28px;
    text-align: center;
    border-radius: 6px;
    -webkit-transition: color 0.2s, background 0.2s;
    transition: color 0.2s, background 0.2s;
    z-index: 2;
}

.anm-pw-toggle svg {
    display: block;
    width: 16px;
    height: 16px;
    margin: 6px auto 0;
    stroke: currentColor;
    fill: none;
    pointer-events: none;
}

.anm-pw-toggle:hover {
    color: var(--primary);
    background: rgba(0, 95, 195, 0.07);
}

.anm-pw-toggle:active {
    opacity: 0.7;
}

.anm-pw-toggle.is-visible {
    color: var(--primary);
}

.anm-thread-body {
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-dark);
    word-break: break-word;
}

.anm-thread-attachments {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #f1f4f6;
}

.anm-thread-attachment {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: 13px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.2s;
    max-width: 300px;
}

.anm-thread-attachment:hover {
    border-color: var(--primary);
    background: #fff;
    color: var(--primary);
}

.anm-attachment-name {
    flex: 1;
}

.anm-attachment-size {
    color: var(--text-muted);
    font-size: 11px;
}

/* ===== LANDING PAGE ===== */
.anm-landing-flow {
    display: flex;
    gap: 40px;
    margin-top: 10px;
}

.anm-landing-main {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 360px);
    /* Ensure main content doesn't squeeze sidebar too much */
}

.anm-hero-wrapper {
    margin-bottom: 40px;
}

.anm-hero-search {
    text-align: center;
    padding: 80px 40px;
    background: linear-gradient(135deg, var(--primary) 0%, #001a53 100%);
    border-radius: var(--radius);
    color: #fff;
    box-shadow: 0 25px 60px rgba(0, 49, 157, 0.2);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.anm-hero-badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(255, 242, 0, 0.15);
    color: var(--secondary);
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 242, 0, 0.3);
}

.anm-hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.anm-hero-stats span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
}

.anm-hero-stats i {
    color: var(--secondary);
    font-size: 16px;
}

.anm-hero-search::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 242, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.anm-hero-search h1 {
    color: #fff !important;
    font-size: 42px !important;
    margin-bottom: 20px !important;
    font-weight: 900 !important;
    letter-spacing: -1.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.anm-hero-search::after {
    content: 'Bun venit la Centrul de Suport ANM';
    display: block;
    font-size: 18px;
    color: var(--secondary);
    font-weight: 600;
    margin-bottom: 35px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.anm-big-search .anm-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    background: #fff;
    padding: 8px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.anm-big-search i {
    color: var(--text-muted);
    font-size: 20px;
    margin-left: 15px;
}

.anm-big-search input {
    flex: 1;
    border: none !important;
    padding: 10px 15px !important;
    font-size: 16px !important;
    color: var(--text-dark) !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
}

.anm-big-search button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.anm-big-search button:hover {
    background: #1e40af;
}

.anm-landing-body {
    margin-bottom: 60px;
}

.anm-featured-kb {
    margin-top: 60px;
}

.anm-section-title {
    font-size: 22px !important;
    margin-bottom: 25px !important;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
}

.anm-kb-article-item {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f4f6;
}

.anm-kb-article-item {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(0, 49, 157, 0.05);
}

.anm-kb-article-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.anm-kb-article-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700 !important;
    color: var(--primary) !important;
    text-decoration: none;
    font-size: 15px;
    transition: all 0.2s;
}

.anm-kb-article-item a:hover {
    color: var(--secondary-hover) !important;
    transform: translateX(4px);
}

.anm-kb-article-item i {
    color: var(--primary);
    background: rgba(0, 49, 157, 0.05);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 14px;
}

.anm-kb-teaser {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 8px;
    padding-left: 44px;
    /* Align with text after icon */
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== KNOWLEDGE BASE INTERFACE (FAQ) ===== */
.anm-kb-container {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.anm-kb-main {
    flex: 1;
    min-width: 0;
}

.anm-kb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(400px, 100%), 1fr));
    gap: 30px;
}

.anm-kb-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.anm-kb-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--secondary);
}

.anm-kb-card-header i {
    font-size: 24px;
    color: var(--primary);
}

.anm-kb-card-header h4 {
    font-size: 18px !important;
    margin: 0 !important;
}

.anm-kb-description {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 20px;
    line-height: 1.6;
}

.anm-kb-subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 25px;
}

.anm-kb-sub-item {
    background: #f1f5f9;
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-dark) !important;
    text-decoration: none !important;
}

.anm-kb-sub-item:hover {
    background: var(--primary);
    color: #fff !important;
}

.anm-kb-popular {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.anm-kb-faq-link {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: var(--primary) !important;
    text-decoration: none !important;
    font-weight: 600;
}

.anm-kb-faq-link:hover {
    text-decoration: underline !important;
}

/* SIDEBAR LAYOUT */
.anm-sidebar {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.anm-sidebar-widget {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.anm-sidebar-widget:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 49, 157, 0.12);
    border-color: var(--primary);
}

.anm-sidebar-widget h3 {
    font-size: 15px !important;
    font-weight: 800 !important;
    color: var(--primary) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px !important;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--secondary);
    display: block;
}

.anm-sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.anm-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-dark) !important;
    text-decoration: none !important;
    font-size: 13.5px;
    font-weight: 600;
    transition: all 0.2s;
}

.anm-sidebar-link:hover {
    background: #fff;
    border-color: var(--primary);
    color: var(--primary) !important;
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(0, 49, 157, 0.08);
}

.anm-sidebar-link i {
    color: var(--primary);
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.anm-sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.anm-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: linear-gradient(135deg, #fff 0%, #f0f7ff 100%);
}

.anm-quick-actions .anm-signin-btn,
.anm-quick-actions .anm-button-secondary {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

/* ===== INLINE FORMS ===== */
.anm-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.anm-inline-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.anm-inline-field label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: var(--text-muted);
}

.anm-inline-input .anm-field-hint {
    margin-top: 3px;
    font-size: 11px;
}

.anm-inline-input .anm-field-error {
    margin-top: 3px;
    font-size: 11px;
}

/* THREAD EVENTS */
.anm-thread-event {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding-left: 20px;
    position: relative;
}

.anm-thread-event::before {
    content: '';
    position: absolute;
    left: 45px;
    top: -20px;
    bottom: -20px;
    width: 2px;
    background: #f1f4f6;
    z-index: 1;
}

.anm-event-icon {
    width: 32px;
    height: 32px;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    color: var(--text-muted);
    font-size: 14px;
}

.anm-event-details {
    display: flex;
    gap: 15px;
    align-items: center;
    font-size: 13px;
}

.anm-event-description {
    color: var(--text-muted);
    font-weight: 500;
}

.anm-event-time {
    color: #cbd5e1;
    font-size: 11px;
}

/* Form Action Buttons (Register, Update, etc.) */
#content form p[style*="text-align: center"],
#content form p.buttons {
    margin-top: 20px !important;
    padding: 30px 0 10px 0 !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 15px !important;
    text-align: center !important;
}

#content form p[style*="text-align: center"] input,
#content form p.buttons input {
    margin: 0 !important;
}

/* ===== FOOTER ===== */
#footer {
    padding: 50px 30px !important;
    background: #fdfdfd !important;
    color: var(--text-muted) !important;
    font-size: 13px !important;
}

#footer p {
    margin-top: 0 !important;
}

#poweredBy {
    filter: grayscale(1);
    opacity: 0.5;
}

/* ==========================================================================
   HAMBURGER MENU - Mobile Navigation Toggle
   ========================================================================== */

.anm-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    border-radius: 6px;
    transition: background 0.2s;
}

.anm-nav-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.anm-nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.anm-nav.is-open .anm-nav-list {
    display: flex !important;
}

/* ==========================================================================
   RESPONSIVE DESIGN — Tablet & Desktop (≤ 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    #container {
        width: 100% !important;
        margin: 0 auto !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    .anm-header-top {
        margin: 0 20px;
        padding: 18px 0;
    }

    .anm-main-content {
        padding: 20px 25px !important;
    }

    #content {
        padding: 30px 25px !important;
    }

    .anm-landing-flow,
    .anm-kb-container {
        gap: 25px;
    }

    .anm-sidebar,
    .anm-kb-sidebar {
        width: 280px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN — Tablet (≤ 992px)
   ========================================================================== */

@media (max-width: 992px) {
    /* Layout stacking */
    .anm-landing-flow,
    .anm-kb-container {
        flex-direction: column;
        gap: 25px;
    }

    .anm-sidebar,
    .anm-kb-sidebar {
        width: 100%;
        order: 2;
    }

    .anm-landing-main,
    .anm-kb-main {
        max-width: 100%;
        order: 1;
    }

    /* Hero search bar */
    .anm-hero-search {
        padding: 50px 30px;
    }

    /* KB grid: 2 columns on tablet */
    .anm-kb-grid {
        grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    }

    /* Login: stack vertically */
    .anm-login-container {
        flex-direction: column;
        gap: 25px;
    }

    .anm-login-sidebar {
        width: 100%;
    }

    /* Form field label shrinks */
    .anm-field-label {
        flex: 0 0 220px;
    }

    /* Search input wrapper */
    .anm-search-input-wrapper {
        width: 220px;
    }

    /* Ticket table: allow scroll */
    .anm-table-container,
    #ticketTable {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: block;
    }

    .anm-table {
        min-width: 580px;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN — Mobile Landscape & Tablet Small (≤ 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Container */
    #container {
        margin: 0 !important;
        border-radius: 0 !important;
    }

    #content {
        padding: 20px 16px !important;
        min-height: 0 !important;
    }

    .anm-main-content {
        padding: 15px 16px !important;
    }

    /* ── HEADER ── */
    #header {
        padding: 14px 16px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .anm-header-top {
        flex-direction: column;
        gap: 12px;
        padding: 15px 0;
        margin: 0 16px;
        text-align: center;
    }

    .anm-brand img {
        max-height: 62px;
    }

    .anm-user-nav {
        flex-direction: column;
        width: 100%;
        gap: 12px;
        padding-top: 12px;
        border-top: 1px solid #eef2f5;
        align-items: center;
    }

    .anm-user-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        font-size: 13px;
    }

    .anm-user-name {
        font-size: 12px !important;
        padding: 6px 14px !important;
    }

    .anm-lang-switcher {
        border-left: none;
        padding-left: 0;
        padding-top: 8px;
        border-top: 1px solid #eef2f5;
        width: 100%;
        justify-content: center;
    }

    /* ── NAVIGATION: Hamburger ── */
    .anm-nav {
        padding: 0;
        position: relative;
    }

    .anm-nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 10px 16px;
        width: 100%;
        text-align: left;
        align-items: flex-start;
    }

    .anm-nav-list {
        display: none;
        flex-direction: column;
        gap: 0;
        padding: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .anm-nav-list li {
        display: block;
        width: 100%;
    }

    .anm-nav-item {
        display: flex !important;
        padding: 14px 20px !important;
        font-size: 14px !important;
        white-space: normal;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.07);
        letter-spacing: 0 !important;
    }

    .anm-nav-item.active::after {
        display: none !important;
    }

    .anm-nav-item.new,
    .anm-nav-item.open {
        margin: 0 !important;
        border-radius: 0 !important;
        padding: 14px 20px !important;
    }

    /* ── HERO / LANDING ── */
    .anm-hero-search {
        padding: 40px 20px;
        border-radius: var(--radius-sm) !important;
    }

    .anm-hero-search h1 {
        font-size: 26px !important;
        letter-spacing: -0.5px;
    }

    .anm-hero-search::after {
        font-size: 13px;
        letter-spacing: 1px;
        margin-bottom: 20px;
    }

    .anm-hero-stats {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }

    .anm-big-search .anm-search-wrapper {
        border-radius: 12px;
        flex-direction: column;
        background: transparent;
        box-shadow: none;
        padding: 0;
        gap: 10px;
    }

    .anm-big-search .anm-search-wrapper > i {
        display: none;
    }

    .anm-big-search input {
        background: rgba(255,255,255,0.95) !important;
        border-radius: 10px !important;
        padding: 14px 18px !important;
        font-size: 15px !important;
        box-shadow: 0 4px 15px rgba(0,0,0,0.1) !important;
        max-width: 100% !important;
    }

    .anm-big-search button {
        width: 100%;
        border-radius: 10px;
        padding: 14px;
    }

    /* ── LANDING PAGE ── */
    .anm-landing-flow,
    .anm-kb-container {
        flex-direction: column;
        gap: 20px;
    }

    .anm-sidebar,
    .anm-kb-sidebar {
        width: 100%;
        order: 2;
    }

    .anm-landing-main,
    .anm-kb-main {
        max-width: 100%;
        order: 1;
    }

    /* ── KB GRID ── */
    .anm-kb-grid {
        grid-template-columns: 1fr;
    }

    .anm-kb-card {
        padding: 20px;
    }

    /* ── TICKET LIST ── */
    .anm-list-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
        margin-bottom: 20px;
    }

    .anm-list-stats {
        flex-wrap: wrap;
        gap: 8px;
    }

    .anm-search-form {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .anm-search-input-wrapper {
        width: 100%;
    }

    .anm-search-form select {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* ── TABLES ── */
    .anm-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .anm-table {
        min-width: 560px;
    }

    #ticketTable {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        margin: 0 -16px !important;
        width: calc(100% + 32px) !important;
    }

    /* ── TICKET VIEW ── */
    .anm-ticket-header {
        flex-direction: column;
        padding: 20px;
    }

    .anm-ticket-actions {
        flex-wrap: wrap;
    }

    .anm-ticket-meta-pills {
        gap: 6px;
    }

    .anm-ticket-header h1 {
        font-size: 20px !important;
    }

    /* ── DETAIL LABELS ── */
    .anm-detail-item {
        flex-direction: column;
        gap: 3px;
    }

    .anm-detail-item label {
        width: 100% !important;
        padding-right: 0;
        margin-bottom: 2px;
    }

    /* ── FORMS ── */
    .anm-form {
        max-width: 100%;
    }

    .anm-field-layout {
        flex-direction: column;
        gap: 6px;
    }

    .anm-field-label {
        flex: 1 1 auto;
        padding-top: 0;
    }

    .anm-field-footer {
        padding-left: 0;
    }

    .anm-field input[type="text"],
    .anm-field input[type="password"],
    .anm-field input[type="email"],
    .anm-field input[type="tel"],
    .anm-field textarea,
    .anm-field select {
        max-width: 100% !important;
    }

    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        max-width: 100% !important;
    }

    .select2-container {
        max-width: 100% !important;
    }

    .anm-form-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .anm-form-actions input,
    .anm-form-actions .btn,
    .anm-form-actions a {
        width: 100% !important;
        text-align: center;
        margin: 0 !important;
        box-sizing: border-box;
    }

    #content form p[style*="text-align: center"],
    #content form p.buttons {
        flex-direction: column;
        gap: 10px;
    }

    #content form p[style*="text-align: center"] input,
    #content form p.buttons input {
        width: 100% !important;
        box-sizing: border-box;
    }

    /* ── LOGIN ── */
    .anm-login-container {
        flex-direction: column;
        gap: 20px;
        margin: 15px 0 30px 0;
    }

    .anm-login-box {
        padding: 25px 20px;
    }

    .anm-login-sidebar {
        width: 100%;
        padding: 25px 20px;
    }

    /* ── THREAD ── */
    .thread-entry,
    .anm-thread-entry {
        padding: 18px !important;
    }

    .thread-entry header,
    .thread-entry .header {
        margin: -18px -18px 15px -18px !important;
        padding: 12px 18px !important;
        flex-wrap: wrap;
        gap: 8px;
    }

    .anm-thread-avatar {
        display: none;
    }

    .anm-thread-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    /* ── BREADCRUMBS ── */
    .anm-breadcrumbs,
    #breadcrumbs {
        flex-wrap: wrap;
        padding: 8px 14px !important;
        font-size: 12px !important;
    }

    /* ── PAGINATION ── */
    .anm-pagination {
        flex-wrap: wrap;
        gap: 4px;
    }

    /* ── FOOTER ── */
    .anm-footer {
        padding: 35px 16px;
        margin-top: 30px;
    }

    .anm-footer-content {
        padding: 0 16px;
        text-align: center;
    }

    /* ── REPLY/ATTACHMENTS ── */
    .anm-reply-container .anm-form {
        padding: 20px 16px;
    }
}

/* ==========================================================================
   RESPONSIVE DESIGN — Mobile Small (≤ 480px)
   ========================================================================== */

@media (max-width: 480px) {
    /* Tighter header */
    .anm-header-top {
        margin: 0 12px;
        gap: 10px;
        padding: 12px 0;
    }

    .anm-brand img {
        max-height: 55px;
    }

    /* Typography */
    h1,
    #content h1 {
        font-size: 22px !important;
    }

    h2 {
        font-size: 19px !important;
    }

    /* Hero */
    .anm-hero-search {
        padding: 30px 15px;
    }

    .anm-hero-search h1 {
        font-size: 22px !important;
    }

    .anm-hero-search::after {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    /* Buttons go full width */
    input[type="submit"],
    button.button {
        width: 100% !important;
        box-sizing: border-box;
    }

    .anm-signin-btn {
        width: 100% !important;
        justify-content: center !important;
        box-sizing: border-box !important;
    }

    /* Detail card */
    .anm-detail-card {
        padding: 15px;
    }

    /* Meta pills smaller */
    .anm-meta-pill {
        padding: 4px 10px;
        font-size: 11px;
    }

    /* Stat pills wrap */
    .anm-stat-pill {
        font-size: 12px;
        padding: 5px 12px;
    }

    /* KB sub-grid: 1 col */
    .anm-kb-sub-grid {
        grid-template-columns: 1fr;
    }

    /* Ticket header */
    .anm-ticket-header h1 {
        font-size: 18px !important;
    }

    /* Reply container */
    .anm-reply-container {
        padding: 0;
    }

    /* Nav toggle bigger tap target */
    .anm-nav-item {
        padding: 16px 20px !important;
        min-height: 48px;
    }

    /* Form section headers */
    .anm-form-section h3 {
        font-size: 17px !important;
    }

    /* Captcha on small screens */
    .anm-captcha-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .anm-captcha-container input {
        max-width: 100% !important;
    }

    /* Footer */
    .anm-footer {
        padding: 25px 12px;
    }
}