:root {
    --ink: #0b1f33;
    --navy: #102a43;
    --muted: #667085;
    --line: #e6e8ec;
    --soft: #f6f7f9;
    --paper: #ffffff;
    --gold: #c8a45d;
    --danger: #b42318;

    --ff-bg: #f5f7fb;
    --ff-panel: #ffffff;
    --ff-ink: #0b1f33;
    --ff-muted: #6b7280;
    --ff-soft: #f8fafc;
    --ff-line: #e5e7eb;
    --ff-line-2: #eef0f4;
    --ff-gold: #c8a45d;
    --ff-gold-soft: rgba(200, 164, 93, .12);
    --ff-shadow: 0 24px 70px rgba(15, 23, 42, .08);
    --ff-radius-lg: 28px;
    --ff-radius-md: 18px;
    --ff-radius-sm: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: var(--soft);
    color: var(--ink);
}

a {
    color: var(--ink);
}

/* =========================================================
   Public Landing Page
========================================================= */

.landing {
    background:
        radial-gradient(circle at top left, rgba(200,164,93,.18), transparent 30%),
        linear-gradient(180deg, #fff 0%, #f6f7f9 100%);
}

.landing-wrap {
    min-height: 100vh;
    max-width: 880px;
    margin: 0 auto;
    padding: 60px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand {
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink);
}

.landing-wrap h1 {
    font-size: clamp(42px, 8vw, 78px);
    line-height: .95;
    margin: 22px 0;
    max-width: 780px;
}

.landing-wrap p {
    color: var(--muted);
    font-size: 20px;
    line-height: 1.6;
    max-width: 680px;
}

.landing-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 24px;
}

/* =========================================================
   Buttons
========================================================= */

.btn,
.header-actions a,
.form-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 11px 16px;
    border-radius: 13px;
    text-decoration: none;
    font-weight: 800;
    font-size: 14px;
    border: 1px solid transparent;
    transition: all .18s ease;
}

.btn.primary,
button {
    background: linear-gradient(135deg, var(--ff-ink) 0%, #153a5d 100%);
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
    box-shadow: 0 14px 30px rgba(11,31,51,.18);
}

.btn.secondary,
.header-actions .btn.secondary,
.form-actions .btn.secondary {
    background: #fff;
    color: var(--ff-ink);
    border-color: var(--ff-line);
    box-shadow: 0 8px 18px rgba(15,23,42,.04);
}

.btn:hover,
.header-actions a:hover,
.form-actions a:hover,
button:hover {
    transform: translateY(-1px);
}

/* =========================================================
   Auth / Login Page
========================================================= */

.auth-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(200,164,93,.16), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    padding: 30px;
    border-radius: 24px;
    border: 1px solid var(--line);
    box-shadow: 0 20px 70px rgba(11,31,51,.1);
}

.auth-card h1 {
    margin: 16px 0 24px;
}

/* =========================================================
   Admin Layout
========================================================= */

body.app-page {
    background:
        radial-gradient(circle at top right, rgba(200, 164, 93, .12), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, var(--ff-bg) 38%, var(--ff-bg) 100%);
    color: var(--ff-ink);
}

.app-page {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: 100vh;
}

.content {
    padding: 28px 32px;
    max-width: 1440px;
    width: 100%;
}

/* =========================================================
   Clean Compact Sidebar
   Works with includes/admin-sidebar.php using:
   sidebar clean-sidebar
   clean-brand
   clean-nav
   clean-account
========================================================= */

.clean-sidebar {
    width: 220px;
    min-width: 220px;
    height: 100vh;
    position: sticky;
    top: 0;
    padding: 24px 20px;
    background: #071b2b;
    border-right: 1px solid rgba(255,255,255,.08);
    display: flex;
    flex-direction: column;
    box-shadow: none;
}

.clean-brand {
    margin: 0 0 24px;
    padding: 0 0 18px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.clean-brand a {
    display: block;
    text-decoration: none;
    color: #fff;
}

.clean-brand strong {
    display: block;
    font-size: 19px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -.03em;
    color: #fff;
}

.clean-brand span {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: rgba(255,255,255,.42);
}

.clean-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.clean-nav a {
    display: block;
    position: relative;
    padding: 8px 0 8px 14px;
    margin: 0;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.25;
    letter-spacing: -.01em;
    color: rgba(255,255,255,.58);
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    min-height: unset;
    transition: color .15s ease, padding-left .15s ease;
}

.clean-nav a:hover {
    color: rgba(255,255,255,.90);
    padding-left: 18px;
}

.clean-nav a.active {
    color: #ffffff;
    padding-left: 18px;
}

.clean-nav a.active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--gold);
}

.clean-account {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.10);
}

.clean-account strong {
    display: block;
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.clean-account span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.42);
    font-size: 11px;
    text-transform: capitalize;
}

.clean-account a {
    display: inline-block;
    margin-top: 12px;
    color: rgba(255,255,255,.58);
    text-decoration: none;
    font-size: 13px;
    font-weight: 650;
}

.clean-account a:hover {
    color: #fff;
}

/* =========================================================
   Page Header
========================================================= */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.page-header.premium-header {
    background:
        radial-gradient(circle at 92% 18%, rgba(200,164,93,.18), transparent 26%),
        linear-gradient(135deg, #ffffff 0%, #fbfaf7 44%, #f7f9fc 100%);
    border: 1px solid var(--ff-line);
    border-radius: var(--ff-radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--ff-shadow);
}

.page-header h1,
.page-header.premium-header h1 {
    margin: 0;
    font-size: clamp(30px, 3vw, 42px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.page-header p,
.page-header.premium-header p {
    color: var(--ff-muted);
    font-size: 15px;
    max-width: 680px;
    line-height: 1.6;
    margin: 8px 0 0;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--ff-gold);
    margin-bottom: 12px;
}

.eyebrow::before {
    content: "";
    width: 28px;
    height: 1px;
    background: var(--ff-gold);
}

.header-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* =========================================================
   Forms
========================================================= */

label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 900;
    color: var(--ff-ink);
    letter-spacing: -.01em;
}

input,
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    border-radius: 15px;
    border: 1px solid var(--ff-line);
    background: #fff;
    color: var(--ff-ink);
    font-size: 15px;
    font-family: inherit;
    outline: none;
    transition: all .16s ease;
}

textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.6;
}

input::placeholder,
textarea::placeholder {
    color: #a0a7b3;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--ff-gold);
    box-shadow: 0 0 0 4px var(--ff-gold-soft);
}

small {
    display: block;
    margin-top: 7px;
    color: var(--ff-muted);
    font-size: 12px;
    line-height: 1.45;
}

button {
    width: 100%;
    margin-top: 20px;
    padding: 14px;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    cursor: pointer;
}

.modern-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    max-width: 1180px;
}

.form-card,
.form-section {
    position: relative;
    background: rgba(255,255,255,.96);
    border: 1px solid var(--ff-line);
    border-radius: var(--ff-radius-lg);
    padding: 26px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .045);
    overflow: hidden;
}

.form-section::before {
    content: "";
    position: absolute;
    left: 0;
    top: 24px;
    width: 4px;
    height: 44px;
    border-radius: 0 10px 10px 0;
    background: linear-gradient(180deg, var(--ff-gold), #ead7aa);
}

.form-section:hover {
    border-color: rgba(200,164,93,.34);
}

.compact-section {
    padding: 20px 26px;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
    gap: 28px;
    align-items: start;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--ff-line-2);
}

.section-heading h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: -.02em;
    color: var(--ff-ink);
}

.section-heading p {
    margin: 0;
    color: var(--ff-muted);
    line-height: 1.6;
    font-size: 14px;
}

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

.form-grid.one {
    grid-template-columns: minmax(0, 1fr);
}

.form-grid .full {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 22px;
}

.form-actions button {
    width: auto;
    min-width: 180px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    font-weight: 700;
}

.checkbox-line input {
    width: auto;
}

/* Toggle */

.toggle-line {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 0;
    cursor: pointer;
}

.toggle-line input {
    appearance: none;
    width: 46px;
    height: 26px;
    min-height: unset;
    border-radius: 999px;
    background: #d1d5db;
    position: relative;
    padding: 0;
    border: 0;
    flex: 0 0 auto;
}

.toggle-line input::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 8px rgba(0,0,0,.18);
    transition: all .18s ease;
}

.toggle-line input:checked {
    background: linear-gradient(135deg, var(--ff-ink), #1f4f7a);
}

.toggle-line input:checked::after {
    left: 23px;
}

.toggle-line span {
    display: grid;
    gap: 2px;
}

.toggle-line strong {
    color: var(--ff-ink);
    font-size: 15px;
}

.toggle-line small {
    margin: 0;
}

/* Sticky Form Actions */

.sticky-actions {
    position: sticky;
    bottom: 18px;
    z-index: 20;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(229,231,235,.86);
    border-radius: 22px;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(15, 23, 42, .09);
}

.sticky-actions button {
    width: auto;
    min-width: 178px;
    min-height: 46px;
    margin: 0;
    border-radius: 14px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 900;
}

.sticky-actions .btn.secondary {
    min-width: 130px;
}

/* =========================================================
   Alerts
========================================================= */

.alert,
.success-alert {
    border-radius: 16px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 700;
    border: 1px solid transparent;
}

.alert {
    background: #fff1f0;
    color: var(--danger);
    border-color: #ffd6d1;
}

.success-alert {
    background: #ecfdf3;
    color: #027a48;
    border-color: #abefc6;
}

/* =========================================================
   Stats / Tables / Cards
========================================================= */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.stat-card,
.table-card,
.mini-card {
    background: #fff;
    border: 1px solid var(--ff-line);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 14px 40px rgba(15,23,42,.045);
}

.stat-card span {
    color: var(--ff-muted);
    display: block;
}

.stat-card strong {
    font-size: 36px;
    display: block;
    margin-top: 8px;
}

.table-card {
    overflow-x: auto;
}

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

th,
td {
    padding: 14px;
    text-align: left;
    border-bottom: 1px solid var(--ff-line);
    vertical-align: top;
}

th {
    background: var(--ff-soft);
    color: var(--ff-muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: 11px;
}

td {
    font-size: 14px;
}

.card-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.mini-card h2 {
    margin: 0 0 8px;
}

.mini-card p {
    color: var(--ff-muted);
    margin: 0 0 16px;
}

.mini-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--ff-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.mini-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mini-actions a {
    text-decoration: none;
    background: var(--ff-soft);
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 700;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1020px) {
    .app-page {
        grid-template-columns: 1fr;
    }

    .clean-sidebar {
        width: 100%;
        min-width: 100%;
        height: auto;
        position: relative;
        padding: 16px 18px;
    }

    .clean-brand {
        margin-bottom: 12px;
        padding-bottom: 12px;
    }

    .clean-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
    }

    .clean-nav a {
        padding: 6px 0;
        font-size: 13px;
    }

    .clean-nav a.active {
        padding-left: 12px;
    }

    .clean-account {
        display: none;
    }

    .content {
        padding: 22px;
    }

    .section-heading {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .form-grid,
    .stats-grid,
    .card-list {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }
}

@media (max-width: 640px) {
    .content {
        padding: 16px;
    }

    .page-header.premium-header,
    .form-section,
    .form-card {
        border-radius: 22px;
        padding: 20px;
    }

    .sticky-actions {
        flex-direction: column-reverse;
        bottom: 10px;
    }

    .sticky-actions button,
    .sticky-actions .btn {
        width: 100%;
    }
}
.filter-form .form-actions {
    margin-top: 6px;
}

.filter-form .form-actions button {
    width: auto;
    min-width: 140px;
    margin-top: 0;
}
.filter-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
}

.filter-hint {
    color: var(--ff-muted);
    font-size: 13px;
}

.filter-form input,
.filter-form select {
    background: #fff;
}
/* =========================================================
   Cards Page Refinements
========================================================= */

.compact-page-header {
    padding: 24px !important;
}

.compact-page-header h1 {
    font-size: clamp(28px, 2.4vw, 38px) !important;
}

.compact-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.compact-stats .stat-card {
    padding: 16px 18px;
    border-radius: 18px;
}

.compact-stats .stat-card span {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ff-muted);
}

.compact-stats .stat-card strong {
    font-size: 28px;
    margin-top: 6px;
    letter-spacing: -.04em;
}

.compact-filter-section,
.compact-list-section {
    padding: 22px;
    border-radius: 22px;
}

.compact-section-heading {
    grid-template-columns: minmax(0, 240px) minmax(0, 1fr);
    gap: 20px;
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.compact-section-heading h2 {
    font-size: 20px;
}

.compact-section-heading p {
    font-size: 13px;
}

.filter-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 6px;
    min-height: 42px;
}

.filter-hint {
    color: var(--ff-muted);
    font-size: 13px;
}

.small-btn {
    min-height: 38px;
    padding: 9px 13px;
    font-size: 13px;
}

.compact-table-card {
    border-radius: 18px;
    padding: 0;
    overflow: hidden;
}

.compact-table-card table th,
.compact-table-card table td {
    padding: 11px 12px;
}

.compact-table-card table th {
    font-size: 10px;
}

.compact-table-card table td {
    font-size: 13px;
}

.compact-table-card small {
    font-size: 11px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
}

.status-pill.active {
    background: #ecfdf3;
    color: #027a48;
}

.status-pill.passive {
    background: #f2f4f7;
    color: #667085;
}

.link-actions {
    white-space: nowrap;
}

.link-actions a,
.text-link {
    color: var(--ff-ink);
    font-weight: 800;
    text-decoration: none;
    font-size: 13px;
}

.link-actions a:hover,
.text-link:hover {
    color: var(--ff-gold);
}

@media (max-width: 1020px) {
    .compact-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .compact-section-heading {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .compact-stats {
        grid-template-columns: 1fr;
    }
}
.avatar-frame {
    width: 124px;
    height: 124px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
    border: 6px solid #fff;
    box-shadow: 0 18px 48px rgba(11,31,51,.16);
    background: #f3f4f6;
    position: relative;
}

.avatar-frame .avatar-img,
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform-origin: center center;
    display: block;
}

.avatar-frame.initials,
.initials.avatar-frame {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ink);
    color: #fff;
    font-size: 42px;
    font-weight: 800;
}
/* =========================================================
   Profile Image Crop / Drag Preview - Fixed Version
========================================================= */

.profile-crop-preview {
    width: 180px !important;
    height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;
    min-width: 180px !important;
    min-height: 180px !important;

    border-radius: 50% !important;
    overflow: hidden !important;

    background: #f3f4f6 !important;
    border: 6px solid #ffffff !important;
    box-shadow: 0 18px 48px rgba(11,31,51,.14) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: relative !important;
    color: var(--ff-muted) !important;
    font-size: 12px !important;
    text-align: center !important;
}

/* Çok önemli: Preview içindeki image asla kutudan taşmasın */
.profile-crop-preview img,
.profile-crop-preview #profilePreviewImage {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;
    object-position: 50% 50%;
    transform-origin: center center !important;

    display: block;
    position: relative !important;
}

/* Placeholder */
.profile-crop-preview span {
    padding: 14px !important;
    line-height: 1.4 !important;
}

/* Drag davranışı */
.draggable-profile-preview {
    cursor: grab !important;
    user-select: none !important;
    touch-action: none !important;
}

.draggable-profile-preview.is-dragging {
    cursor: grabbing !important;
}

.draggable-profile-preview img {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

/* Profile image alanını daha düzgün hizala */
.profile-image-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}

.profile-preview-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.profile-preview-column label {
    width: 100% !important;
    text-align: center !important;
}

.profile-preview-column small {
    text-align: center !important;
    max-width: 220px !important;
}

.profile-zoom-column input[type="range"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Sticky action formun üstüne binmesin */
.sticky-actions {
    margin-top: 20px !important;
}

/* Mobile */
@media (max-width: 900px) {
    .profile-image-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-preview-column {
        align-items: flex-start !important;
    }

    .profile-preview-column label,
    .profile-preview-column small {
        text-align: left !important;
    }
}
/* =========================================================
   Profile Image Crop Editor - Required Final CSS
========================================================= */

.profile-image-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}

.profile-preview-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.profile-preview-column label {
    width: 100% !important;
    text-align: center !important;
}

.profile-preview-column small {
    text-align: center !important;
    max-width: 220px !important;
}

.profile-crop-preview {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px !important;
    min-height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;

    border-radius: 50% !important;
    overflow: hidden !important;

    background: #f3f4f6 !important;
    border: 6px solid #ffffff !important;
    box-shadow: 0 18px 48px rgba(11,31,51,.14) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    position: relative !important;
    color: var(--ff-muted, #667085) !important;
    font-size: 12px !important;
    text-align: center !important;
}

/* En kritik kısım: görsel dairenin dışına çıkamaz */
.profile-crop-preview img,
.profile-crop-preview #profilePreviewImage {
    width: 100% !important;
    height: 100% !important;

    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;
    object-position: 50% 50%;

    transform-origin: center center !important;

    display: block;
    position: relative !important;
}

.profile-crop-preview span {
    padding: 14px !important;
    line-height: 1.4 !important;
}

.draggable-profile-preview {
    cursor: grab !important;
    user-select: none !important;
    touch-action: none !important;
}

.draggable-profile-preview.is-dragging {
    cursor: grabbing !important;
}

.draggable-profile-preview img {
    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

.profile-zoom-column input[type="range"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 900px) {
    .profile-image-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-preview-column {
        align-items: flex-start !important;
    }

    .profile-preview-column label,
    .profile-preview-column small {
        text-align: left !important;
    }
}
.profile-crop-preview {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px !important;
    min-height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
}
/* =========================================================
   Profile Crop Editor - Drag Translate Version
========================================================= */

.profile-image-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 220px minmax(0, 1fr) !important;
    gap: 24px !important;
    align-items: start !important;
}

.profile-preview-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.profile-crop-preview {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px !important;
    min-height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;

    border-radius: 50% !important;
    overflow: hidden !important;
    position: relative !important;

    background: #f3f4f6 !important;
    border: 6px solid #ffffff !important;
    box-shadow: 0 18px 48px rgba(11,31,51,.14) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    cursor: grab !important;
    user-select: none !important;
    touch-action: none !important;
}

.profile-crop-preview.is-dragging {
    cursor: grabbing !important;
}

.profile-crop-preview img,
.profile-crop-preview #profilePreviewImage {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;

    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;

    object-fit: cover !important;
    object-position: center center !important;
    transform-origin: center center !important;

    pointer-events: none !important;
    user-select: none !important;
    -webkit-user-drag: none !important;
}

.profile-crop-preview span {
    padding: 14px !important;
    line-height: 1.4 !important;
    color: var(--ff-muted, #667085) !important;
    font-size: 12px !important;
    text-align: center !important;
    z-index: 2 !important;
}

.profile-zoom-column input[type="range"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

@media (max-width: 900px) {
    .profile-image-grid {
        grid-template-columns: 1fr !important;
    }

    .profile-preview-column {
        align-items: flex-start !important;
    }
}
/* =========================================================
   FaeFlux Cloud Login Background
========================================================= */

.auth-page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(255,255,255,.92), rgba(246,247,249,.88)),
        url("../img/faeflux-cloud-logo.png") center center / min(760px, 78vw) auto no-repeat;
}

.auth-page::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(200,164,93,.16), transparent 32%),
        radial-gradient(circle at 80% 70%, rgba(11,31,51,.12), transparent 34%);
    pointer-events: none;
}

.auth-card {
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(18px);
    border: 1px solid rgba(230,232,236,.88);
}

.auth-card .brand {
    display: block;
    width: 100%;
    min-height: 88px;
    margin-bottom: 10px;
    background: url("../img/faeflux-cloud-logo.png") center center / contain no-repeat;
    text-indent: -9999px;
    overflow: hidden;
}
.log-detail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
}
/* =========================================================
   Fixed Admin Sidebar
========================================================= */

.app-page {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(200, 164, 93, .10), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f6f7f9 100%);
}

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    background: rgba(255, 255, 255, .94);
    border-right: 1px solid var(--line, #e6e8ec);
    box-shadow: 18px 0 50px rgba(11, 31, 51, .06);
    z-index: 100;
}

.admin-sidebar-inner {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 22px 18px;
}

.admin-brand {
    padding: 6px 8px 22px;
    border-bottom: 1px solid var(--line, #e6e8ec);
}

.admin-brand a {
    display: grid;
    gap: 3px;
    color: var(--ink, #0b1f33);
    text-decoration: none;
}

.admin-brand-main {
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -.04em;
}

.admin-brand-sub {
    color: var(--muted, #667085);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.admin-user-card {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid var(--line, #e6e8ec);
    border-radius: 18px;
    background: #ffffff;
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: var(--ink, #0b1f33);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 18px;
    flex: 0 0 42px;
}

.admin-user-info {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.admin-user-info strong {
    color: var(--ink, #0b1f33);
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-info small {
    color: var(--muted, #667085);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-user-info span {
    width: max-content;
    margin-top: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: rgba(200, 164, 93, .12);
    color: var(--ink, #0b1f33);
    font-size: 11px;
    font-weight: 850;
}

.admin-nav {
    display: grid;
    gap: 6px;
    flex: 1;
}

.admin-nav a {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 11px 12px;
    border-radius: 13px;
    color: var(--ink, #0b1f33);
    text-decoration: none;
    font-size: 14px;
    font-weight: 850;
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: #ffffff;
    border-color: var(--line, #e6e8ec);
}

.admin-nav a.active {
    background: var(--ink, #0b1f33);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(11, 31, 51, .14);
}

.admin-sidebar-footer {
    padding-top: 16px;
    border-top: 1px solid var(--line, #e6e8ec);
}

.admin-sidebar-footer a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 13px;
    background: #ffffff;
    border: 1px solid var(--line, #e6e8ec);
    color: var(--ink, #0b1f33);
    text-decoration: none;
    font-weight: 850;
}

.content {
    margin-left: 280px;
    padding: 28px;
    max-width: calc(100vw - 280px);
}

/* Eski sidebar class'ları varsa çakışmayı engelle */
.sidebar {
    display: none !important;
}

@media (max-width: 900px) {
    .admin-sidebar {
        position: relative;
        width: 100%;
        inset: auto;
        border-right: 0;
        border-bottom: 1px solid var(--line, #e6e8ec);
    }

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

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

    .content {
        margin-left: 0;
        max-width: 100%;
        padding: 18px;
    }
}
/* =========================================================
   Admin Layout Final Fix
   Sidebar + content width correction
========================================================= */

:root {
    --admin-sidebar-width: 360px;
}

* {
    box-sizing: border-box;
}

body.app-page {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-sidebar {
    width: var(--admin-sidebar-width) !important;
}

.content {
    margin-left: var(--admin-sidebar-width) !important;
    width: calc(100vw - var(--admin-sidebar-width)) !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 34px 40px !important;
}

/* Sayfa header kartı tam genişlesin */
.content .page-header,
.content .premium-header,
.content .compact-page-header {
    width: 100% !important;
    max-width: none !important;
}

/* İstatistik kartları sıkışmasın */
.content .stats-grid,
.content .compact-stats {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(180px, 1fr)) !important;
    gap: 18px !important;
}

/* Form/list/card alanları tam genişlesin */
.content .form-section,
.content .table-card,
.content .compact-table-card,
.content .compact-list-section,
.content .compact-filter-section {
    width: 100% !important;
    max-width: none !important;
}

/* Tablolar yatayda sıkışırsa taşsın, sayfa bozulmasın */
.table-card,
.compact-table-card {
    overflow-x: auto !important;
}

.table-card table,
.compact-table-card table {
    min-width: 980px;
}

/* Dashboard cards bölümü */
.content .cards-grid,
.content .dashboard-grid {
    width: 100% !important;
    max-width: none !important;
}

/* Mobil görünüm */
@media (max-width: 900px) {
    :root {
        --admin-sidebar-width: 100%;
    }

    .admin-sidebar {
        position: relative !important;
        width: 100% !important;
    }

    .content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        padding: 18px !important;
    }

    .content .stats-grid,
    .content .compact-stats {
        grid-template-columns: 1fr !important;
    }

    .table-card table,
    .compact-table-card table {
        min-width: 760px;
    }
}
/* =========================================================
   FaeFlux Admin Layout Final
========================================================= */

:root {
    --ff-sidebar-width: 300px;
    --ff-ink: var(--ink, #0b1f33);
    --ff-muted: var(--muted, #667085);
    --ff-line: var(--line, #e6e8ec);
    --ff-gold: var(--gold, #c8a45d);
}

* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

body.app-page {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(200,164,93,.10), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #f7f8fa 100%);
}

/* Eski sidebar classlarını pasifleştir */
.sidebar,
.admin-sidebar {
    display: none !important;
}

.ff-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--ff-sidebar-width);
    background: rgba(255,255,255,.96);
    border-right: 1px solid var(--ff-line);
    box-shadow: 14px 0 40px rgba(11,31,51,.045);
    z-index: 1000;
}

.ff-sidebar-inner {
    height: 100%;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ff-brand {
    display: grid;
    gap: 4px;
    text-decoration: none;
    color: var(--ff-ink);
    padding: 2px 2px 18px;
    border-bottom: 1px solid var(--ff-line);
}

.ff-brand span {
    font-size: 22px;
    font-weight: 950;
    letter-spacing: -.04em;
    line-height: 1;
}

.ff-brand small {
    color: var(--ff-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ff-userbox {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid var(--ff-line);
    border-radius: 18px;
    background: #fff;
}

.ff-avatar {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    background: var(--ff-ink);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
    font-size: 18px;
}

.ff-user-meta {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.ff-user-meta strong {
    color: var(--ff-ink);
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-user-meta small {
    color: var(--ff-muted);
    font-size: 12px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ff-user-meta em {
    width: max-content;
    font-style: normal;
    font-size: 11px;
    font-weight: 850;
    color: var(--ff-ink);
    background: rgba(200,164,93,.14);
    border-radius: 999px;
    padding: 4px 8px;
}

.ff-menu {
    display: grid;
    gap: 5px;
    flex: 1;
    align-content: start;
}

.ff-menu a {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--ff-ink);
    font-size: 14px;
    font-weight: 850;
    border: 1px solid transparent;
}

.ff-menu a:hover {
    background: #fff;
    border-color: var(--ff-line);
}

.ff-menu a.active {
    background: var(--ff-ink);
    color: #fff;
    box-shadow: 0 10px 24px rgba(11,31,51,.14);
}

.ff-logout {
    border-top: 1px solid var(--ff-line);
    padding-top: 14px;
}

.ff-logout a {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border-radius: 13px;
    background: #fff;
    border: 1px solid var(--ff-line);
    color: var(--ff-ink);
    text-decoration: none;
    font-weight: 900;
}

/* Ana içerik */
.content {
    margin-left: var(--ff-sidebar-width) !important;
    width: calc(100vw - var(--ff-sidebar-width)) !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 28px 34px !important;
    overflow-x: hidden;
}

/* Sayfa kartları tam genişlesin */
.content .page-header,
.content .premium-header,
.content .compact-page-header,
.content .form-section,
.content .table-card,
.content .compact-table-card,
.content .compact-list-section,
.content .compact-filter-section {
    width: 100% !important;
    max-width: none !important;
}

/* Header sıkışmasın */
.page-header,
.premium-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

/* Stat kartları */
.stats-grid,
.compact-stats {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(170px, 1fr)) !important;
    gap: 16px !important;
}

/* Tablolar */
.table-card,
.compact-table-card {
    overflow-x: auto !important;
}

.table-card table,
.compact-table-card table {
    width: 100% !important;
    min-width: 1050px;
}

/* Çok geniş tablolarda sayfa bozulmasın */
.content table th,
.content table td {
    white-space: nowrap;
}

.content table td:first-child,
.content table th:first-child {
    white-space: normal;
}

/* Mobil */
@media (max-width: 980px) {
    .ff-sidebar {
        position: relative;
        width: 100%;
        height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--ff-line);
    }

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

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

    .content {
        margin-left: 0 !important;
        width: 100% !important;
        padding: 18px !important;
    }

    .stats-grid,
    .compact-stats {
        grid-template-columns: 1fr !important;
    }

    .page-header,
    .premium-header {
        display: grid;
    }

    .table-card table,
    .compact-table-card table {
        min-width: 850px;
    }
}
/* =========================================================
   Tenant / Company Branding Form
========================================================= */

.tenant-form .form-section {
    overflow: hidden;
}

.tenant-form .form-grid {
    align-items: start;
}

.tenant-form small {
    display: block;
    margin-top: 7px;
    color: var(--muted, #667085);
    font-size: 12px;
    line-height: 1.35;
}

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

.color-inline {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.color-inline input[type="color"] {
    width: 64px;
    height: 48px;
    min-height: 48px;
    padding: 4px;
    border-radius: 14px;
    cursor: pointer;
}

.color-inline input[disabled] {
    background: #f8fafc;
    color: var(--muted, #667085);
}

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

.branding-preview-card {
    border: 1px solid var(--line, #e6e8ec);
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
}

.branding-preview-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--ink, #0b1f33);
    font-size: 14px;
    font-weight: 900;
}

.branding-image-preview {
    height: 170px;
    border-radius: 16px;
    border: 1px solid var(--line, #e6e8ec);
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--muted, #667085);
    font-weight: 800;
    text-align: center;
    padding: 14px;
}

.branding-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branding-image-preview.cover img {
    object-fit: cover;
}

.tenant-form input[type="file"] {
    padding: 13px;
    background: #ffffff;
}

.tenant-form input[type="file"]::file-selector-button {
    border: 1px solid var(--line, #e6e8ec);
    background: #f8fafc;
    color: var(--ink, #0b1f33);
    border-radius: 10px;
    padding: 9px 12px;
    margin-right: 12px;
    font-weight: 850;
    cursor: pointer;
}

.tenant-form input[type="file"]::file-selector-button:hover {
    background: #ffffff;
}

@media (max-width: 1000px) {
    .social-grid,
    .branding-preview-grid {
        grid-template-columns: 1fr;
    }
}
/* =========================================================
   Tenant / Company Branding Form
========================================================= */

.tenant-form .form-section {
    overflow: hidden;
}

.tenant-form .form-grid {
    align-items: start;
}

.tenant-form small {
    display: block;
    margin-top: 7px;
    color: var(--muted, #667085);
    font-size: 12px;
    line-height: 1.35;
}

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

.color-inline {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 10px;
    align-items: center;
}

.color-inline input[type="color"] {
    width: 64px;
    height: 48px;
    min-height: 48px;
    padding: 4px;
    border-radius: 14px;
    cursor: pointer;
}

.color-inline input[disabled] {
    background: #f8fafc;
    color: var(--muted, #667085);
}

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

.branding-preview-card {
    border: 1px solid var(--line, #e6e8ec);
    border-radius: 18px;
    padding: 16px;
    background: #ffffff;
}

.branding-preview-card strong {
    display: block;
    margin-bottom: 12px;
    color: var(--ink, #0b1f33);
    font-size: 14px;
    font-weight: 900;
}

.branding-image-preview {
    height: 170px;
    border-radius: 16px;
    border: 1px solid var(--line, #e6e8ec);
    background:
        linear-gradient(45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(-45deg, #f8fafc 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8fafc 75%),
        linear-gradient(-45deg, transparent 75%, #f8fafc 75%);
    background-size: 24px 24px;
    background-position: 0 0, 0 12px, 12px -12px, -12px 0px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--muted, #667085);
    font-weight: 800;
    text-align: center;
    padding: 14px;
}

.branding-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.branding-image-preview.cover img {
    object-fit: cover;
}

.powered-by-preview {
    min-height: 74px;
    border-radius: 16px;
    border: 1px solid var(--line, #e6e8ec);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    color: var(--muted, #667085);
    font-size: 12px;
    font-weight: 800;
}

.powered-by-preview img {
    max-width: 180px;
    max-height: 44px;
    object-fit: contain;
}

.tenant-form input[type="file"] {
    padding: 13px;
    background: #ffffff;
}

.tenant-form input[type="file"]::file-selector-button {
    border: 1px solid var(--line, #e6e8ec);
    background: #f8fafc;
    color: var(--ink, #0b1f33);
    border-radius: 10px;
    padding: 9px 12px;
    margin-right: 12px;
    font-weight: 850;
    cursor: pointer;
}

.tenant-form input[type="file"]::file-selector-button:hover {
    background: #ffffff;
}

@media (max-width: 1000px) {
    .social-grid,
    .branding-preview-grid {
        grid-template-columns: 1fr;
    }
}