/* ================================================
   Antil Dijital Admin Panel — Ana Stil Dosyası
   ================================================ */

/* --- Değişkenler --- */
:root {
    --cyan:       #0EA5E9;
    --cyan-dark:  #0284C7;
    --cyan-light: #E0F2FE;
    --navy:       #0F172A;
    --navy-mid:   #1E293B;
    --navy-soft:  #334155;
    --slate:      #64748B;
    --border:     #E2E8F0;
    --bg:         #F8FAFC;
    --white:      #FFFFFF;
    --error:      #EF4444;
    --error-bg:   #FEF2F2;
    --success:    #10B981;
    --radius-sm:  6px;
    --radius-md:  12px;
    --radius-lg:  20px;
    --shadow-sm:  0 1px 3px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
    --shadow-md:  0 4px 16px rgba(15,23,42,.08), 0 2px 6px rgba(15,23,42,.05);
    --shadow-lg:  0 16px 48px rgba(15,23,42,.12), 0 4px 12px rgba(15,23,42,.06);
    --font:       'Inter', system-ui, -apple-system, sans-serif;
    --transition: 180ms cubic-bezier(.4,0,.2,1);
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    color: var(--navy);
    background: var(--bg);
    min-height: 100vh;
    line-height: 1.5;
}

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

/* ================================================
   GİRİŞ SAYFASI (login-page)
   ================================================ */

body.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0F172A 0%, #1E3A5F 50%, #0F172A 100%);
    position: relative;
    overflow: hidden;
}

/* Arka plan dekoratif şekiller */
.login-bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.login-bg-shape {
    position: absolute;
    border-radius: 50%;
    opacity: .06;
    background: var(--cyan);
}
.shape-1 { width: 600px; height: 600px; top: -200px; right: -150px; }
.shape-2 { width: 400px; height: 400px; bottom: -150px; left: -100px; }

.login-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    width: 100%;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px 36px;
    box-shadow: var(--shadow-lg);
}

/* Marka */
.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}
.brand-text { display: flex; flex-direction: column; }
.brand-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.3px;
}
.brand-sub {
    font-size: 12px;
    color: var(--slate);
    font-weight: 400;
}

/* Başlık */
.login-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.4px;
    margin-bottom: 6px;
}
.login-desc {
    font-size: 14px;
    color: var(--slate);
    margin-bottom: 28px;
}

/* Hata / Başarı Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
}
.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border: 1px solid #FECACA;
}

/* Form */
.login-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-soft);
    letter-spacing: .1px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 14px;
    color: var(--slate);
    pointer-events: none;
    flex-shrink: 0;
}

.input-wrapper input {
    width: 100%;
    padding: 11px 44px 11px 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--navy);
    background: var(--white);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.input-wrapper input::placeholder { color: #CBD5E1; }

.input-wrapper input:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

.toggle-pass {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--slate);
    padding: 4px;
    display: flex;
    align-items: center;
    transition: color var(--transition);
}
.toggle-pass:hover { color: var(--navy); }

/* Giriş Butonu */
.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: var(--cyan);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    margin-top: 4px;
    letter-spacing: .1px;
}
.btn-login:hover {
    background: var(--cyan-dark);
    box-shadow: 0 4px 12px rgba(14,165,233,.35);
}
.btn-login:active { transform: translateY(1px); }

/* Footer */
.login-footer {
    margin-top: 20px;
    font-size: 12px;
    color: rgba(255,255,255,.35);
    text-align: center;
}

/* ================================================
   DASHBOARD SAYFASI
   ================================================ */

body.dashboard-page {
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Üst Bar */
.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 60px;
    background: var(--navy);
    box-shadow: 0 1px 0 rgba(255,255,255,.06);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--white);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: -.2px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.75);
    font-size: 13.5px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--cyan);
    color: white;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.55);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid rgba(255,255,255,.1);
    transition: all var(--transition);
}
.btn-logout:hover {
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.9);
}

/* Ana içerik */
.dashboard-main {
    flex: 1;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    padding: 56px 24px 40px;
}

/* Hero başlık */
.dashboard-hero {
    margin-bottom: 44px;
}
.dashboard-hero h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.6px;
    margin-bottom: 6px;
}
.dashboard-hero p {
    font-size: 15px;
    color: var(--slate);
}

/* Modül grid */
.modules-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Modül kartı */
.module-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px 28px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--icon-color, var(--cyan));
    opacity: 0;
    transition: opacity var(--transition);
}

.module-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}
.module-card:hover::before { opacity: 1; }

/* Modül ikonu */
.module-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-sm);
    background: var(--icon-bg);
    color: var(--icon-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}
.module-card:hover .module-icon { transform: scale(1.05); }

/* Modül bilgi */
.module-info { flex: 1; }
.module-info h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -.2px;
    margin-bottom: 4px;
}
.module-info p {
    font-size: 13.5px;
    color: var(--slate);
}

/* Ok ikonu */
.module-arrow {
    color: #CBD5E1;
    transition: color var(--transition), transform var(--transition);
    flex-shrink: 0;
}
.module-card:hover .module-arrow {
    color: var(--slate);
    transform: translateX(4px);
}

/* Footer */
.dashboard-footer {
    display: flex;
    justify-content: space-between;
    padding: 16px 32px;
    font-size: 12px;
    color: #CBD5E1;
    border-top: 1px solid var(--border);
    background: var(--white);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 600px) {
    .login-card { padding: 28px 22px; }
    .topbar { padding: 0 16px; }
    .dashboard-main { padding: 32px 16px 24px; }
    .module-card { padding: 18px 16px; gap: 14px; }
    .module-icon { width: 50px; height: 50px; }
    .dashboard-footer { flex-direction: column; gap: 4px; text-align: center; }
}

/* ================================================
   KULLANICI MENÜSÜ (DROPDOWN)
   ================================================ */
.user-menu { position: relative; }

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,.85);
    font-size: 13.5px;
    background: none;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--radius-sm);
    padding: 6px 12px 6px 8px;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--transition);
}
.topbar-user:hover { background: rgba(255,255,255,.07); }

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: all var(--transition);
    z-index: 200;
}
.user-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 500;
    color: var(--navy-soft);
    transition: background var(--transition);
}
.user-dropdown a:hover { background: var(--bg); }
.user-dropdown a.active { color: var(--cyan); background: var(--cyan-light); }
.user-dropdown a svg { color: var(--slate); flex-shrink: 0; }
.user-dropdown a.active svg { color: var(--cyan); }

/* ================================================
   PROFİL SAYFASI
   ================================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--slate);
    margin-bottom: 20px;
    transition: color var(--transition);
}
.back-link:hover { color: var(--cyan); }

.page-header { margin-bottom: 28px; }
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -.5px;
    margin-bottom: 4px;
}
.page-header p { font-size: 14px; color: var(--slate); }

/* Başarı alert (yeşil) */
.alert-success {
    background: #ECFDF5;
    color: #059669;
    border: 1px solid #A7F3D0;
}

/* Kart */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}
.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}
.card-head h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: -.2px;
}
.card-badge {
    font-size: 12px;
    font-weight: 500;
    color: var(--slate);
    background: var(--bg);
    padding: 3px 10px;
    border-radius: 20px;
}
.card-body { padding: 24px; }

/* Form satırı (iki sütun) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
.card-body .form-group { margin-bottom: 16px; }
.card-body .form-row .form-group { margin-bottom: 0; }
.card-body .form-group:last-of-type { margin-bottom: 16px; }

.card-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-soft);
    margin-bottom: 6px;
}
.card-body input,
.card-body select {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font);
    color: var(--navy);
    background: var(--white);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.card-body input:focus,
.card-body select:focus {
    border-color: var(--cyan);
    box-shadow: 0 0 0 3px rgba(14,165,233,.12);
}

/* Birincil buton */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--cyan);
    color: var(--white);
    border: none;
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition);
}
.btn-primary:hover {
    background: var(--cyan-dark);
    box-shadow: 0 4px 12px rgba(14,165,233,.3);
}

/* Kullanıcı tablosu */
.user-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}
.user-table th {
    text-align: left;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--slate);
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
}
.user-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    color: var(--navy);
}
.user-table tr:last-child td { border-bottom: none; }
.user-table .muted { color: var(--slate); font-size: 12.5px; }

.tag-you {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    background: var(--cyan-light);
    color: var(--cyan-dark);
    padding: 1px 7px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
}

.role-badge {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.role-admin { background: #EDE9FE; color: #7C3AED; }
.role-editor { background: #E0F2FE; color: #0284C7; }

.btn-icon-del {
    background: none;
    border: none;
    cursor: pointer;
    color: #CBD5E1;
    padding: 6px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    transition: all var(--transition);
}
.btn-icon-del:hover { color: var(--error); background: var(--error-bg); }

@media (max-width: 600px) {
    .form-row { grid-template-columns: 1fr; }
    .user-table { font-size: 12.5px; }
    .user-table th:nth-child(4), .user-table td:nth-child(4) { display: none; }
}
