/*
 * KI Archiv PMG - aligned with Presse-Monitor / PMG MediaHub theme
 */

/* ===== COLOR PALETTE (PMG) ===== */
:root {
    --pmg-primary-500: #1892c5;
    --pmg-primary-600: #1185b7;
    --pmg-primary-700: #0774a5;
    --pmg-primary-900: #004570;
    --pmg-secondary-700: #f4b200;
    --pmg-secondary-900: #f06e00;
    --pmg-semantic-error: #B00020;
    --pmg-semantic-confirmation: #009500;
    --pmg-outline: rgba(0, 0, 0, 0.12);
    --pmg-overlay-hover: rgba(0, 0, 0, 0.04);
    --pmg-primary-overlay-selected: rgba(24, 146, 197, 0.08);
    --pmg-primary-overlay-hover: rgba(24, 146, 197, 0.04);

    --primary-color: var(--pmg-primary-500);
    --primary-dark: var(--pmg-primary-700);
    --primary-light: #50b0d3;
    --primary-lighter: #dff2f7;

    --secondary-color: #455A64;
    --secondary-dark: var(--pmg-primary-900);
    --secondary-light: #607D8B;

    --accent-color: var(--pmg-secondary-900);
    --accent-green: var(--pmg-semantic-confirmation);
    --accent-red: var(--pmg-semantic-error);
    --accent-orange: var(--pmg-secondary-900);
    --accent-purple: #52467a;
    --accent-purple-dark: #3d2f62;

    --bg-primary: #ffffff;
    --bg-secondary: #fafafa;
    --bg-tertiary: #f5f5f5;
    --bg-dark: var(--pmg-primary-900);

    --text-primary: rgba(0, 0, 0, 0.87);
    --text-secondary: rgba(0, 0, 0, 0.6);
    --text-tertiary: rgba(0, 0, 0, 0.54);
    --text-white: #ffffff;
    --text-muted: rgba(0, 0, 0, 0.38);

    --border-color: var(--pmg-outline);
    --border-light: rgba(0, 0, 0, 0.08);
    --border-dark: rgba(0, 0, 0, 0.24);

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 2px rgba(0, 0, 0, 0.05), 0 3px 1px rgba(0, 0, 0, 0.04), 0 1px 5px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 8px 10px -5px rgba(0, 0, 0, 0.2), 0 16px 24px 2px rgba(0, 0, 0, 0.14), 0 6px 30px 5px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15), 0 5px 10px rgba(0, 0, 0, 0.1);

    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --pmg-footer-height: 56px;
    --pmg-sidebar-width: 260px;
    --spacing-xxl: 48px;

    --font-primary: Corpid, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-secondary: "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-mono: "Roboto Mono", "Courier New", monospace;

    --radius-sm: 4px;
    --radius-md: 4px;
    --radius-lg: 4px;
    --radius-xl: 8px;
    --radius-full: 9999px;

    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    font-size: 14px;
    line-height: 1.43;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.3;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h1 { font-size: 24px; line-height: 32px; }
h2 { font-size: 20px; line-height: 28px; }
h3 { font-size: 16px; line-height: 24px; font-weight: 500; }
h4 { font-size: 14.5px; line-height: 24px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

a {
    color: var(--pmg-primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--pmg-primary-700);
    text-decoration: underline;
}

.pmg-sidebar-brand-link,
.pmg-sidebar-brand-link:hover,
.pmg-sidebar-link,
.pmg-sidebar-link:hover,
.pmg-toolbar a,
.pmg-toolbar a:hover {
    text-decoration: none;
}

/* ===== APP SHELL & SIDEBAR ===== */
.pmg-app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-tertiary);
}

.pmg-sidebar {
    width: var(--pmg-sidebar-width);
    flex-shrink: 0;
    background: var(--bg-primary);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.pmg-sidebar-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
}

.pmg-sidebar-brand {
    position: relative;
    border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.pmg-sidebar-brand-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    min-height: 90px;
    padding: 20px 20px 16px;
    text-decoration: none;
    min-width: 0;
}

.pmg-sidebar-logo {
    max-width: 100%;
    max-height: 18px;
    width: auto;
    height: auto;
    flex-shrink: 0;
}

.pmg-sidebar-app-name {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: var(--pmg-primary-900);
}

.pmg-sidebar-app-name b {
    font-weight: 700;
    color: var(--pmg-primary-900);
}

.pmg-sidebar-nav {
    flex: 1;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.pmg-sidebar-section {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 12px 6px;
}

.pmg-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    color: rgba(0, 0, 0, 0.87);
    font-size: 14px;
    line-height: 24px;
    font-weight: 400;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.pmg-sidebar-link .material-icons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    color: rgba(0, 0, 0, 0.54);
}

.pmg-sidebar-link:hover {
    background: var(--pmg-primary-overlay-hover);
    text-decoration: none;
    color: rgba(0, 0, 0, 0.87);
}

.pmg-sidebar-link:hover .material-icons {
    color: var(--pmg-primary-500);
}

.pmg-sidebar-link.active {
    background: #1892c514;
    color: var(--pmg-primary-700);
    font-weight: 400;
}

.pmg-sidebar-link.active .material-icons {
    color: var(--pmg-primary-500);
}

.pmg-sidebar-footer {
    padding: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.pmg-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ===== TOP HEADER BAR (Presse-Monitor pmg-toolbar) ===== */
.pmg-top-header {
    flex-shrink: 0;
    z-index: 900;
}

.pmg-toolbar {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 13px 16px 0 10px;
    background: rgb(0, 69, 112);
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 5px rgba(0, 0, 0, 0.07), 0 1px 10px rgba(0, 0, 0, 0.06);
}

.pmg-toolbar-spacer {
    flex: 1 1 auto;
}

.pmg-toolbar-user {
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 20px;
    font-weight: bold;
    color: #dff2f7;
}

.pmg-toolbar-company {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #dff2f7;
}

.pmg-toolbar-username {
    display: inline-flex;
    align-items: center;
    color: #dff2f7;
}

.pmg-toolbar-name {
    font-weight: 400;
}

.pmg-toolbar-username .material-icons {
    margin-left: 12px;
    font-size: 24px;
    color: #fff;
}

/* ===== MAIN CONTAINER ===== */
.pmg-container {
    max-width: 1500px;
    width: 100%;
    margin: 0 auto;
    padding: 32px;
    flex: 1;
}

.pmg-footer {
    text-align: center;
    padding: 16px 30px;
    color: var(--text-muted);
    font-size: 12px;
    line-height: 20px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.pmg-page-header {
    margin-bottom: var(--spacing-lg);
}

.pmg-page-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 400;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.pmg-page-subtitle {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ===== CARDS ===== */
.pmg-card {
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    padding: 18px 24px;
    margin-bottom: 24px;
    color: var(--text-primary);
}

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

.pmg-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-md);
    border-bottom: 1px solid var(--border-light);
}

.pmg-card-title {
    font-size: 16px;
    line-height: 24px;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin: 0;
}

.pmg-card-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ===== BUTTONS (PMG mat-mdc-button) ===== */
.pmg-btn,
button.pmg-btn,
a.pmg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    min-height: 36px;
    height: 36px;
    border-radius: 4px;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    line-height: 1;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
    box-shadow: none;
    white-space: nowrap;
}

.pmg-btn .material-icons,
.pmg-btn .material-symbols-outlined {
    font-size: 24px;
    width: 24px;
    height: 24px;
    letter-spacing: normal;
    text-transform: none;
}

.pmg-btn-primary {
    background: var(--pmg-primary-500);
    color: #fff;
}

.pmg-btn-primary:hover {
    background: var(--pmg-primary-600);
    color: #fff;
    text-decoration: none;
}

.pmg-btn-secondary,
.pmg-btn-outline {
    background: transparent;
    color: var(--pmg-primary-500);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.pmg-btn-secondary:hover,
.pmg-btn-outline:hover {
    background: rgba(24, 146, 197, 0.04);
    color: var(--pmg-primary-600);
    text-decoration: none;
}

.pmg-btn-success {
    background: var(--accent-green);
    color: #fff;
}

.pmg-btn-success:hover {
    background: #007a00;
    color: #fff;
    text-decoration: none;
}

.pmg-btn-danger {
    background: var(--accent-red);
    color: #fff;
}

.pmg-btn-danger:hover {
    background: #8f0018;
    color: #fff;
    text-decoration: none;
}

.pmg-btn-export {
    background: var(--accent-purple);
    color: #fff;
}

.pmg-btn-export:hover {
    background: var(--accent-purple-dark);
    color: #fff;
    text-decoration: none;
}

.pmg-btn-small {
    min-height: 32px;
    height: 32px;
    padding: 0 12px;
    font-size: 13px;
    letter-spacing: 0.8px;
}

.pmg-btn-small .material-icons,
.pmg-btn-small .material-symbols-outlined {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.pmg-btn-large {
    min-height: 48px;
    height: 48px;
    padding: 0 24px;
}

.pmg-btn-pill {
    border-radius: 50px;
}

.pmg-btn-icon-only {
    padding: var(--spacing-sm);
    width: 36px;
    height: 36px;
}

/* ===== FORMS ===== */
.pmg-form-group {
    margin-bottom: var(--spacing-lg);
}

.pmg-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.pmg-label-required::after {
    content: ' *';
    color: var(--accent-red);
}

.pmg-input,
.pmg-select,
.pmg-textarea,
.inpTxt,
.inpTxtArea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 20px;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pmg-input:focus,
.pmg-select:focus,
.pmg-textarea:focus,
.inpTxt:focus,
.inpTxtArea:focus {
    outline: none;
    border-color: var(--pmg-primary-500);
    box-shadow: 0 0 0 1px var(--pmg-primary-500);
}

.pmg-input::placeholder {
    color: var(--text-muted);
}

.pmg-input-search {
    padding-left: 44px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2378909C' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 12px center;
}

/* ===== TABLE ===== */
.pmg-table-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.pmg-table thead {
    background: var(--bg-secondary);
}

.pmg-table th {
    padding: 10px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.pmg-table td {
    padding: 10px 20px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 20px;
}

.pmg-table tbody tr:hover {
    background: var(--pmg-primary-overlay-hover);
}

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

.pmg-money {
    white-space: nowrap;
}

/* ===== SEARCH BOX ===== */
.pmg-search-wrapper {
    position: relative;
    margin-bottom: var(--spacing-lg);
}

.pmg-search-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    pointer-events: none;
}

/* ===== BADGES & CHIPS ===== */
.pmg-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pmg-badge-primary {
    background: var(--pmg-primary-overlay-selected);
    color: var(--pmg-primary-700);
}

.pmg-badge-success {
    background: #E8F5E9;
    color: #2E7D32;
}

.pmg-badge-warning {
    background: #FFF3E0;
    color: #E65100;
}

.pmg-badge-danger {
    background: #FFEBEE;
    color: #C62828;
}

/* ===== ALERTS & MESSAGES ===== */
.pmg-alert {
    padding: 20px 24px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-md);
    border: 1px solid;
}

.pmg-alert-info {
    background: linear-gradient(0deg, rgba(246, 221, 0, 0.16) 0%, rgba(246, 221, 0, 0.16) 100%), #fff;
    border-color: var(--pmg-secondary-700);
    color: var(--text-primary);
}

.pmg-alert-success {
    background: rgba(0, 149, 0, 0.08);
    border-color: var(--pmg-semantic-confirmation);
    color: var(--text-primary);
}

.pmg-alert-warning {
    background: #fff8e1;
    border-color: var(--pmg-secondary-700);
    color: var(--text-primary);
}

.pmg-alert-danger {
    background: #ffebee;
    border-color: var(--pmg-semantic-error);
    color: var(--pmg-semantic-error);
}

/* ===== MODAL ===== */
.pmg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(38, 50, 56, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
}

.pmg-modal {
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pmg-modal-header {
    padding: 24px 32px 11px;
    border-bottom: none;
    background: var(--pmg-primary-900);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pmg-modal-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 400;
    color: #fff;
    margin: 0;
}

.pmg-modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast);
    color: rgba(255, 255, 255, 0.74);
}

.pmg-modal-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.pmg-modal-body {
    padding: var(--spacing-xl);
    overflow-y: auto;
}

.pmg-modal-footer {
    padding: var(--spacing-lg) var(--spacing-xl);
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* ===== UTILITY CLASSES ===== */
.pmg-text-center { text-align: center; }
.pmg-text-right { text-align: right; }
.pmg-text-muted { color: var(--text-muted); }
.pmg-text-primary { color: var(--primary-color); }
.pmg-text-success { color: var(--accent-green); }
.pmg-text-danger { color: var(--accent-red); }

.pmg-mb-0 { margin-bottom: 0; }
.pmg-mb-sm { margin-bottom: var(--spacing-sm); }
.pmg-mb-md { margin-bottom: var(--spacing-md); }
.pmg-mb-lg { margin-bottom: var(--spacing-lg); }
.pmg-mb-xl { margin-bottom: var(--spacing-xl); }

.pmg-mt-0 { margin-top: 0; }
.pmg-mt-sm { margin-top: var(--spacing-sm); }
.pmg-mt-md { margin-top: var(--spacing-md); }
.pmg-mt-lg { margin-top: var(--spacing-lg); }
.pmg-mt-xl { margin-top: var(--spacing-xl); }

.pmg-flex { display: flex; }
.pmg-flex-center { display: flex; align-items: center; justify-content: center; }
.pmg-flex-between { display: flex; align-items: center; justify-content: space-between; }
.pmg-gap-sm { gap: var(--spacing-sm); }
.pmg-gap-md { gap: var(--spacing-md); }
.pmg-gap-lg { gap: var(--spacing-lg); }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .pmg-container {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .pmg-app-shell {
        flex-direction: column;
    }

    .pmg-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        box-shadow: var(--shadow-sm);
    }

    .pmg-sidebar-inner {
        height: auto;
    }

    .pmg-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        padding-bottom: 0;
    }

    .pmg-sidebar-section,
    .pmg-sidebar-footer {
        display: none;
    }

    .pmg-toolbar-company,
    .pmg-toolbar-name {
        display: none;
    }

    .pmg-toolbar {
        padding-left: 0;
        min-height: 56px;
    }

    .pmg-sidebar-link-label {
        display: none;
    }

    .pmg-sidebar-link {
        min-width: 48px;
        justify-content: center;
    }

    .pmg-container {
        padding: 16px 16px 24px;
    }

    .pmg-modal {
        width: 95%;
        max-height: 95vh;
    }

    .pmg-table {
        font-size: 13px;
    }

    .pmg-table th,
    .pmg-table td {
        padding: 8px 12px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pmg-fade-in {
    animation: fadeIn var(--transition-base);
}

.pmg-slide-in {
    animation: slideIn var(--transition-base);
}

@keyframes pmgSpin {
    to {
        transform: rotate(360deg);
    }
}

.pmg-results-table-wrap {
    position: relative;
}

.pmg-table-loading {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.75);
}

.pmg-table-loading.active {
    display: flex;
}

.pmg-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: pmgSpin 0.8s linear infinite;
}

/* ===== SEARCH RESULTS SPECIFIC ===== */
.pmg-result-item {
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
    cursor: pointer;
}

.pmg-result-item:hover {
    background: var(--primary-lighter);
}

.pmg-result-item:last-child {
    border-bottom: none;
}

.pmg-result-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: var(--spacing-sm);
}

.pmg-result-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--pmg-primary-700);
    margin-bottom: var(--spacing-xs);
}

.pmg-result-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    font-size: 13px;
    color: var(--text-tertiary);
    margin-bottom: var(--spacing-sm);
}

.pmg-result-excerpt {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===== PAGINATION ===== */
.pmg-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-xl);
}

.pmg-pagination-item {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pmg-pagination-item:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.pmg-pagination-item.active {
    background: var(--pmg-primary-500);
    color: white;
}

.pmg-pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ===== DJANGO FORM WIDGET OVERRIDES ===== */
.pmg-container input[type="text"],
.pmg-container input[type="email"],
.pmg-container input[type="password"],
.pmg-container input[type="number"],
.pmg-container input[type="date"],
.pmg-container input[type="url"],
.pmg-container select,
.pmg-container textarea,
.pmg-container .inpTxt,
.pmg-container .inpTxtArea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    font-size: 14px;
    line-height: 20px;
    font-family: var(--font-primary);
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.pmg-container input[type="text"]:focus,
.pmg-container input[type="email"]:focus,
.pmg-container input[type="password"]:focus,
.pmg-container input[type="number"]:focus,
.pmg-container input[type="date"]:focus,
.pmg-container input[type="url"]:focus,
.pmg-container select:focus,
.pmg-container textarea:focus,
.pmg-container .inpTxt:focus,
.pmg-container .inpTxtArea:focus {
    outline: none;
    border-color: var(--pmg-primary-500);
    box-shadow: 0 0 0 1px var(--pmg-primary-500);
}

/* Select2 overrides */
.pmg-container .select2-container {
    width: 100% !important;
}

.pmg-container .select2-container--default .select2-selection--single,
.pmg-container .select2-container--default .select2-selection--multiple {
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    min-height: 44px;
    padding: 4px 8px;
    font-family: var(--font-primary);
}

.pmg-container .select2-container--default .select2-selection--single:focus,
.pmg-container .select2-container--default .select2-selection--multiple:focus,
.pmg-container .select2-container--default.select2-container--focus .select2-selection--multiple,
.pmg-container .select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--pmg-primary-500);
    box-shadow: 0 0 0 1px var(--pmg-primary-500);
}

.pmg-container .select2-container--default .select2-selection--multiple .select2-selection__choice {
    background: var(--pmg-primary-overlay-selected);
    border: 1px solid rgba(24, 146, 197, 0.24);
    border-radius: var(--radius-sm);
    color: var(--pmg-primary-700);
    padding: 2px 8px;
    font-size: 13px;
}

/* Details/summary (advanced filters) */
.pmg-container details summary {
    list-style: none;
}

.pmg-container details summary::-webkit-details-marker {
    display: none;
}

.pmg-container details[open] summary .material-icons {
    transform: rotate(180deg);
}
