/* ==========================================================================
   Anadolu Eğitim Fakültesi — Faaliyet Bildirim Sistemi
   --------------------------------------------------------------------------
   Custom theme on top of Bootstrap 5.3.

   Design language: refined institutional clarity. Quicksand for warmth,
   Anadolu blue (#1852A7) used decisively for accents only, deep navy
   sidebar, generous whitespace, soft shadows.

   Loaded AFTER bootstrap.min.css so cascade wins.
   ========================================================================== */

/* ---------- Design tokens -------------------------------------------------- */
:root {
    /* Brand */
    --au-primary: #1852A7;
    --au-primary-600: #14418A;
    --au-primary-700: #103571;
    --au-primary-300: #4577C2;
    --au-primary-100: #E5EDF8;
    --au-primary-50:  #F2F6FB;

    /* Sidebar (deeper than primary so primary remains the accent) */
    --au-sidebar-bg: #0F2949;
    --au-sidebar-bg-hover: #16345C;
    --au-sidebar-bg-active: #1B3D6A;
    --au-sidebar-text: #C9D5E6;
    --au-sidebar-text-muted: #8AA0BD;
    --au-sidebar-text-active: #FFFFFF;
    --au-sidebar-border: rgba(255, 255, 255, .06);
    --au-sidebar-section-label: #6B85A6;

    /* Surfaces */
    --au-bg: #F5F7FA;
    --au-surface: #FFFFFF;
    --au-border: #E5E9F0;
    --au-border-strong: #D2D9E4;

    /* Text */
    --au-text: #0F2949;
    --au-text-muted: #5B6B82;
    --au-text-subtle: #8893A6;

    /* Status (Bootstrap will reuse but we soften them) */
    --au-success: #1B8A4F;
    --au-danger:  #C8364A;
    --au-warning: #C77A0E;
    --au-info:    #2278A8;

    /* Shadows — soft, blue-tinged */
    --au-shadow-sm: 0 1px 2px rgba(15, 41, 73, .04);
    --au-shadow:    0 1px 3px rgba(15, 41, 73, .06), 0 1px 2px rgba(15, 41, 73, .04);
    --au-shadow-md: 0 4px 12px rgba(15, 41, 73, .08), 0 2px 4px rgba(15, 41, 73, .04);
    --au-shadow-lg: 0 12px 32px rgba(15, 41, 73, .12), 0 4px 8px rgba(15, 41, 73, .06);

    /* Geometry */
    --au-radius-sm: 6px;
    --au-radius:    10px;
    --au-radius-lg: 14px;
    --au-sidebar-w: 264px;
    --au-sidebar-w-collapsed: 76px;
    --au-topbar-h: 64px;

    /* Type */
    --au-font-sans: "Quicksand", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --au-font-display: "Quicksand", "Segoe UI", sans-serif;

    /* Bootstrap variable overrides */
    --bs-primary: var(--au-primary);
    --bs-primary-rgb: 24, 82, 167;
    --bs-link-color: var(--au-primary);
    --bs-link-hover-color: var(--au-primary-600);
    --bs-body-font-family: var(--au-font-sans);
    --bs-body-color: var(--au-text);
    --bs-body-bg: var(--au-bg);
    --bs-border-color: var(--au-border);
    --bs-border-radius: var(--au-radius);
    --bs-border-radius-sm: var(--au-radius-sm);
    --bs-border-radius-lg: var(--au-radius-lg);
}

/* ---------- Base ----------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--au-font-sans);
    font-weight: 500;
    color: var(--au-text);
    background: var(--au-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.005em;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--au-font-display);
    font-weight: 600;
    color: var(--au-text);
    letter-spacing: -0.015em;
}

a {
    color: var(--au-primary);
    text-decoration: none;
    transition: color .12s ease;
}
a:hover { color: var(--au-primary-600); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* ---------- Buttons -------------------------------------------------------- */
.btn {
    font-family: var(--au-font-sans);
    font-weight: 600;
    border-radius: var(--au-radius);
    padding: .55rem 1.1rem;
    transition: background-color .12s ease, border-color .12s ease, transform .04s ease, box-shadow .12s ease;
    letter-spacing: -0.005em;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
    background-color: var(--au-primary);
    border-color: var(--au-primary);
    color: #fff;
    box-shadow: 0 1px 0 rgba(15, 41, 73, .12);
}
.btn-primary:hover, .btn-primary:focus-visible {
    background-color: var(--au-primary-600);
    border-color: var(--au-primary-600);
    color: #fff;
}
.btn-primary:active, .btn-primary.active { background-color: var(--au-primary-700) !important; border-color: var(--au-primary-700) !important; }
.btn-primary:focus-visible { box-shadow: 0 0 0 3px rgba(24, 82, 167, .25); }

.btn-outline-secondary {
    color: var(--au-text-muted);
    border-color: var(--au-border-strong);
    background: var(--au-surface);
}
.btn-outline-secondary:hover {
    background: var(--au-bg);
    border-color: var(--au-border-strong);
    color: var(--au-text);
}

.btn-link { font-weight: 500; }

.btn-lg { padding: .75rem 1.4rem; font-size: 1rem; }

/* ---------- Forms ---------------------------------------------------------- */
.form-control, .form-select {
    font-family: var(--au-font-sans);
    font-weight: 500;
    color: var(--au-text);
    background-color: var(--au-surface);
    border: 1px solid var(--au-border-strong);
    border-radius: var(--au-radius);
    padding: .65rem .9rem;
    transition: border-color .12s ease, box-shadow .12s ease;
}
.form-control::placeholder { color: var(--au-text-subtle); font-weight: 500; }
.form-control:focus, .form-select:focus {
    border-color: var(--au-primary);
    box-shadow: 0 0 0 3px rgba(24, 82, 167, .15);
}
.form-control.is-invalid {
    border-color: var(--au-danger);
    background-image: none;
    padding-right: .9rem;
}
.form-control.is-invalid:focus { box-shadow: 0 0 0 3px rgba(200, 54, 74, .15); }
.invalid-feedback { font-size: .85rem; color: var(--au-danger); }

.form-label { font-weight: 600; color: var(--au-text); margin-bottom: .35rem; font-size: .9rem; }
.form-text { color: var(--au-text-muted); font-size: .82rem; }

.form-check-input {
    width: 1.1em; height: 1.1em;
    border: 1.5px solid var(--au-border-strong);
    margin-top: .15em;
}
.form-check-input:checked {
    background-color: var(--au-primary);
    border-color: var(--au-primary);
}
.form-check-input:focus { border-color: var(--au-primary); box-shadow: 0 0 0 3px rgba(24, 82, 167, .15); }
.form-check-label { color: var(--au-text-muted); font-weight: 500; }

/* ---------- Cards ---------------------------------------------------------- */
.card {
    background: var(--au-surface);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-lg);
    box-shadow: var(--au-shadow);
}
.card-header {
    background: transparent;
    border-bottom: 1px solid var(--au-border);
    padding: 1rem 1.25rem;
    font-weight: 600;
}
.card-body { padding: 1.5rem; }

/* ---------- Alerts --------------------------------------------------------- */
.alert {
    border: 1px solid transparent;
    border-radius: var(--au-radius);
    padding: .85rem 1rem;
    font-weight: 500;
}
.alert-danger { background: #FCEDEF; border-color: #F2D2D7; color: #8E2333; }
.alert-success { background: #E9F5EF; border-color: #C8E5D5; color: #115A35; }
.alert-info { background: #E6F1F8; border-color: #C5DDED; color: #1A5476; }
.alert-warning { background: #FCF1E0; border-color: #F1DAB1; color: #84510A; }

/* ===========================================================================
   Layout shell — sidebar + topbar + content
   =========================================================================== */

.au-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--au-sidebar-w) 1fr;
    grid-template-rows: var(--au-topbar-h) 1fr;
    grid-template-areas:
        "sidebar topbar"
        "sidebar content";
    background: var(--au-bg);
}

/* Collapsed sidebar (desktop toggle) */
.au-shell.is-collapsed {
    grid-template-columns: var(--au-sidebar-w-collapsed) 1fr;
}

/* ---------- Sidebar ------------------------------------------------------- */
.au-sidebar {
    grid-area: sidebar;
    background: var(--au-sidebar-bg);
    color: var(--au-sidebar-text);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    z-index: 1030;
}

.au-sidebar__brand {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.25rem;
    height: var(--au-topbar-h);
    border-bottom: 1px solid var(--au-sidebar-border);
    flex-shrink: 0;
}
.au-sidebar__brand-mark {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: var(--au-primary);
    color: #fff;
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.au-sidebar__brand-mark svg {
    width: 22px;
    height: auto;
    display: block;
}
.au-sidebar__brand-text {
    line-height: 1.15;
    overflow: hidden;
    transition: opacity .15s ease;
}
.au-sidebar__brand-text small {
    display: block;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 500;
    color: var(--au-sidebar-text-muted);
}
.au-sidebar__brand-text strong {
    display: block;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.au-sidebar__nav {
    list-style: none;
    padding: .9rem .6rem 1.25rem;
    margin: 0;
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
}
.au-sidebar__section-label {
    color: var(--au-sidebar-section-label);
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 1rem .8rem .35rem;
    font-weight: 600;
}
.au-sidebar__nav li + li { margin-top: 2px; }

.au-sidebar__link {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .65rem .8rem;
    border-radius: 8px;
    color: var(--au-sidebar-text);
    font-weight: 500;
    font-size: .92rem;
    text-decoration: none;
    position: relative;
    transition: background-color .12s ease, color .12s ease;
}
.au-sidebar__link:hover {
    background: var(--au-sidebar-bg-hover);
    color: var(--au-sidebar-text-active);
    text-decoration: none;
}
.au-sidebar__link i {
    font-size: 1.05rem;
    width: 1.25rem;
    text-align: center;
    color: var(--au-sidebar-text-muted);
    transition: color .12s ease;
    flex-shrink: 0;
}
.au-sidebar__link:hover i { color: var(--au-sidebar-text-active); }

.au-sidebar__link.is-active {
    background: var(--au-sidebar-bg-active);
    color: var(--au-sidebar-text-active);
    font-weight: 600;
}
.au-sidebar__link.is-active::before {
    content: "";
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 1.4rem;
    border-radius: 0 2px 2px 0;
    background: var(--au-primary-300);
}
.au-sidebar__link.is-active i { color: var(--au-primary-300); }

/* Footer in sidebar */
.au-sidebar__footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--au-sidebar-border);
    font-size: .76rem;
    color: var(--au-sidebar-section-label);
    line-height: 1.5;
    flex-shrink: 0;
}

/* Collapsed mode hides text */
.au-shell.is-collapsed .au-sidebar__brand-text,
.au-shell.is-collapsed .au-sidebar__section-label,
.au-shell.is-collapsed .au-sidebar__footer,
.au-shell.is-collapsed .au-sidebar__link span { display: none; }
.au-shell.is-collapsed .au-sidebar__link { justify-content: center; padding: .65rem 0; }

/* ---------- Topbar -------------------------------------------------------- */
.au-topbar {
    grid-area: topbar;
    background: var(--au-surface);
    border-bottom: 1px solid var(--au-border);
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--au-shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1020;
}

.au-topbar__toggle {
    background: transparent;
    border: 1px solid transparent;
    color: var(--au-text-muted);
    padding: .35rem .55rem;
    border-radius: var(--au-radius-sm);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    transition: background-color .12s ease, color .12s ease;
}
.au-topbar__toggle:hover { background: var(--au-bg); color: var(--au-text); }

.au-topbar__title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--au-text);
    margin: 0;
    letter-spacing: -.01em;
}
.au-topbar__title small {
    display: block;
    font-size: .72rem;
    color: var(--au-text-subtle);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin-top: 1px;
}

.au-topbar__user {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: .75rem;
}

.au-user-chip {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .35rem .55rem .35rem .35rem;
    border-radius: 999px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--au-text);
    font-family: var(--au-font-sans);
    transition: background-color .12s ease, border-color .12s ease;
    cursor: pointer;
}
.au-user-chip:hover { background: var(--au-bg); border-color: var(--au-border); }
.au-user-chip::after { display: none; }

.au-user-chip__avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--au-primary-100);
    color: var(--au-primary);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}

.au-user-chip__meta {
    line-height: 1.2;
    text-align: left;
    min-width: 0;
}
.au-user-chip__meta strong {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--au-text);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.au-user-chip__meta small {
    display: block;
    font-size: .74rem;
    color: var(--au-text-subtle);
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* User dropdown */
.dropdown-menu {
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    box-shadow: var(--au-shadow-md);
    padding: .35rem;
    font-family: var(--au-font-sans);
    font-weight: 500;
    color: var(--au-text);
}
.dropdown-item {
    border-radius: 6px;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: var(--au-text);
}
.dropdown-item:hover, .dropdown-item:focus { background: var(--au-bg); color: var(--au-text); }
.dropdown-item i { width: 1rem; color: var(--au-text-muted); margin-right: .35rem; }
.dropdown-divider { border-top-color: var(--au-border); margin: .25rem 0; }

/* ---------- Content ------------------------------------------------------- */
.au-content {
    grid-area: content;
    padding: 1.75rem 2rem 3rem;
    overflow-x: hidden;
}

.au-page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--au-border);
}
.au-page-header__title {
    margin: 0;
    font-family: var(--au-font-display);
    font-weight: 700;
    font-size: 1.6rem;
    color: var(--au-text);
    letter-spacing: -.015em;
}
.au-page-header__subtitle {
    color: var(--au-text-muted);
    font-size: .92rem;
    margin: .35rem 0 0;
    font-weight: 500;
}

/* User info card on dashboard */
.au-user-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
}
.au-user-card__avatar {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--au-primary-100), #fff);
    color: var(--au-primary);
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 1.25rem;
    border: 1px solid var(--au-border);
    flex-shrink: 0;
}
.au-user-card__info { min-width: 0; }
.au-user-card__name {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--au-text);
    margin: 0 0 .15rem;
    letter-spacing: -.01em;
}
.au-user-card__meta {
    color: var(--au-text-muted);
    font-size: .88rem;
    margin: 0;
}
.au-user-card__meta + .au-user-card__meta { color: var(--au-text-subtle); font-size: .82rem; margin-top: .15rem; }

/* Empty state placeholder card */
.au-placeholder {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--au-text-muted);
}
.au-placeholder__icon {
    font-size: 2.4rem;
    color: var(--au-primary-300);
    background: var(--au-primary-50);
    width: 72px; height: 72px;
    border-radius: 18px;
    display: grid; place-items: center;
    margin: 0 auto 1rem;
}
.au-placeholder__title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--au-text);
    margin: 0 0 .35rem;
}
.au-placeholder__text {
    font-size: .92rem;
    color: var(--au-text-muted);
    max-width: 460px;
    margin: 0 auto;
    line-height: 1.55;
}

/* ---------- Tables -------------------------------------------------------- */
.au-table {
    width: 100%;
    background: var(--au-surface);
    border-collapse: separate;
    border-spacing: 0;
    font-size: .92rem;
}
.au-table thead th {
    background: var(--au-bg);
    color: var(--au-text-muted);
    font-weight: 600;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--au-border);
    white-space: nowrap;
}
.au-table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--au-border);
    vertical-align: top;
    color: var(--au-text);
}
.au-table tbody tr:last-child td { border-bottom: 0; }
.au-table tbody tr:hover td { background: rgba(24, 82, 167, .025); }

.au-table__num {
    color: var(--au-text-subtle);
    font-variant-numeric: tabular-nums;
    width: 1px;
    white-space: nowrap;
}

.au-table__actions {
    width: 1px;
    white-space: nowrap;
    text-align: right;
}
.au-table__actions .btn {
    padding: .35rem .6rem;
    font-size: .82rem;
}

.au-table-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--au-text-muted);
}

/* Stats matrix — narrow numeric columns with vertical column headers */
.au-table--stats thead th.au-stats__col {
    text-align: center;
    width: 1%;
    padding-left: .5rem;
    padding-right: .5rem;
    white-space: nowrap;
}
.au-table--stats thead th.au-stats__total {
    text-align: center;
    width: 1%;
    padding-left: .5rem;
    padding-right: .5rem;
    background: var(--au-primary-50);
    color: var(--au-primary);
    border-left: 1px solid var(--au-border);
}
.au-table--stats td.au-stats__cell {
    text-align: center;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}
.au-table--stats td.au-stats__cell--zero {
    color: var(--au-text-subtle);
    font-weight: 500;
}
.au-table--stats td.au-stats__total {
    background: var(--au-primary-50);
    color: var(--au-primary-700);
    border-left: 1px solid var(--au-border);
}

.au-card--table { padding: 0; overflow: hidden; }
.au-card--table .card-body { padding: 0; }

/* Wrap a table in this for horizontal scroll on narrow viewports */
.au-table-wrap { overflow-x: auto; }

/* ---------- Badges -------------------------------------------------------- */
.au-badge {
    display: inline-flex;
    align-items: center;
    padding: .2rem .55rem;
    font-size: .72rem;
    font-weight: 600;
    line-height: 1.4;
    border-radius: 999px;
    letter-spacing: .005em;
    border: 1px solid transparent;
    white-space: nowrap;
}
.au-badge--blue    { background: #E5EDF8; color: #14418A; border-color: #CBDDF2; }
.au-badge--green   { background: #E2F1E8; color: #115A35; border-color: #C5E2D2; }
.au-badge--amber   { background: #FCEFD8; color: #7B4A0B; border-color: #F2D9A6; }
.au-badge--info    { background: #DEEEF8; color: #134B71; border-color: #B9DBED; }
.au-badge--red     { background: #FBE3E5; color: #8E2233; border-color: #F2C2C8; }
.au-badge--neutral { background: var(--au-bg); color: var(--au-text-muted); border-color: var(--au-border); }

/* ---------- Image thumbnails (in lists/cards) ----------------------------- */
.au-thumbs { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.au-thumb {
    display: inline-block;
    width: 64px; height: 64px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--au-border);
    background: var(--au-bg);
}
.au-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Form fieldsets (used in activity form) ------------------------ */
.au-fieldset {
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    padding: 1.25rem;
    background: var(--au-primary-50);
    margin-top: 1rem;
}
.au-fieldset__title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: .95rem;
    color: var(--au-primary-700);
    margin: 0 0 .85rem;
    letter-spacing: -.005em;
}

/* Existing-image preview row in the activity form */
.au-existing-images { display: flex; flex-wrap: wrap; gap: .6rem; }
.au-existing-image {
    position: relative;
    width: 88px; height: 88px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--au-border);
    background: var(--au-bg);
}
.au-existing-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.au-existing-image input[type="checkbox"] {
    position: absolute;
    top: 4px; right: 4px;
    width: 18px; height: 18px;
    accent-color: var(--au-primary);
}
.au-existing-image label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(15, 41, 73, .75);
    color: #fff;
    font-size: .7rem;
    text-align: center;
    padding: 2px 0;
    cursor: pointer;
}

/* ---------- Contributors block (per-role section in activity form) ------- */

.au-contributors {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--au-border);
}
.au-contributors__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .65rem;
}
.au-contributors__title {
    margin: 0;
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: .92rem;
    color: var(--au-text);
    letter-spacing: -.005em;
}
.au-contributors__chips {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-height: 1.5rem;
}
.au-contributors__chips:empty::before {
    content: "Henüz eklenmiş kişi yok.";
    color: var(--au-text-subtle);
    font-size: .82rem;
    font-style: italic;
}

.au-contributor-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .25rem .25rem .65rem;
    background: var(--au-primary-100);
    color: var(--au-primary-700);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.4;
    border: 1px solid var(--au-primary-100);
}
.au-contributor-chip__label { white-space: nowrap; }
.au-contributor-chip__remove {
    background: rgba(15, 41, 73, .08);
    border: 0;
    color: var(--au-primary-700);
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    line-height: 1;
    font-size: .85rem;
    transition: background-color .12s ease, color .12s ease;
}
.au-contributor-chip__remove:hover {
    background: var(--au-danger);
    color: #fff;
}

/* Hide tür-conditional contributor blocks (paydas/ortak in image-types section)
   when their parent tür is not selected. JS adds .is-tur-active when relevant. */
.au-contributors[data-au-tur-show]:not(.is-tur-active) {
    display: none;
}

/* ---------- Picker modal ------------------------------------------------- */

#auContributorPickerModal .modal-body { padding: 0; }

.au-picker__searchbar {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 1rem 1.25rem;
    background: var(--au-surface);
    border-bottom: 1px solid var(--au-border);
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--au-text-muted);
}
.au-picker__searchbar i {
    flex-shrink: 0;
    font-size: 1rem;
}
.au-picker__searchbar input { flex: 1; }

.au-picker__list {
    list-style: none;
    margin: 0;
    padding: .35rem;
    max-height: 60vh;
    overflow-y: auto;
}
.au-picker__list li { margin: 0; }

.au-picker__item {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    padding: .65rem .85rem;
    border-radius: var(--au-radius-sm);
    color: var(--au-text);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: .15rem;
    transition: background-color .1s ease;
}
.au-picker__item:hover { background: var(--au-primary-50); }
.au-picker__item:focus-visible {
    outline: 0;
    background: var(--au-primary-50);
    box-shadow: 0 0 0 2px var(--au-primary-100);
}
.au-picker__item[disabled],
.au-picker__item.is-already-added {
    opacity: .4;
    cursor: not-allowed;
    background: transparent;
}
.au-picker__item[hidden] { display: none; }
.au-picker__item-name { font-weight: 600; font-size: .92rem; }
.au-picker__item-meta { color: var(--au-text-subtle); font-size: .8rem; }

.au-picker__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--au-text-muted);
    font-size: .9rem;
}

/* ---------- Modal --------------------------------------------------------- */
.modal-content {
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-lg);
    box-shadow: var(--au-shadow-lg);
    background: var(--au-surface);
}
.modal-header {
    border-bottom: 1px solid var(--au-border);
    padding: 1.25rem 1.5rem;
}
.modal-body { padding: 1.5rem; }
.modal-footer {
    border-top: 1px solid var(--au-border);
    padding: 1rem 1.5rem;
    gap: .5rem;
}
.modal-backdrop.show { opacity: .5; }

/* Confirmation-modal specific */
.au-modal__header {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}
.au-modal__icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: grid; place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    background: #FBE3E5;
    color: #C8364A;
}
.au-modal__title {
    margin: 0;
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--au-text);
    letter-spacing: -.005em;
}
.au-modal__subtitle {
    margin: .15rem 0 0;
    font-size: .82rem;
    color: var(--au-text-muted);
    font-weight: 500;
}
.au-modal__body p { margin-bottom: 0; }
.au-modal__item {
    background: var(--au-bg);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-sm);
    padding: .7rem .9rem;
    font-weight: 600;
    color: var(--au-text);
    margin-top: .85rem;
    overflow-wrap: break-word;
    word-break: break-word;
    line-height: 1.4;
}
.au-modal__detail {
    color: var(--au-text-muted);
    font-size: .88rem;
    margin-top: .85rem;
    line-height: 1.5;
    padding: .65rem .85rem;
    border-left: 3px solid var(--au-warning);
    background: #FCF1E0;
    border-radius: 0 var(--au-radius-sm) var(--au-radius-sm) 0;
}

/* Danger button (used for the modal's confirm + any destructive action) */
.btn-danger {
    background-color: var(--au-danger);
    border-color: var(--au-danger);
    color: #fff;
    font-weight: 600;
}
.btn-danger:hover, .btn-danger:focus-visible {
    background-color: #AE2C40;
    border-color: #AE2C40;
    color: #fff;
}
.btn-danger:active, .btn-danger.active {
    background-color: #8E2233 !important;
    border-color: #8E2233 !important;
}
.btn-danger:focus-visible { box-shadow: 0 0 0 3px rgba(200, 54, 74, .25); }

/* ---------- Filter card (dean activities + reusable) --------------------- */

.au-filter-card {
    overflow: hidden;
}
.au-filter-card .au-filter-body {
    max-height: 3000px;
    overflow: hidden;
    transition: max-height .3s ease, opacity .2s ease;
}
.au-filter-card.is-collapsed .au-filter-body {
    max-height: 0;
    opacity: 0;
    pointer-events: none;
}

.au-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1.25rem;
    border-bottom: 1px solid var(--au-border);
    background: var(--au-primary-50);
}
.au-filter-title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--au-text);
    margin: 0;
    letter-spacing: -.01em;
}
.au-filter-badge {
    background: var(--au-primary);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
    letter-spacing: .02em;
    text-transform: lowercase;
}
.au-filter-collapse { font-weight: 500; padding: .3rem .65rem; font-size: .82rem; }

.au-filter-body {
    padding: 1.25rem 1.5rem;
}

.au-filter-section {
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px dashed var(--au-border);
}
.au-filter-section:last-of-type {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.au-filter-section__title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: .72rem;
    color: var(--au-text-muted);
    text-transform: uppercase;
    letter-spacing: .1em;
    margin: 0 0 .85rem;
}

.au-filter-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    padding-top: 1.25rem;
    margin-top: 1.25rem;
    border-top: 1px solid var(--au-border);
    position: sticky;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, var(--au-surface) 30%, var(--au-surface) 100%);
    padding-bottom: .35rem;
}

/* ---------- Chip-style multi-select (checkbox label as a pill) ----------- */
.au-chip-group {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.au-chip-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0; height: 0;
}
.au-chip {
    display: inline-flex;
    align-items: center;
    padding: .38rem .8rem;
    background: var(--au-surface);
    border: 1px solid var(--au-border-strong);
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 500;
    color: var(--au-text-muted);
    cursor: pointer;
    transition: background-color .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
    user-select: none;
    line-height: 1.25;
}
.au-chip:hover {
    background: var(--au-primary-50);
    border-color: var(--au-primary-100);
    color: var(--au-primary);
}
.au-chip-input:checked + .au-chip {
    background: var(--au-primary);
    border-color: var(--au-primary);
    color: #fff;
    box-shadow: 0 1px 2px rgba(15, 41, 73, .12);
}
.au-chip-input:focus-visible + .au-chip {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(24, 82, 167, .25);
}
.au-chip--compact { padding: .3rem .6rem; font-size: .76rem; }

/* ---------- Per-tür sub-filter fieldsets (progressive disclosure) -------- */
.au-tur-fieldset {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius);
    background: var(--au-bg);
    opacity: .55;
    pointer-events: none;
    transition: opacity .15s ease, background-color .15s ease, border-color .15s ease;
}
.au-tur-fieldset.is-active {
    opacity: 1;
    pointer-events: auto;
    background: var(--au-primary-50);
    border-color: var(--au-primary-100);
}
.au-tur-fieldset__title {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: .9rem;
    color: var(--au-primary-700);
    margin: 0 0 .85rem;
    display: flex;
    align-items: center;
    gap: .4rem;
    letter-spacing: -.005em;
}
.au-tur-fieldset__title i { color: var(--au-primary); }

.au-subfilter + .au-subfilter { margin-top: .85rem; }
.au-subfilter__label {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 600;
    color: var(--au-text-muted);
    margin-bottom: .4rem;
}

/* Hidden Q-değeri sub-block — same fieldset visual treatment but smaller */
.au-q-block {
    display: none;
    padding: .65rem .8rem;
    margin-left: 0;
    margin-top: .65rem;
    border-radius: var(--au-radius-sm);
    background: var(--au-surface);
    border: 1px dashed var(--au-border-strong);
}
.au-q-block.is-active { display: block; }

/* ---------- Pagination tweak --------------------------------------------- */
.au-pagination { margin-top: 1.25rem; }
.au-pagination .pagination { margin: 0; flex-wrap: wrap; gap: 2px; }
.au-pagination .page-item .page-link {
    color: var(--au-text);
    background: var(--au-surface);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-sm);
    font-weight: 500;
    font-size: .88rem;
    padding: .4rem .75rem;
    line-height: 1.25;
    transition: background-color .12s ease, color .12s ease, border-color .12s ease;
}
.au-pagination .page-item .page-link:hover {
    background: var(--au-primary-50);
    color: var(--au-primary);
    border-color: var(--au-primary-100);
}
.au-pagination .page-item.active .page-link {
    background: var(--au-primary);
    border-color: var(--au-primary);
    color: #fff;
}
.au-pagination .page-item.disabled .page-link {
    color: var(--au-text-subtle);
    background: var(--au-bg);
    border-color: var(--au-border);
    cursor: not-allowed;
}
.au-pagination .page-item .page-link:focus {
    box-shadow: 0 0 0 3px rgba(24, 82, 167, .15);
    z-index: 2;
}

/* ===========================================================================
   Mobile: sidebar becomes off-canvas
   =========================================================================== */
@media (max-width: 991.98px) {
    .au-shell {
        grid-template-columns: 1fr;
        grid-template-areas:
            "topbar"
            "content";
    }
    .au-sidebar {
        position: fixed;
        top: 0; left: 0;
        width: var(--au-sidebar-w);
        height: 100vh;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--au-shadow-lg);
    }
    .au-shell.is-mobile-open .au-sidebar { transform: translateX(0); }
    .au-shell.is-mobile-open::after {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(15, 41, 73, .35);
        backdrop-filter: blur(2px);
        z-index: 1025;
    }
    .au-sidebar { z-index: 1040; }
    .au-content { padding: 1.25rem 1rem 2rem; }
    .au-topbar { padding: 0 1rem; }
    .au-user-chip__meta { display: none; }
}

/* Hide collapse toggle on mobile, hamburger only */
.au-topbar__toggle--desktop { display: inline-flex; }
.au-topbar__toggle--mobile  { display: none; }
@media (max-width: 991.98px) {
    .au-topbar__toggle--desktop { display: none; }
    .au-topbar__toggle--mobile  { display: inline-flex; }
}

/* ===========================================================================
   Guest layout (login)
   =========================================================================== */

.au-guest {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at top left,    rgba(24, 82, 167, .07), transparent 55%),
        radial-gradient(ellipse at bottom right, rgba(24, 82, 167, .05), transparent 50%),
        var(--au-bg);
    position: relative;
    overflow: hidden;
}
.au-guest::before {
    /* Subtle grid texture in the background */
    content: "";
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(24, 82, 167, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(24, 82, 167, .035) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 35%, transparent 75%);
    pointer-events: none;
}

.au-guest__shell {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.au-guest__brand {
    text-align: center;
    margin-bottom: 1.75rem;
}
.au-guest__brand-mark {
    width: 64px; height: 64px;
    border-radius: 16px;
    background: var(--au-primary);
    color: #fff;
    display: grid; place-items: center;
    margin: 0 auto .9rem;
    box-shadow: 0 6px 16px rgba(24, 82, 167, .25);
}
.au-guest__brand-mark svg {
    width: 36px;
    height: auto;
    display: block;
}
.au-guest__brand small {
    display: block;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--au-text-muted);
    font-weight: 600;
    margin-bottom: .15rem;
}
.au-guest__brand strong {
    display: block;
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--au-text);
    line-height: 1.25;
}
.au-guest__brand em {
    display: block;
    font-style: normal;
    font-family: var(--au-font-display);
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--au-primary);
    line-height: 1.2;
    letter-spacing: -.015em;
    margin-top: .1rem;
}
.au-guest__brand .au-guest__system {
    display: block;
    font-size: .82rem;
    color: var(--au-text-muted);
    font-weight: 500;
    margin-top: .35rem;
    letter-spacing: .005em;
}

.au-guest__card {
    background: var(--au-surface);
    border: 1px solid var(--au-border);
    border-radius: var(--au-radius-lg);
    box-shadow: var(--au-shadow-md);
    padding: 2rem 1.85rem 1.85rem;
}

.au-guest__heading {
    text-align: center;
    margin-bottom: 1.5rem;
}
.au-guest__heading h1 {
    font-family: var(--au-font-display);
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--au-text);
    margin: 0;
    letter-spacing: -.01em;
}
.au-guest__heading p {
    color: var(--au-text-muted);
    font-size: .88rem;
    margin: .35rem 0 0;
}

.au-guest__footer-text {
    text-align: center;
    color: var(--au-text-subtle);
    font-size: .8rem;
    margin-top: 1.5rem;
}
