*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    font-family: Inter, Segoe UI, Arial, sans-serif;
    color: #1d2025;
    background: #f5f6f8;
}

/* =====================================================
   LOGIN EKRANI
   ===================================================== */

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;

    /* ARKA PLAN - SADECE BURADA */
    background: url("eay-login-bg.webp") center center / cover no-repeat;

    font-family: Inter, Arial, sans-serif;
}

.login-shell {
    position: relative;
    z-index: 2;
    width: min(420px, calc(100% - 40px));
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* =====================================================
   LOGO
   ===================================================== */

/* HTML'de brand-mark kullanılıyorsa */
.login-shell .brand-mark {
    width: 110px;
    height: 110px;
    margin: 0 auto 18px;
    border-radius: 0;
    background: transparent url("eay-logo.png") center / contain no-repeat;
    box-shadow: none;
    font-size: 0;
    color: transparent;
    display: block;
    overflow: visible;
}

/* Eski pseudo logo kesinlikle kullanılmasın */
.login-shell .brand-mark::before,
.login-shell .brand-mark::after {
    content: none;
}

/* HTML'de brand-logo kullanılıyorsa */
.login-shell .brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 18px;
}

.login-shell .brand-logo img {
    width: 280px;
    height: auto;
    max-width: 90vw;
    object-fit: contain;
    display: block;
}

/* Marka yazısı */
.login-shell .brand {
    margin: 0 0 5px;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: 2px;
    color: #111820;
    text-align: center;
}

.login-shell .brand span {
    color: #d71920;
}

.login-shell .subtitle {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

/* =====================================================
   LOGIN KARTI
   ===================================================== */

.login-shell .login-card {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.18);
    text-align: left;
}

.login-shell .login-card label {
    display: block;
    margin: 0 0 8px;
    color: #222831;
    font-size: 13px;
    font-weight: 700;
}

.login-shell .login-card input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #d9dde3;
    border-radius: 10px;
    padding: 0 14px;
    margin: 0 0 18px;
    background: #ffffff;
    color: #15191f;
    font-size: 14px;
    outline: none;
    transition: 0.2s ease;
}

.login-shell .login-card input:focus {
    border-color: #d71920;
    box-shadow: 0 0 0 3px rgba(215, 25, 32, 0.10);
}

.login-shell .btn-primary {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: #d71920;
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.2s ease;
    margin-top: 2px;
}

.login-shell .btn-primary:hover {
    background: #b91219;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(215, 25, 32, 0.25);
}

.login-shell .btn-primary:active {
    transform: translateY(0);
}

.login-shell .error {
    border-radius: 9px;
    margin: 0 0 16px;
    padding: 11px 12px;
    background: #fff1f2;
    color: #b42318;
    border: 1px solid #fecdd3;
    font-size: 13px;
}

.login-shell .notice {
    margin-top: 14px;
    background: #f2f4f7;
    color: #333;
    padding: 10px;
    border-radius: 9px;
    font-size: 13px;
}

.login-shell .footer-note {
    display: none;
}

/* =====================================================
   UYGULAMA / DASHBOARD
   ===================================================== */

.app-page {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 245px;
    background: #17191d;
    color: #fff;
    padding: 24px 15px;
    display: flex;
    flex-direction: column;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    font-weight: 900;
    font-size: 20px;
    margin: 3px 8px 35px;
}

.side-brand small {
    display: block;
    color: #aaa;
    font-size: 9px;
    letter-spacing: 1.5px;
}

.mini-mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: #c91422;
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 900;
    box-shadow: 0 12px 30px #0002;
}

.sidebar nav {
    display: grid;
    gap: 6px;
}

.sidebar nav a,
.logout {
    color: #c9cbd0;
    text-decoration: none;
    padding: 13px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.sidebar nav a:hover,
.sidebar nav .active {
    background: #c91422;
    color: #fff;
}

.logout {
    margin-top: auto;
    background: #24272c;
    text-align: center;
}

.main {
    flex: 1;
    padding: 32px 38px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.eyebrow {
    font-size: 11px;
    font-weight: 800;
    color: #c91422;
    letter-spacing: 1.8px;
}

.topbar h1 {
    margin: 4px 0;
    font-size: 30px;
}

.user-chip {
    background: #fff;
    border: 1px solid #e4e5e7;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.stat,
.panel {
    background: #fff;
    border: 1px solid #e7e8ea;
    border-radius: 17px;
    box-shadow: 0 7px 24px #00000008;
}

.stat {
    padding: 21px;
}

.stat span,
.stat small {
    display: block;
    color: #74777d;
    font-size: 12px;
}

.stat strong {
    display: block;
    font-size: 26px;
    margin: 9px 0 4px;
}

.panel {
    padding: 22px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-head h2 {
    margin: 0;
    font-size: 19px;
}

.panel-head p {
    margin: 5px 0 18px;
    color: #777;
    font-size: 13px;
}

.btn-light {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 9px;
    padding: 10px 14px;
    font-weight: 700;
}

.table-wrap {
    overflow: auto;
}

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

th,
td {
    text-align: left;
    padding: 14px 10px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

th {
    color: #777;
    font-size: 11px;
    text-transform: uppercase;
}

.badge {
    display: inline-block;
    background: #fff2f2;
    color: #b30e18;
    padding: 6px 9px;
    border-radius: 999px;
    font-weight: 700;
}

.empty {
    text-align: center;
    color: #888;
    padding: 35px;
}

/* =====================================================
   PERSONEL FORMU
   ===================================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px 24px;
    margin-top: 24px;
}

.form-grid > div {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-grid label {
    font-size: 13px;
    font-weight: 600;
    color: #242424;
}

.form-grid label::first-letter {
    color: #222;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #dedede;
    border-radius: 9px;
    background: #fff;
    color: #222;
    font-size: 14px;
    outline: none;
    transition: all .2s ease;
}

.form-grid textarea {
    padding-top: 12px;
    padding-bottom: 12px;
    min-height: 100px;
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    border-color: #d71920;
    box-shadow: 0 0 0 3px rgba(215, 25, 32, .08);
}

.form-grid input::placeholder {
    color: #aaa;
}

.panel form > div:last-child {
    border-top: 1px solid #eeeeee;
    margin-top: 30px !important;
    padding-top: 22px;
    display: flex !important;
    justify-content: flex-end;
    align-items: center;
}

.panel form .btn-light {
    min-width: 110px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-sizing: border-box;
}

.panel form .btn-primary {
    min-width: 190px;
    height: 44px;
}

.success,
.error {
    margin-top: 20px;
    padding: 13px 15px;
    border-radius: 9px;
    font-size: 13px;
}

/* =====================================================
   KULLANICI MENÜSÜ
   ===================================================== */

.user-menu {
    position: relative;
}

.user-button {
    border: 0;
    background: #f1f1f1;
    border-radius: 14px;
    padding: 9px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
    font-family: inherit;
}

.user-button .user-name {
    font-weight: 700;
    color: #111;
}

.user-button .user-role {
    font-size: 12px;
    color: #777;
    margin-top: 3px;
}

.user-arrow {
    font-size: 18px;
    color: #555;
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    width: 190px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 8px;
    box-shadow: 0 12px 30px rgba(0,0,0,.15);
    z-index: 9999;
}

.user-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 14px;
    border-radius: 9px;
    color: #222 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
}

.dropdown-item:hover {
    background: #f5f5f5;
}

.dropdown-line {
    height: 1px;
    background: #eee;
    margin: 5px 8px;
}

.logout-item {
    color: #d71920 !important;
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

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

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

@media (max-width: 900px) {
    .sidebar {
        width: 190px;
    }

    .main {
        padding: 24px;
    }
}

@media (max-width: 650px) {
    .app-page {
        display: block;
    }

    .sidebar {
        width: 100%;
        padding: 12px;
    }

    .sidebar nav {
        display: flex;
        overflow: auto;
    }

    .sidebar nav a {
        white-space: nowrap;
    }

    .logout {
        display: none;
    }

    .main {
        padding: 18px;
    }

    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .topbar h1 {
        font-size: 24px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .panel form > div:last-child {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .panel form .btn-light,
    .panel form .btn-primary {
        width: 100%;
    }

    /* Telefon login arka planı */
    .login-page {
        min-height: 100vh;
        min-height: 100dvh;
        background-image: url("eay-login-bg.webp");
        background-position: center center;
        background-size: cover;
        background-repeat: no-repeat;
    }

    .login-shell {
        width: calc(100% - 28px);
        min-height: 100vh;
        min-height: 100dvh;
        padding: 25px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    .login-shell .brand-mark {
        width: 90px;
        height: 90px;
        margin-bottom: 18px;
    }

    .login-shell .brand-logo img {
        width: 230px;
        height: auto;
        max-width: 90vw;
    }

    .login-shell .brand {
        font-size: 27px;
    }

    .login-shell .login-card {
        padding: 22px;
        border-radius: 17px;
    }
}

@media (min-width: 651px) {
    .login-shell .brand-logo img {
        width: 280px;
        height: auto;
        max-width: 90vw;
    }
}
/* Beni hatırla checkbox */
.remember-me {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin: 8px 0 0 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
}

.remember-me input[type="checkbox"] {
    width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    flex: 0 0 16px;
    accent-color: #d71920;
}

.remember-me span {
    line-height: 16px;
}
