/* ============================================================
   G2 Password Manager — Stil dosyası
   Koyu kenar çubuğu + açık içerik alanı
   ============================================================ */

:root {
    --g2-sidebar-bg:      #0f172a;
    --g2-sidebar-bg-2:    #1e293b;
    --g2-sidebar-fg:      #e2e8f0;
    --g2-sidebar-muted:   #94a3b8;
    --g2-sidebar-active:  #10b981;
    --g2-sidebar-hover:   rgba(255,255,255,.06);
    --g2-content-bg:      #f6f7f9;
    --g2-border:          #e5e7eb;
    --g2-sidebar-w:       260px;
    --g2-radius:          .5rem;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background: var(--g2-content-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #1f2937;
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.g2-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--g2-sidebar-w);
    background: var(--g2-sidebar-bg);
    color: var(--g2-sidebar-fg);
    display: flex;
    flex-direction: column;
    z-index: 1030;
    transition: transform .25s ease;
    box-shadow: 2px 0 12px rgba(0,0,0,.08);
}

.g2-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.g2-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--g2-sidebar-active), #059669);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -.02em;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16, 185, 129, .3);
}
.g2-brand-title {
    font-weight: 600;
    font-size: .95rem;
    line-height: 1.2;
}
.g2-brand-sub {
    font-size: .75rem;
    color: var(--g2-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

.g2-nav {
    list-style: none;
    margin: 0;
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}
.g2-nav li { margin: 0; }
.g2-nav a {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem 1rem;
    color: var(--g2-sidebar-fg);
    text-decoration: none;
    font-size: .9rem;
    border-left: 3px solid transparent;
    transition: background .15s, border-color .15s;
}
.g2-nav a i {
    color: var(--g2-sidebar-muted);
    width: 18px;
    text-align: center;
    font-size: 1rem;
    transition: color .15s;
}
.g2-nav a:hover {
    background: var(--g2-sidebar-hover);
}
.g2-nav a.active {
    background: var(--g2-sidebar-hover);
    border-left-color: var(--g2-sidebar-active);
    color: #fff;
}
.g2-nav a.active i {
    color: var(--g2-sidebar-active);
}

.g2-sidebar-foot {
    padding: .75rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.g2-user {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .5rem;
    border-radius: var(--g2-radius);
    background: rgba(255,255,255,.03);
}
.g2-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--g2-sidebar-bg-2);
    color: var(--g2-sidebar-active);
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.g2-user-info { min-width: 0; flex: 1; }
.g2-user-name {
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.g2-user-rol {
    font-size: .7rem;
    color: var(--g2-sidebar-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.g2-logout {
    display: block;
    margin-top: .5rem;
    padding: .5rem .75rem;
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
    text-decoration: none;
    border-radius: var(--g2-radius);
    font-size: .85rem;
    text-align: center;
    transition: background .15s;
}
.g2-logout:hover {
    background: rgba(239, 68, 68, .2);
    color: #fff;
}

/* Mobile hamburger toggle */
.g2-sidebar-toggle {
    position: fixed;
    top: .75rem;
    left: .75rem;
    z-index: 1040;
    width: 40px;
    height: 40px;
    border-radius: var(--g2-radius);
    background: var(--g2-sidebar-bg);
    color: #fff;
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
    font-size: 1.3rem;
    line-height: 1;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.g2-main {
    margin-left: var(--g2-sidebar-w);
    min-height: 100vh;
}

/* Mobile (< 992px) */
@media (max-width: 991.98px) {
    .g2-sidebar {
        transform: translateX(-100%);
    }
    .g2-sidebar.open {
        transform: translateX(0);
    }
    .g2-main {
        margin-left: 0;
        padding-top: 3.5rem;
    }
}

/* ============================================================
   AUTH (LOGIN / 2FA / SETUP)
   ============================================================ */
.g2-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(16, 185, 129, .08), transparent 50%),
        radial-gradient(circle at 80% 100%, rgba(59, 130, 246, .06), transparent 50%),
        var(--g2-content-bg);
}
.g2-auth-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow:
        0 1px 3px rgba(0,0,0,.05),
        0 10px 40px rgba(0,0,0,.08);
}
.g2-auth-brand {
    text-align: center;
    margin-bottom: 1.75rem;
}
.g2-auth-brand .g2-brand-mark {
    width: 64px;
    height: 64px;
    font-size: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1rem;
}
.g2-auth-brand h1 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 .25rem;
    color: #0f172a;
}
.g2-auth-brand p {
    color: #64748b;
    font-size: .85rem;
    margin: 0;
}
.g2-auth-foot {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--g2-border);
    color: #94a3b8;
    font-size: .8rem;
}

/* ============================================================
   MÜŞTERİ KARTLARI
   ============================================================ */
.g2-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border: 1px solid var(--g2-border);
    border-radius: var(--g2-radius);
    padding: 1rem;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.g2-card:hover {
    transform: translateY(-2px);
    border-color: #10b981;
    box-shadow: 0 6px 16px rgba(16, 185, 129, .12);
    color: inherit;
}
.g2-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}
.g2-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--g2-radius);
    background: rgba(16, 185, 129, .1);
    color: #10b981;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.g2-card-meta {
    font-size: .75rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: .2rem .55rem;
    border-radius: 999px;
}
.g2-card-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: .25rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.g2-card-desc {
    font-size: .85rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: .75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.g2-card-foot {
    margin-top: auto;
    padding-top: .5rem;
    border-top: 1px solid #f1f5f9;
    font-size: .75rem;
}

/* ============================================================
   SAYFA LİSTESİ
   ============================================================ */
.g2-list .g2-list-item {
    border-left: 3px solid transparent;
    transition: border-color .15s, background .15s;
}
.g2-list .g2-list-item:hover {
    border-left-color: var(--g2-sidebar-active);
}
.g2-list-title {
    font-weight: 600;
    font-size: 1rem;
    color: #0f172a;
}
.g2-list-sub {
    margin-top: .15rem;
}

/* ============================================================
   EDİTÖR
   ============================================================ */
.g2-editor {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .9rem;
    line-height: 1.55;
    background: #fff;
    border: 1px solid var(--g2-border);
    border-radius: var(--g2-radius);
    padding: 1rem;
    min-height: 60vh;
    resize: vertical;
    tab-size: 4;
}
.g2-editor:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
    outline: none;
}
.g2-editor-readonly {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: .85rem;
    line-height: 1.55;
    background: #f8fafc;
    border: 1px solid var(--g2-border);
    border-radius: var(--g2-radius);
    padding: 1rem;
    max-height: 60vh;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
}

/* ============================================================
   2FA / TOTP
   ============================================================ */
.g2-totp-input {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1.5rem;
    letter-spacing: .15em;
    text-align: center;
    font-weight: 600;
}
.g2-backup-codes {
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 1rem;
    line-height: 1.8;
    background: #0f172a;
    color: #10b981;
    padding: 1rem 1.25rem;
    border-radius: var(--g2-radius);
    margin-bottom: 1rem;
    overflow-x: auto;
    user-select: all;
}

/* ============================================================
   UTILITY
   ============================================================ */
.min-w-0 { min-width: 0; }

.breadcrumb {
    margin-bottom: 1rem;
    background: transparent;
    padding: 0;
}
.breadcrumb a {
    color: #64748b;
    text-decoration: none;
}
.breadcrumb a:hover {
    color: #10b981;
}

/* Bootstrap override: primary butona Grikare yeşili */
.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    box-shadow: 0 2px 6px rgba(16, 185, 129, .25);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: 0 4px 10px rgba(16, 185, 129, .35);
}
.btn-primary:active, .btn-primary:disabled {
    background: #047857 !important;
}

/* Form focus highlight */
.form-control:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 .2rem rgba(16, 185, 129, .15);
}

/* ============================================================
   HİZMET KARTLARI
   ============================================================ */
.g2-hizmet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 1rem;
}
.g2-hizmet {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--g2-border);
    border-radius: var(--g2-radius);
    padding: 1rem;
    transition: transform .15s, border-color .15s, box-shadow .15s;
}
.g2-hizmet:hover {
    transform: translateY(-2px);
    border-color: #10b981;
    box-shadow: 0 6px 16px rgba(16, 185, 129, .12);
}
.g2-hizmet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .65rem;
}
.g2-hizmet-tip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .65rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
}
.g2-hizmet-tip i { font-size: .85rem; }
.g2-hizmet-baslik {
    font-weight: 600;
    font-size: 1.05rem;
    color: #0f172a;
    margin-bottom: .25rem;
    word-break: break-word;
}
.g2-hizmet-aciklama {
    font-size: .85rem;
    color: #64748b;
    line-height: 1.4;
    margin-bottom: .5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.g2-hizmet-tarihler {
    margin-bottom: .65rem;
}
.g2-hizmet-durum {
    margin-bottom: .75rem;
}
.g2-hizmet-durum .badge {
    font-size: .8rem;
    padding: .4rem .7rem;
}
.g2-hizmet-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding-top: .65rem;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
}

/* Yaklaşan bitişler widget */
.g2-yaklasan {
    background: #fff;
    border: 1px solid var(--g2-border);
    border-left: 4px solid #f59e0b;
    border-radius: var(--g2-radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}
.g2-yaklasan-baslik {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .65rem;
}
.g2-yaklasan-baslik h5 { margin: 0; font-size: 1rem; }
.g2-yaklasan-liste {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}
.g2-yaklasan-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .35rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: .85rem;
}
.g2-yaklasan-item:last-child { border-bottom: none; }
.g2-yaklasan-item a {
    color: #0f172a;
    text-decoration: none;
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.g2-yaklasan-item a:hover { color: #10b981; }

/* Yazdırma: sidebar gizle */
@media print {
    .g2-sidebar, .g2-sidebar-toggle, .btn, .modal { display: none !important; }
    .g2-main { margin-left: 0 !important; padding: 0 !important; }
    .g2-backup-codes {
        background: #fff !important;
        color: #000 !important;
        border: 1px solid #000;
    }
}
