/* ==========================================================================
   TEKGIDA-İŞ LİNK - Kurumsal Light Theme (Açık Tema)
   ========================================================================== */

:root {
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    
    /* TEKGIDA-İŞ Resmi Renkleri: Yeşil & Sarı */
    --tekgida-green: #008237;
    --tekgida-yellow: #feca35;
    
    /* Açık Tema Renk Paleti (Clean Light) */
    --bg-page: #f8fafc;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --bg-card-border: #e2e8f0;
    --bg-input: #ffffff;
    --bg-input-border: #cbd5e1;
    
    /* Primary: #008237 (Yeşil), Accent: #feca35 (Sarı) */
    --primary: #008237;
    --primary-hover: #006b2d;
    --primary-light: rgba(0, 130, 55, 0.08);
    
    --accent: #feca35;
    --accent-dark: #d4a017;
    --accent-light: rgba(254, 202, 53, 0.15);
    --accent-gradient: linear-gradient(135deg, #008237 0%, #feca35 100%);
    --card-gradient: #ffffff;
    
    --success: #008237;
    --success-light: rgba(0, 130, 55, 0.1);
    --warning: #feca35;
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-dim: #94a3b8;
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -2px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 20px rgba(0, 130, 55, 0.25);
    
    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font-family);
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 130, 55, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(254, 202, 53, 0.07) 0px, transparent 50%);
    background-attachment: fixed;
}

/* Tipografi & Temel */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--primary-hover);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* Navbar */
.navbar {
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    background: #ffffff;
    border-bottom: 2px solid var(--accent);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.brand-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.brand-badge {
    display: flex;
    flex-direction: column;
}
.brand-title {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--primary);
    line-height: 1.2;
}
.brand-sub {
    font-size: 0.72rem;
    font-weight: 800;
    color: #b45309;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
    list-style: none;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 0.5rem 0.95rem;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}
.nav-link:hover {
    color: var(--primary);
    background: #f1f5f9;
}
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
    border-bottom: 2px solid var(--primary);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.4rem 0.95rem;
    background: #f8fafc;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-main);
}

/* Container */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem 1.5rem;
    flex: 1;
}

/* Stat Kartları Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
}
.stat-card:hover::after {
    opacity: 1;
}

.stat-info h3 {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.35rem;
    font-weight: 600;
}
.stat-info .stat-number {
    font-size: 2.1rem;
    font-weight: 800;
    color: var(--text-main);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
}
.stat-icon.primary { background: rgba(0, 130, 55, 0.1); color: var(--primary); }
.stat-icon.success { background: rgba(0, 130, 55, 0.15); color: var(--primary); }
.stat-icon.accent { background: rgba(254, 202, 53, 0.2); color: #b45309; }
.stat-icon.warning { background: rgba(254, 202, 53, 0.25); color: #d97706; }

/* Kısaltma Kartı (Quick Shorten) */
.shorten-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.shorten-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.shorten-header h2 {
    font-size: 1.35rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-main);
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: flex-end;
}

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

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

.input-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-dim);
    pointer-events: none;
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.65rem;
    background: var(--bg-input);
    border: 1px solid var(--bg-input-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.95rem;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}
.form-input.no-icon {
    padding-left: 1rem;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 5, 19, 0.12);
}

.btn {
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(227, 5, 19, 0.25);
}
.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 4px 12px rgba(227, 5, 19, 0.35);
    transform: translateY(-1px);
    color: white;
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #cbd5e1;
}
.btn-secondary:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.btn-danger {
    background: var(--danger-light);
    color: var(--danger);
    border: 1px solid rgba(227, 5, 19, 0.25);
}
.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 0.45rem 0.85rem;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm);
}

/* Kısaltma Sonucu Bildirim Kutusu */
.result-banner {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    animation: fadeIn 0.3s ease;
}

.result-url {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tekgida-green);
    word-break: break-all;
}

/* Tablo Kartı */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-toolbar {
    padding: 1.25rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid var(--bg-card-border);
    background: #ffffff;
}

.table-title {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text-main);
}

.search-box {
    position: relative;
    min-width: 280px;
}
.search-box input {
    width: 100%;
    padding: 0.6rem 1rem 0.6rem 2.4rem;
    background: #ffffff;
    border: 1px solid var(--bg-input-border);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 0.88rem;
    outline: none;
    transition: var(--transition);
}
.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(227, 5, 19, 0.1);
}
.search-box i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
    font-size: 0.85rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

table.data-table th {
    padding: 0.95rem 1.5rem;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #475569;
    background: #f8fafc;
    border-bottom: 1px solid var(--bg-card-border);
}

table.data-table td {
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid var(--bg-card-border);
    font-size: 0.92rem;
    vertical-align: middle;
    color: var(--text-main);
}

table.data-table tr:hover td {
    background: #f8fafc;
}

.link-title {
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.2rem;
    display: block;
}

.link-orig {
    font-size: 0.82rem;
    color: var(--text-muted);
    max-width: 320px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}
.link-orig:hover {
    color: var(--primary);
}

.short-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    background: rgba(0, 130, 55, 0.08);
    border: 1px solid rgba(0, 130, 55, 0.25);
    border-radius: var(--radius-sm);
    color: var(--primary);
    font-weight: 700;
    font-family: monospace;
    font-size: 0.9rem;
}

.copy-btn {
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-muted);
    transition: var(--transition);
}
.copy-btn:hover {
    color: var(--primary);
}

.badge {
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.badge-active {
    background: var(--success-light);
    color: var(--tekgida-green);
    border: 1px solid rgba(0, 141, 54, 0.2);
}
.badge-inactive {
    background: var(--danger-light);
    color: var(--tekgida-red);
    border: 1px solid rgba(227, 5, 19, 0.2);
}
.badge-clicks {
    background: rgba(14, 114, 223, 0.1);
    color: var(--tekgida-blue);
    border: 1px solid rgba(14, 114, 223, 0.2);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.badge-clicks:hover {
    background: rgba(14, 114, 223, 0.2);
}

.actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Modallar */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(6px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 1.5rem;
    animation: fadeIn 0.2s ease;
}
.modal-overlay.open {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.25rem 1.75rem;
    border-bottom: 1px solid var(--bg-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
}

.modal-body {
    padding: 1.75rem;
    flex: 1;
    background: #ffffff;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
}
.modal-close:hover {
    color: var(--text-main);
}

/* QR Kod Kartı */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
}
.qr-frame {
    padding: 1.25rem;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    display: inline-block;
}

/* Login Ekranı Özel */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.25rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.login-brand {
    margin-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}

/* Code Snippets & Docs */
pre.code-block {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: var(--radius-md);
    padding: 1.25rem;
    overflow-x: auto;
    font-family: 'Fira Code', monospace;
    font-size: 0.86rem;
    color: #f1f5f9;
    margin: 1rem 0;
}

/* Toast Bildirim */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    z-index: 10000;
}

.toast {
    padding: 1rem 1.4rem;
    border-radius: var(--radius-md);
    background: #ffffff;
    border: 1px solid var(--bg-card-border);
    box-shadow: var(--shadow-lg);
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.92rem;
    font-weight: 500;
    animation: slideInRight 0.3s ease;
}
.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }

/* Ek İstatistik Listeleri */
.list-item-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-size: 0.88rem;
}
.list-item-stat .name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.list-item-stat .count {
    font-weight: 700;
    color: var(--primary);
    background: rgba(227, 5, 19, 0.08);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
}

.code-badge {
    font-family: monospace;
    font-size: 0.82rem;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #334155;
}

.grid-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 768px) {
    .grid-2col {
        grid-template-columns: 1fr;
    }
}

.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.82rem; }
.text-center { text-align: center; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }

/* Animasyonlar */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}
