@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&display=swap");

:root {
    --bg: #edf3fb;
    --bg-soft: #dce7f7;
    --panel: #ffffff;
    --panel-2: #f6f9ff;
    --panel-3: #eaf1fd;
    --line: rgba(31, 74, 140, .1);
    --line-strong: rgba(31, 74, 140, .18);
    --text: #17345f;
    --muted: #5f7598;
    --accent: #2c5baa;
    --accent-2: #5f88d5;
    --green: #10b981;
    --yellow: #f59e0b;
    --red: #ef4444;
    --shadow: 0 24px 70px rgba(25, 58, 110, .12);
    --shadow-soft: 0 12px 28px rgba(25, 58, 110, .08);
    --glow: 0 0 0 1px rgba(44, 91, 170, .04), 0 16px 48px rgba(25, 58, 110, .1);
}

* {
    box-sizing: border-box
}

html,
body {
    margin: 0;
    padding: 0
}

html {
    scroll-behavior: smooth
}

body {
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    font-family: "Manrope", "Segoe UI", Arial, Helvetica, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 0% 0%, rgba(44, 91, 170, .14), transparent 28rem),
        radial-gradient(circle at 100% 0%, rgba(95, 136, 213, .12), transparent 28rem),
        radial-gradient(circle at 50% 120%, rgba(255, 255, 255, .72), transparent 32rem),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
}

body::before {
    top: -120px;
    right: -120px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(44, 91, 170, .18), transparent 68%);
    filter: blur(12px);
}

body::after {
    left: 0;
    right: 0;
    bottom: 0;
    height: 180px;
    background: linear-gradient(180deg, transparent, rgba(3, 10, 18, .38));
}

a {
    color: inherit;
    text-decoration: none
}

button,
input,
select,
textarea {
    font: inherit
}

.app-shell {
    position: relative;
    z-index: 1;
    max-width: 1320px;
    margin: 0 auto;
    padding: 24px 20px 48px;
    overflow-x: hidden;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.topbar,
.panel,
.table-wrap,
.stat-card,
.login-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 22px;
    position: relative;
    z-index: 100;
    box-shadow: var(--glow);
    background: linear-gradient(135deg, #23488a 0%, #244d95 52%, #2c5baa 100%);
    border-color: rgba(255, 255, 255, .08);
}

.page-login .topbar {
    margin-bottom: 30px;
}

.topbar::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(255, 255, 255, .12), transparent 20rem),
        linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 50%);
    pointer-events: none;
    border-radius: inherit;
}

.brand-wrap {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 760px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06));
    border: 1px solid rgba(255, 255, 255, .18);
    box-shadow: var(--shadow-soft);
}

.brand-logo {
    width: 44px;
    height: 44px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    padding: 6px;
    box-shadow: var(--shadow-soft);
}

.brand-ring,
.brand-core,
.brand-line {
    position: absolute;
    display: block
}

.brand-ring {
    inset: 14px;
    border-radius: 18px;
    border: 2px solid rgba(255, 255, 255, .55)
}

.brand-core {
    width: 12px;
    height: 12px;
    left: 28px;
    top: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #cfe2ff);
    box-shadow: 0 0 14px rgba(255, 255, 255, .45);
}

.brand-line {
    height: 2px;
    left: 34px;
    background: linear-gradient(90deg, #ffffff, transparent)
}

.brand-line-1 {
    width: 18px;
    top: 23px;
    transform: rotate(-30deg)
}

.brand-line-2 {
    width: 21px;
    top: 38px;
    transform: rotate(26deg)
}

.eyebrow {
    margin: 0;
    color: var(--accent);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .22em;
    font-weight: 700;
}

.brand-label {
    margin: 0 0 2px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .22em;
    text-transform: uppercase;
}

.topbar h1,
.section-title,
.card-title {
    margin: 6px 0 0;
    letter-spacing: -.03em;
    line-height: 1.1;
    font-weight: 800;
}

.topbar h1 {
    font-size: clamp(18px, 2.4vw, 26px);
    color: #ffffff
}

.section-title {
    font-size: clamp(16px, 1.8vw, 22px)
}

.card-title {
    font-size: 17px
}

.brand-subtitle,
.muted,
.user-card span,
.user-card small {
    color: var(--muted);
    font-size: 13px
}

.brand-subtitle {
    margin: 6px 0 0;
    font-size: 12px;
    line-height: 1.6;
    max-width: 54ch;
    color: rgba(255, 255, 255, .78)
}

.topbar .user-card span,
.topbar .user-card small {
    color: rgba(255, 255, 255, .74)
}

.user-card {
    position: relative;
    z-index: 1;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px 14px;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .06));
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow: var(--shadow-soft);
    color: #ffffff;
    font-size: 13px;
}

.login-card .user-card,
.panel .user-card,
.table-wrap .user-card {
    color: var(--text);
}

.login-card .user-card span,
.login-card .user-card small,
.panel .user-card span,
.panel .user-card small,
.table-wrap .user-card span,
.table-wrap .user-card small {
    color: var(--muted);
}

.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 20px;
}

.nav-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .1);
    background: linear-gradient(180deg, rgba(35, 72, 138, .88), rgba(29, 63, 122, .88));
    color: #eef4ff;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease, color .16s ease;
    box-shadow: var(--shadow-soft);
}

.nav-tabs a:hover {
    transform: translateY(-1px);
    border-color: rgba(44, 91, 170, .22);
    background: rgba(255, 255, 255, .78);
    color: #23488a;
}

.nav-tabs a.is-active {
    color: #23488a;
    border-color: rgba(255, 255, 255, .22);
    background: linear-gradient(135deg, #ffffff, #eef4ff);
    box-shadow: 0 10px 30px rgba(16, 46, 94, .18);
}

.danger-link {
    background: linear-gradient(180deg, rgba(231, 76, 60, .16), rgba(231, 76, 60, .1)) !important;
    color: #b42318 !important;
    border-color: rgba(231, 76, 60, .18) !important;
}

.danger-link:hover {
    color: #991b1b !important;
    background: linear-gradient(180deg, #fde7e4, #fad6d1) !important;
}

/* Flash artık toast olarak gösteriliyor — eski flash stili kaldırıldı */

.grid {
    display: grid;
    gap: 16px;
    align-items: start
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr))
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr))
}

.login-layout {
    display: grid;
    gap: 22px;
    grid-template-columns: 1.02fr .98fr;
    align-items: start
}

.panel,
.login-card,
.table-wrap {
    position: relative;
    overflow: hidden;
    padding: 20px;
    box-shadow: var(--glow);
}

.login-card-list {
    display: grid;
    gap: 16px
}

.hero-panel {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, .14), transparent 18rem),
        radial-gradient(circle at 100% 100%, rgba(255, 255, 255, .08), transparent 18rem),
        linear-gradient(135deg, #224788 0%, #244d95 55%, #2f61b0 100%);
}

.hero-panel .eyebrow,
.hero-panel .section-title,
.hero-panel .card-title {
    color: #ffffff;
}

.hero-panel .eyebrow {
    color: rgba(255, 255, 255, .78);
}

.hero-panel .kpi-pill {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .14);
    color: #ffffff;
}

.hero-title {
    font-size: clamp(38px, 4.2vw, 62px);
    line-height: .98;
    margin: 12px 0 0;
    max-width: 10ch;
    color: #ffffff;
}

.hero-copy {
    max-width: 58ch;
    line-height: 1.75;
    font-size: 15px;
    margin-top: 22px;
    color: rgba(255, 255, 255, .84);
}

.hero-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.hero-feature,
.hint-item,
.demo-note,
.empty-state {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 248, 255, .96));
}

.hero-feature strong {
    display: block;
    margin-bottom: 4px;
    font-size: 12px;
    color: var(--accent)
}

.hero-feature span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5
}

.hint-list {
    display: grid;
    gap: 10px;
    margin-top: 14px
}

.hint-item {
    color: var(--muted)
}

.demo-note {
    margin-top: 14px;
    font-size: 12px;
    color: #f0f5ff;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .14)
}

.demo-note strong {
    color: #ffffff
}

.kpi-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px
}

.kpi-pill,
.role-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(44, 91, 170, .12);
    background: linear-gradient(180deg, rgba(44, 91, 170, .08), rgba(95, 136, 213, .04));
    font-size: 11px;
    font-weight: 700;
    box-shadow: var(--shadow-soft);
    color: var(--accent);
}

.login-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 136, 213, .12), transparent 16rem),
        radial-gradient(circle at 0% 100%, rgba(44, 91, 170, .08), transparent 14rem),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98));
}

.login-card::before,
.panel::before,
.table-wrap::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent 30%);
    pointer-events: none;
}

.login-card>*,
.panel>*,
.table-wrap>* {
    position: relative
}

.panel-head,
.login-card .topline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 0;
}

.stat-grid-admin {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-card {
    padding: 14px 16px;
    position: relative;
    overflow: hidden;
    min-height: 80px;
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 136, 213, .16), transparent 10rem),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(242, 247, 255, .98));
}

.stat-card::after {
    content: "";
    position: absolute;
    right: -20px;
    bottom: -28px;
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(99, 230, 255, .12), transparent 70%);
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 22px;
    letter-spacing: -.04em;
}

.stat-card .muted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
}

.field,
.field-full {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.field-full {
    grid-column: 1/-1
}

.checkbox-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.checkbox-fieldset legend {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.checkbox-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: rgba(255, 255, 255, .045);
    cursor: pointer;
    font-size: 13px;
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
}

.checkbox-card:hover {
    transform: translateY(-1px);
    border-color: rgba(99, 230, 255, .3);
    background: rgba(255, 255, 255, .06);
}

.checkbox-card input {
    width: 15px;
    height: 15px;
    margin: 0;
    flex: 0 0 auto;
}

.checkbox-card span {
    color: var(--text);
    font-size: 13px;
}

label span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 12px;
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 250, 255, 1));
    color: var(--text);
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: rgba(44, 91, 170, .38);
    box-shadow: 0 0 0 4px rgba(44, 91, 170, .08);
}

select option {
    background: #ffffff;
    color: #07111d;
}

select option:checked {
    background: #dbeafe;
    color: #07111d;
}

textarea {
    min-height: 90px;
    resize: vertical
}

input[type="file"] {
    padding: 8px;
    border-style: dashed;
    background: rgba(44, 91, 170, .03);
}

input[type="file"]::file-selector-button {
    border: 0;
    margin-right: 8px;
    padding: 6px 10px;
    border-radius: 10px;
    font-size: 12px;
    background: linear-gradient(135deg, #2b5aa6, #5f88d5);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

.upload-dropzone {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    border: 1px dashed rgba(44, 91, 170, .28);
    border-radius: 14px;
    background: rgba(44, 91, 170, .04);
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
    cursor: pointer;
}

.upload-dropzone.is-dragover {
    transform: translateY(-1px);
    border-color: rgba(44, 91, 170, .62);
    background: rgba(44, 91, 170, .08);
}

.upload-dropzone strong {
    font-size: 13px;
}

.button {
    border: 0;
    border-radius: 12px;
    min-height: 36px;
    padding: 8px 14px;
    font-size: 13px;
    cursor: pointer;
    font-weight: 700;
    transition: transform .16s ease, filter .16s ease, box-shadow .16s ease;
    box-shadow: var(--shadow-soft);
}

.button:hover {
    transform: translateY(-1px);
    filter: brightness(1.04)
}

.button-primary {
    background: linear-gradient(135deg, #2b5aa6, #5f88d5);
    color: #ffffff;
}

.button-secondary {
    background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(243, 247, 255, 1));
    color: var(--accent);
    border: 1px solid var(--line);
}

.button-danger {
    background: linear-gradient(180deg, #fde7ec, #f9d6de);
    color: #b4233f;
    border: 1px solid rgba(180, 35, 63, .14);
}

.button-danger:hover {
    background: linear-gradient(180deg, #fbdce4, #f6ccd7);
    color: #9f1d37;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.stack-panel {
    display: grid;
    gap: 14px;
}

.subpanel {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98));
}

.payment-action-row {
    flex-direction: column;
    align-items: stretch;
}

.payment-action-row form {
    width: 100%;
}

.payment-action-row .button {
    width: 100%;
}

.assignment-list {
    display: grid;
    gap: 12px;
}

.assignment-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
}

.assignment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.assignment-head p {
    margin: 4px 0 0;
}

.work-summary-panel {
    margin-bottom: 0;
}

.work-summary-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.work-summary-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    min-height: 80px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background:
        radial-gradient(circle at 100% 0%, rgba(95, 136, 213, .14), transparent 10rem),
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(244, 248, 255, .98));
    position: relative;
    overflow: hidden;
}

.work-summary-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 600;
}

.work-summary-value {
    font-size: 20px;
    letter-spacing: -.03em;
}

.photo-link-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.photo-link-group {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.photo-link-list a {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 3px 8px;
    border-radius: 999px;
    border: 1px solid rgba(44, 91, 170, .14);
    background: rgba(44, 91, 170, .06);
    color: var(--accent);
    font-size: 11px;
    text-decoration: none;
}

.photo-link-list a:hover {
    background: rgba(44, 91, 170, .12);
}

.photo-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.photo-preview-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .04);
}

.photo-preview-image {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: rgba(255, 255, 255, .03);
}

.photo-preview-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px 12px;
}

.photo-preview-meta strong,
.photo-preview-meta span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.photo-preview-meta strong {
    font-size: 13px;
}

.photo-preview-meta span {
    color: var(--muted);
    font-size: 12px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.inline-form input[type="number"] {
    min-width: 110px;
}

.photo-remove-button,
.photo-edit-button {
    position: absolute;
    top: 8px;
    border: 0;
    border-radius: 999px;
    padding: 5px 10px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: filter .15s;
}

.photo-remove-button {
    right: 8px;
    background: rgba(239, 68, 68, .9);
}

.photo-edit-button {
    right: 52px;
    background: rgba(59, 130, 246, .9);
}

.photo-remove-button:hover,
.photo-edit-button:hover {
    filter: brightness(1.1);
}

.table-wrap {
    margin-top: 0;
    overflow-x: auto
}

table {
    width: 100%;
    min-width: 700px;
    border-collapse: separate;
    border-spacing: 0 6px;
    font-size: 13px;
}

th,
td {
    text-align: left;
    padding: 10px 10px
}

th {
    color: var(--muted);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .1em;
}

thead th {
    padding-bottom: 2px
}

tbody td {
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98));
    border-top: 1px solid rgba(31, 74, 140, .08);
    border-bottom: 1px solid rgba(31, 74, 140, .08);
}

tbody td:first-child {
    border-left: 1px solid rgba(31, 74, 140, .08);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

tbody td:last-child {
    border-right: 1px solid rgba(31, 74, 140, .08);
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

tbody tr:hover td {
    background: linear-gradient(180deg, rgba(233, 240, 252, 1), rgba(245, 248, 255, 1))
}

.status {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid transparent;
    letter-spacing: .04em;
}

.status-pending {
    background: linear-gradient(180deg, #fff1c7, #ffe29a);
    color: #9a5a00;
    border-color: rgba(197, 122, 0, .18);
}

.status-approved {
    background: linear-gradient(180deg, #dff7ea, #c8f0db);
    color: #0f7a4e;
    border-color: rgba(15, 122, 78, .16);
}

.status-rejected {
    background: linear-gradient(180deg, #fde6ea, #f9d2da);
    color: #a22742;
    border-color: rgba(162, 39, 66, .16);
}

.section-intro {
    margin: 4px 0 0;
    font-size: 12px
}

.empty-state {
    border-style: dashed;
    color: var(--muted);
    font-size: 13px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .98));
}

.page-dashboard .hero-panel {
    margin-bottom: 0;
}

.page-dashboard .grid+.panel,
.page-dashboard .grid+.table-wrap,
.page-dashboard .panel+.panel,
.page-dashboard .panel+.table-wrap,
.page-dashboard .table-wrap+.table-wrap {
    margin-top: 0;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.project-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(244, 248, 255, .98));
    border: 1px solid rgba(31, 74, 140, .1);
    box-shadow: var(--shadow-soft);
}

.project-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.project-card-subtitle {
    margin: 10px 0 0;
}

.project-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.project-metric,
.project-meta-item,
.project-note-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(31, 74, 140, .08);
    background: var(--panel-2);
}

.project-metric strong,
.project-meta-item strong {
    display: block;
    margin-top: 6px;
    font-size: 18px;
}

.project-meta-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.project-description {
    margin: 0;
    line-height: 1.7;
    color: var(--text);
}

.project-status-form {
    flex-wrap: wrap;
}

.project-notes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 4px;
}

.project-notes-head {
    margin-bottom: 0;
}

.project-note-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-note-item strong {
    display: block;
    margin-bottom: 4px;
}

.project-note-item p {
    margin: 10px 0 0;
    line-height: 1.7;
}

.compact-empty-state {
    padding: 16px 18px;
    border-radius: 18px;
}

.status-planlaniyor {
    background: linear-gradient(180deg, #e8f0ff, #dbe9ff);
    color: #214d99;
    border-color: rgba(33, 77, 153, .18);
}

.status-devam_ediyor {
    background: linear-gradient(180deg, #def7ec, #c8f0dd);
    color: #11714f;
    border-color: rgba(17, 113, 79, .18);
}

.status-beklemede {
    background: linear-gradient(180deg, #fff3d7, #ffe7ae);
    color: #9b6500;
    border-color: rgba(155, 101, 0, .18);
}

.status-tamamlandi {
    background: linear-gradient(180deg, #d8f4ff, #c6ebfb);
    color: #0b688a;
    border-color: rgba(11, 104, 138, .18);
}

.status-iptal {
    background: linear-gradient(180deg, #fde8eb, #f7d6dc);
    color: #a3344d;
    border-color: rgba(163, 52, 77, .18);
}

@media (max-width:980px) {

    .login-layout,
    .grid-2,
    .grid-3,
    .stat-grid,
    .form-grid,
    .hero-feature-grid,
    .checkbox-grid,
    .photo-preview-grid,
    .project-metrics,
    .project-meta-list,
    .project-card-grid {
        grid-template-columns: 1fr
    }

    .topbar,
    .brand-wrap,
    .panel-head,
    .login-card .topline,
    .assignment-head,
    .project-card-head {
        flex-direction: column;
        align-items: flex-start
    }

    .user-card {
        min-width: unset;
        width: 100%
    }

    .app-shell {
        padding: 20px 14px 42px
    }

    .topbar,
    .panel,
    .login-card,
    .table-wrap,
    .stat-card {
        border-radius: 26px
    }

    .topbar {
        padding: 24px 22px
    }

    .brand-wrap {
        gap: 16px
    }

    .brand-logo,
    .brand-mark {
        width: 64px;
        height: 64px
    }

    .nav-tabs a {
        width: 100%
    }

    .section-title,
    .card-title {
        font-size: 24px
    }

    .topbar h1 {
        font-size: 28px
    }
}

@media (max-width:640px) {
    .app-shell {
        padding: 16px 12px 34px
    }

    .topbar,
    .panel,
    .login-card,
    .table-wrap {
        padding: 22px 18px
    }

    .hero-title {
        font-size: 34px
    }

    .button,
    .nav-tabs a {
        width: 100%
    }

    .button-row {
        flex-direction: column
    }

    .inline-form {
        flex-direction: column;
        align-items: stretch
    }

    .button-row form {
        width: 100%
    }

    .table-wrap {
        overflow: visible
    }

    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100%;
    }

    .table-wrap table {
        min-width: 0;
        border-spacing: 0
    }

    .table-wrap thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    .table-wrap tbody {
        display: grid;
        gap: 16px;
    }

    .table-wrap tbody tr {
        border: 1px solid rgba(31, 74, 140, .08);
        border-radius: 22px;
        padding: 14px;
        background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98));
        box-shadow: var(--shadow-soft);
    }

    .table-wrap tbody td {
        padding: 0;
        border: 0 !important;
        border-radius: 0 !important;
        background: transparent;
    }

    .table-wrap tbody td+td {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid rgba(31, 74, 140, .08) !important;
    }

    .table-wrap tbody td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .12em;
    }

    .table-wrap tbody tr:hover td {
        background: transparent
    }

    .inline-form input[type="number"] {
        min-width: 0
    }

    .photo-link-list a {
        width: 100%;
        justify-content: center
    }
}

.is-hidden {
    display: none !important
}

.project-edit-form {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 249, 255, .98));
}

/* ═══ Unified Toast Notification System ═══ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 10px;
    pointer-events: none;
    max-width: 340px;
    width: auto;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #f1f5f9;
    background: rgba(15, 23, 42, .92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, .35), 0 0 0 1px rgba(255,255,255,.05) inset;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transform: translateX(120%);
    opacity: 0;
    transition: transform .4s cubic-bezier(.22,1,.36,1), opacity .4s ease;
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    line-height: 1.5;
    border-left: 3px solid #3b82f6;
}

.toast-show {
    transform: translateX(0);
    opacity: 1;
}

/* Progress bar */
.toast::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    width: 100%;
    background: rgba(255,255,255,.15);
    animation: toast-progress 4s linear forwards;
}

@keyframes toast-progress {
    from { width: 100%; }
    to { width: 0%; }
}

.toast-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.toast-msg {
    flex: 1;
    min-width: 0;
    letter-spacing: -.01em;
}

/* ── Success ── */
.toast-success {
    border-left-color: #10b981;
}
.toast-success .toast-icon {
    background: rgba(16, 185, 129, .15);
    color: #34d399;
}
.toast-success::after {
    background: rgba(16, 185, 129, .3);
}

/* ── Error ── */
.toast-error {
    border-left-color: #ef4444;
}
.toast-error .toast-icon {
    background: rgba(239, 68, 68, .15);
    color: #f87171;
}
.toast-error::after {
    background: rgba(239, 68, 68, .3);
}

/* ── Info ── */
.toast-info {
    border-left-color: #3b82f6;
}
.toast-info .toast-icon {
    background: rgba(59, 130, 246, .15);
    color: #60a5fa;
}
.toast-info::after {
    background: rgba(59, 130, 246, .3);
}

/* ── Warning ── */
.toast-warning {
    border-left-color: #f59e0b;
    color: #f1f5f9;
}
.toast-warning .toast-icon {
    background: rgba(245, 158, 11, .15);
    color: #fbbf24;
}
.toast-warning::after {
    background: rgba(245, 158, 11, .3);
}

/* ═══════════════════════════════════════════════════════
   DESKTOP ENHANCEMENTS (≥981px)
   ═══════════════════════════════════════════════════════ */

/* ── Sidebar Popup (base, all screens) ── */
.sidebar-ctrl-popup {
    display: none;
    position: fixed;
    z-index: 9999;
}

@media (min-width: 981px) {

    /* ── Sidebar Base ── */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 68px;
        z-index: 900;
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 20px 8px 14px;
        overflow-y: auto;
        overflow-x: hidden;
        background:
            radial-gradient(circle at 0% 0%, rgba(44, 91, 170, .06), transparent 20rem),
            linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(246, 249, 255, .97));
        border-right: 1px solid var(--line);
        box-shadow: 4px 0 24px rgba(25, 58, 110, .06);
        backdrop-filter: blur(16px);
        transition: width .28s cubic-bezier(.4,0,.2,1), padding .28s cubic-bezier(.4,0,.2,1), box-shadow .28s ease;
    }

    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 8px 4px 16px;
        margin-bottom: 4px;
        border-bottom: 1px solid var(--line);
        justify-content: center;
    }

    .sidebar-brand img {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        object-fit: contain;
        background: rgba(44, 91, 170, .06);
        border: 1px solid var(--line);
        padding: 4px;
        flex-shrink: 0;
        transition: width .2s, height .2s;
    }

    .sidebar-brand-text {
        display: flex;
        flex-direction: column;
    }

    .sidebar-brand-title {
        font-size: 11px;
        font-weight: 800;
        letter-spacing: .14em;
        text-transform: uppercase;
        color: var(--accent);
        line-height: 1.2;
    }

    .sidebar-brand-sub {
        font-size: 11px;
        color: var(--muted);
        margin-top: 1px;
    }

    .sidebar-section-label {
        display: none;
    }

    /* ── Labels: hidden by default, shown when wide ── */
    .sidebar .sidebar-label {
        opacity: 0;
        width: 0;
        overflow: hidden;
        white-space: nowrap;
        display: none;
        transition: opacity .18s ease .06s;
    }

    .sidebar .nav-tabs {
        display: flex !important;
        flex-direction: column;
        gap: 2px;
        margin: 0;
        padding: 0;
    }

    .sidebar .nav-tabs a {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
        width: 100%;
        min-height: 40px;
        padding: 10px;
        border-radius: 10px;
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
        background: transparent;
        border: 1px solid transparent;
        box-shadow: none;
        transition: all .18s ease;
        position: relative;
        white-space: nowrap;
        text-align: left;
    }

    .sidebar .nav-tabs a:hover {
        background: rgba(44, 91, 170, .06);
        color: var(--accent);
        transform: none;
    }

    .sidebar .nav-tabs a.is-active {
        background: linear-gradient(135deg, rgba(44, 91, 170, .1), rgba(95, 136, 213, .08));
        color: var(--accent);
        border-color: rgba(44, 91, 170, .12);
        box-shadow: 0 2px 8px rgba(44, 91, 170, .08);
        font-weight: 700;
    }

    .sidebar .nav-tabs a.is-active::before {
        content: '';
        position: absolute;
        left: -8px;
        top: 8px;
        bottom: 8px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: linear-gradient(180deg, var(--accent), var(--accent-2));
    }

    .sidebar .nav-tabs a svg {
        width: 20px;
        height: 20px;
        min-width: 20px;
        flex-shrink: 0;
        opacity: .7;
    }

    .sidebar .nav-tabs a.is-active svg,
    .sidebar .nav-tabs a:hover svg {
        opacity: 1;
    }

    .sidebar .nav-tabs .danger-link {
        margin-top: 8px;
        color: var(--red);
        background: transparent;
    }

    .sidebar .nav-tabs .danger-link:hover {
        background: rgba(239, 68, 68, .08);
        color: #b91c1c;
    }

    .sidebar-user {
        margin-top: 0;
        padding: 10px 4px;
        border-top: 1px solid var(--line);
        display: flex;
        flex-direction: column;
        gap: 2px;
        align-items: center;
    }

    .sidebar-user span {
        font-size: 13px;
        font-weight: 600;
        color: var(--text);
    }

    .sidebar-user small {
        font-size: 11px;
        color: var(--muted);
    }

    /* ══ Sidebar Control Button & Popup ══ */
    .sidebar-ctrl-wrap {
        position: relative;
        margin-top: auto;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 0 2px 4px;
    }

    .sidebar-ctrl-btn {
        width: 28px;
        height: 28px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 1px solid var(--line);
        border-radius: 6px;
        cursor: pointer;
        color: var(--muted);
        transition: all .2s;
        padding: 0;
        flex-shrink: 0;
    }

    .sidebar-ctrl-btn svg {
        width: 14px;
        height: 14px;
    }

    .sidebar-ctrl-btn:hover {
        background: rgba(44, 91, 170, .06);
        color: var(--accent);
        border-color: rgba(44, 91, 170, .15);
    }

    .sidebar-ctrl-popup {
        min-width: 200px;
        background: var(--panel, #fff);
        border: 1px solid var(--line);
        border-radius: 12px;
        box-shadow: 0 8px 32px rgba(0,0,0,.14);
        padding: 8px;
    }

    .sidebar-ctrl-popup.is-open {
        display: block;
        animation: sbPopIn .18s ease;
    }

    @keyframes sbPopIn {
        from { opacity: 0; transform: translateY(6px) scale(.96); }
        to   { opacity: 1; transform: translateY(0) scale(1); }
    }

    .sidebar-ctrl-title {
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .08em;
        color: var(--muted);
        padding: 6px 10px 4px;
        margin: 0;
    }

    .sidebar-ctrl-opt {
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 9px 10px;
        border: none;
        background: transparent;
        border-radius: 8px;
        cursor: pointer;
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
        transition: background .15s;
        text-align: left;
    }

    .sidebar-ctrl-opt:hover {
        background: rgba(44, 91, 170, .06);
    }

    .sidebar-ctrl-radio {
        width: 16px;
        height: 16px;
        border-radius: 50%;
        border: 2px solid var(--muted);
        flex-shrink: 0;
        position: relative;
        transition: border-color .15s;
    }

    .sidebar-ctrl-opt.is-selected .sidebar-ctrl-radio {
        border-color: var(--accent);
    }

    .sidebar-ctrl-opt.is-selected .sidebar-ctrl-radio::after {
        content: '';
        position: absolute;
        top: 3px;
        left: 3px;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--accent);
    }

    /* ══ Sidebar Modes ══ */

    /* — Wide state helper (reused across modes) — */
    .sidebar.sb-mode-expanded,
    .sidebar.sb-mode-hover:hover {
        width: 252px;
        padding: 20px 14px 14px;
    }
    .sidebar.sb-mode-hover:hover {
        box-shadow: 8px 0 40px rgba(25, 58, 110, .12);
    }

    .sidebar.sb-mode-expanded .sidebar-label,
    .sidebar.sb-mode-hover:hover .sidebar-label {
        opacity: 1;
        width: auto;
        display: inline;
    }

    .sidebar.sb-mode-expanded .sidebar-brand-text,
    .sidebar.sb-mode-hover:hover .sidebar-brand-text {
        display: flex;
    }

    .sidebar.sb-mode-expanded .sidebar-brand,
    .sidebar.sb-mode-hover:hover .sidebar-brand {
        justify-content: flex-start;
        padding: 8px 10px 16px;
    }

    .sidebar.sb-mode-expanded .sidebar-brand img,
    .sidebar.sb-mode-hover:hover .sidebar-brand img {
        width: 38px;
        height: 38px;
    }

    .sidebar.sb-mode-expanded .nav-tabs a,
    .sidebar.sb-mode-hover:hover .nav-tabs a {
        justify-content: flex-start;
        padding: 9px 14px;
    }

    .sidebar.sb-mode-expanded .nav-tabs a.is-active::before,
    .sidebar.sb-mode-hover:hover .nav-tabs a.is-active::before {
        left: -14px;
    }

    .sidebar.sb-mode-expanded .sidebar-user,
    .sidebar.sb-mode-hover:hover .sidebar-user {
        padding: 12px 10px;
        align-items: flex-start;
    }

    /* Mode: Collapsed — always narrow, no hover expand */
    .sidebar.sb-mode-collapsed {
        width: 68px;
        padding: 20px 8px 14px;
    }

    /* ── App Shell offset — always 68px except expanded mode ── */
    .app-shell {
        margin-left: 68px;
        max-width: calc(1320px + 40px);
        padding: 24px 28px 48px;
        transition: margin-left .28s cubic-bezier(.4,0,.2,1);
    }

    body.sidebar-is-expanded .app-shell {
        margin-left: 252px;
    }

    /* ── Topbar sticky ── */
    .topbar {
        position: sticky;
        top: 0;
        z-index: 800;
        transition: box-shadow .25s ease;
    }

    .topbar.scrolled-desktop {
        box-shadow: 0 8px 32px rgba(25, 58, 110, .18);
    }

    /* ── Hide original nav-tabs (inside sidebar now) ── */
    .app-shell>.nav-tabs {
        display: none !important;
    }

    /* ── Topbar-to-content spacing (nav-tabs used to provide this) ── */
    .topbar {
        margin-bottom: 20px;
    }

    /* ── Stat Cards ── */
    .stat-card {
        transition: transform .2s ease, box-shadow .2s ease;
        cursor: default;
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow), 0 0 0 1px rgba(44, 91, 170, .08);
    }

    .stat-grid-admin {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    /* ── Panel hover ── */
    .panel,
    .table-wrap {
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .panel:hover,
    .table-wrap:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow), 0 0 0 1px rgba(44, 91, 170, .06);
    }

    /* ── Table enhancements ── */
    table {
        min-width: 100%;
    }

    thead th {
        position: sticky;
        top: 0;
        background: linear-gradient(180deg, rgba(240, 244, 255, .98), rgba(233, 240, 252, .98));
        z-index: 10;
        padding-top: 12px;
        padding-bottom: 10px;
        box-shadow: 0 1px 0 var(--line);
    }

    tbody tr {
        transition: background .15s ease;
    }

    tbody tr:nth-child(even) td {
        background: linear-gradient(180deg, rgba(246, 249, 255, .6), rgba(240, 244, 252, .6));
    }

    /* ── Project card grid on desktop ── */
    .project-card-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }

    .project-card {
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .project-card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow), 0 0 0 1px rgba(44, 91, 170, .08);
    }

    /* ── Form grids wider ── */
    .form-grid {
        gap: 16px;
    }

    /* ── Work summary items ── */
    .work-summary-item {
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .work-summary-item:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-soft), 0 0 0 1px rgba(44, 91, 170, .08);
    }

    /* ── Content gap ── */
    .content {
        gap: 20px;
    }

    /* Flash artık toast olarak gösteriliyor */

    /* ── Wider hero feature grid ── */
    .hero-feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* ── User card topbar: hide on desktop (shown in sidebar) ── */
    .topbar .user-card {
        display: none;
    }
}

/* ── Table Search Box ── */
.table-search-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}
.table-search-wrap svg {
    width: 18px;
    height: 18px;
    color: var(--muted);
    flex-shrink: 0;
}
.table-search {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--panel);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}
.table-search::placeholder {
    color: var(--muted);
    font-weight: 400;
}
.table-search:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(44, 91, 170, .08);
}