/* Mukaddes Aksoy — Kurumsal Dosya Paylaşım
   Renk paleti hasta/hakediş sistemleriyle ortaktır. */

:root {
    --brand-900: #1a255c;
    --brand-800: #243274;
    --brand-700: #2B3A8D;
    --accent: #55C4B4;
    --accent-dark: #45b5a5;
    --page-bg: #f4f7fb;
    --card-border: #e8ecf4;
    --input-border: #dde3ef;
    --muted: #64748B;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--brand-900);
    background: var(--page-bg);
    -webkit-font-smoothing: antialiased;
}

/* ══ Giriş ekranı ══════════════════════════════════════════════════════ */

.auth-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2.5rem 2rem;
    color: #fff;
    background: linear-gradient(to bottom right, #2B3A8D 0%, #243274 50%, #1a255c 100%);
}
.brand-deco { position: absolute; inset: 0; opacity: .07; pointer-events: none; }
.brand-deco span { position: absolute; display: block; border-radius: 9999px; background: var(--accent); }
.brand-deco .deco-1 { top: -6rem; right: -6rem; width: 24rem; height: 24rem; }
.brand-deco .deco-2 { bottom: 0; left: 0; width: 20rem; height: 20rem; transform: translate(-25%, 50%); }

.brand-content { position: relative; z-index: 1; }
.brand-logo {
    height: 6rem;
    width: auto;
    margin-bottom: 2rem;
    filter: drop-shadow(0 4px 3px rgba(0,0,0,.12));
}
.brand-eyebrow {
    margin: 0 0 .75rem;
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .2em;
    text-transform: uppercase;
}
.brand-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -.02em;
    max-width: 24rem;
}

.brand-features {
    position: relative;
    z-index: 1;
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.brand-feature {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: rgba(255,255,255,.8);
}
.brand-feature .fi {
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: rgba(255,255,255,.1);
    backdrop-filter: blur(4px);
    color: var(--accent);
    font-size: .9rem;
}

.form-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
}
.form-wrap { width: 100%; max-width: 420px; }

.mobile-brand { text-align: center; margin-bottom: 2rem; }
.mobile-brand img { height: 5rem; width: auto; margin-bottom: 1rem; }
.mobile-brand h2 { margin: 0; font-size: 1.125rem; font-weight: 600; color: var(--brand-700); }

.login-card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 8px 40px -12px rgba(43,58,141,.18);
    padding: 2rem;
}
.card-head { margin-bottom: 2rem; }
.login-card h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--brand-900);
}
.login-card .subtitle { margin: .375rem 0 0; font-size: .875rem; color: var(--muted); }

.card-note { margin: 1.25rem 0 0; text-align: center; font-size: .8125rem; color: var(--muted); }
.footer-note { margin: 1.5rem 0 0; text-align: center; font-size: .75rem; color: var(--muted); }

/* ══ Form öğeleri ══════════════════════════════════════════════════════ */

.field { margin-bottom: 1.25rem; }
.field label {
    display: block;
    margin-bottom: .5rem;
    font-size: .875rem;
    font-weight: 500;
    color: var(--brand-900);
}
.input-wrap { position: relative; }
.input-wrap > i {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: .875rem;
    color: var(--muted);
    pointer-events: none;
}
.input-wrap input {
    width: 100%;
    height: 2.75rem;
    padding: 0 .875rem 0 2.5rem;
    font-family: inherit;
    font-size: .9rem;
    color: var(--brand-900);
    background: #fff;
    border: 1px solid var(--input-border);
    border-radius: .75rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input-wrap input::placeholder { color: #9aa6bf; }
.input-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(85,196,180,.4);
}

.btn-primary {
    height: 2.75rem;
    padding: 0 1.5rem;
    border: none;
    border-radius: .75rem;
    background: var(--accent);
    color: #fff;
    font-family: inherit;
    font-size: .95rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    box-shadow: 0 4px 6px -1px rgba(85,196,180,.25), 0 2px 4px -2px rgba(85,196,180,.25);
    transition: background-color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.btn-primary:hover:not(:disabled) {
    background: var(--accent-dark);
    box-shadow: 0 6px 12px -2px rgba(85,196,180,.35);
}
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn-block { width: 100%; }

/* ══ Bildirimler ═══════════════════════════════════════════════════════ */

.alert {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    font-size: .875rem;
    margin-bottom: 1.25rem;
}
.alert i { margin-top: .15rem; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #b42318; }
.alert-success { background: #f0fdf9; border: 1px solid #a7e8dc; color: #0f766e; }

/* ══ Uygulama düzeni ═══════════════════════════════════════════════════ */

.topbar {
    background: linear-gradient(to right, #2B3A8D 0%, #243274 55%, #1a255c 100%);
    color: #fff;
    box-shadow: 0 2px 12px rgba(26,37,92,.18);
}
.topbar-inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: .875rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.topbar-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #fff;
    text-decoration: none;
    min-width: 0;
}
.topbar-brand img { height: 2.5rem; width: auto; }
.topbar-brand span { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.topbar-brand strong { font-size: 1rem; font-weight: 700; letter-spacing: -.01em; }
.topbar-brand small {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-user { display: flex; align-items: center; gap: .625rem; flex: 0 0 auto; }
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .4rem .75rem;
    border-radius: 9999px;
    background: rgba(255,255,255,.12);
    font-size: .8125rem;
    font-weight: 500;
}
.user-chip i { color: var(--accent); font-size: .75rem; }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    height: 2.125rem;
    padding: 0 .875rem;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: .625rem;
    background: transparent;
    color: #fff;
    font-family: inherit;
    font-size: .8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.btn-ghost:hover { background: rgba(255,255,255,.14); border-color: rgba(255,255,255,.45); }

.container { max-width: 1080px; margin: 0 auto; padding: 1.75rem 1.25rem 2.5rem; }

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.stat {
    display: flex;
    align-items: center;
    gap: .875rem;
    padding: 1rem 1.125rem;
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: .875rem;
    box-shadow: 0 4px 20px -14px rgba(43,58,141,.25);
}
.stat-icon {
    flex: 0 0 auto;
    width: 2.75rem;
    height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .625rem;
    font-size: 1.05rem;
}
.stat b { display: block; font-size: 1.125rem; font-weight: 700; line-height: 1.2; }
.stat small { color: var(--muted); font-size: .8125rem; }

.card {
    background: #fff;
    border: 1px solid var(--card-border);
    border-radius: 1rem;
    box-shadow: 0 8px 40px -20px rgba(43,58,141,.2);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.card-title { margin-bottom: 1.25rem; }
.card-title h2 {
    margin: 0;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -.01em;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.card-title h2 i { color: var(--brand-700); font-size: .95rem; }
.card-title p { margin: .3rem 0 0; font-size: .8125rem; color: var(--muted); }
.row-between {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ══ Yükleme alanı ═════════════════════════════════════════════════════ */

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2rem 1.25rem;
    text-align: center;
    border: 2px dashed #c9d6ea;
    border-radius: .875rem;
    background: #fafcff;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: #f2fbf9; }
.dz-icon {
    width: 3.25rem;
    height: 3.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: .35rem;
    border-radius: .75rem;
    background: rgba(85,196,180,.14);
    color: var(--accent-dark);
    font-size: 1.35rem;
}
.dropzone b { font-size: .9375rem; }
.dropzone small { color: var(--muted); font-size: .8125rem; }

.picked { list-style: none; margin: 1rem 0 0; padding: 0; }
.picked li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .5rem .75rem;
    border: 1px solid var(--card-border);
    border-radius: .5rem;
    font-size: .8125rem;
    background: #fafcff;
}
.picked li + li { margin-top: .375rem; }
.picked li span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.picked li small { flex: 0 0 auto; color: var(--muted); }

#uploadBtn { margin-top: 1.25rem; }

/* ══ Arama ═════════════════════════════════════════════════════════════ */

.search { position: relative; display: flex; align-items: center; }
.search > i {
    position: absolute;
    left: .75rem;
    font-size: .8125rem;
    color: var(--muted);
    pointer-events: none;
}
.search input {
    height: 2.375rem;
    width: 240px;
    max-width: 100%;
    padding: 0 2rem 0 2.125rem;
    font-family: inherit;
    font-size: .875rem;
    color: var(--brand-900);
    border: 1px solid var(--input-border);
    border-radius: .625rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(85,196,180,.35); }
.search-clear {
    position: absolute;
    right: .625rem;
    color: var(--muted);
    font-size: .8125rem;
    text-decoration: none;
}
.search-clear:hover { color: #b42318; }

/* ══ Dosya tablosu ═════════════════════════════════════════════════════ */

.table-wrap { overflow-x: auto; }
table.files { width: 100%; border-collapse: collapse; }
table.files th {
    text-align: left;
    padding: .5rem .75rem;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    border-bottom: 1px solid var(--card-border);
    white-space: nowrap;
}
table.files td {
    padding: .75rem;
    border-bottom: 1px solid #f1f4fa;
    font-size: .875rem;
    vertical-align: middle;
}
table.files tbody tr:last-child td { border-bottom: none; }
table.files tbody tr:hover { background: #fafcff; }

.fname { display: flex; align-items: center; gap: .625rem; min-width: 0; }
.ficon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: .5rem;
    background: #f4f7fb;
    font-size: .9rem;
}
.ftext {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 380px;
}
.fmeta-sm { display: none; margin: .3rem 0 0 2.625rem; font-size: .75rem; color: var(--muted); }

.col-size, .col-user, .col-date { color: var(--muted); white-space: nowrap; }
.col-actions { width: 1%; white-space: nowrap; }
.actions { display: flex; gap: .375rem; justify-content: flex-end; }
.btn-icon {
    width: 2.125rem;
    height: 2.125rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--card-border);
    border-radius: .5rem;
    background: #fff;
    color: var(--muted);
    font-size: .8125rem;
    cursor: pointer;
    text-decoration: none;
    transition: all .15s ease;
}
.btn-download:hover { border-color: var(--accent); background: rgba(85,196,180,.12); color: var(--accent-dark); }
.btn-delete:hover { border-color: #fecaca; background: #fef2f2; color: #b42318; }

.empty { text-align: center; padding: 2.5rem 1rem; }
.empty span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin-bottom: .875rem;
    border-radius: .875rem;
    background: #f4f7fb;
    color: #9aa6bf;
    font-size: 1.35rem;
}
.empty b { display: block; font-size: .9375rem; }
.empty small { color: var(--muted); font-size: .8125rem; }

.hide-sm { display: inline; }

/* ══ Duyarlı düzen ═════════════════════════════════════════════════════ */

@media (min-width: 992px) {
    .auth-body { flex-direction: row; }
    .brand-panel { width: 44%; padding: 3.5rem 3rem; }
    .brand-logo { height: 7rem; }
    .brand-title { font-size: 1.875rem; }
    .brand-features { margin-top: 0; }
    .form-panel { padding: 2.5rem 3rem; }
    .mobile-brand { display: none; }
    .login-card { padding: 2.5rem; }
}
@media (min-width: 1200px) {
    .brand-panel { width: 42%; }
}

@media (max-width: 760px) {
    .topbar-brand small { display: none; }
    .user-chip { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .hide-sm { display: none; }
    .col-size, .col-user, .col-date { display: none; }
    table.files th.col-size, table.files th.col-user, table.files th.col-date { display: none; }
    .fmeta-sm { display: block; }
    .ftext { max-width: 180px; }
    .search input { width: 100%; }
    .row-between { align-items: stretch; }
    .row-between .search { width: 100%; }
}
