/* ═══════════════════════════════════════════
   AgorVision QC Core - Lisans Yönetim Paneli
   Modern Koyu Tema CSS
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary:    #0f0f1a;
    --bg-secondary:  #1a1a2e;
    --bg-card:       #16213e;
    --bg-input:      #0d0d1a;
    --accent:        #e94560;
    --accent-hover:  #ff6b81;
    --accent-glow:   rgba(233, 69, 96, 0.3);
    --info:          #00b0ff;
    --success:       #00c853;
    --warning:       #ffd600;
    --error:         #ff1744;
    --text-primary:  #eaeaea;
    --text-secondary:#a0a0b0;
    --text-muted:    #6a6a7a;
    --border:        #2a2a4a;
    --border-light:  #3a3a5a;
    --shadow:        0 8px 32px rgba(0, 0, 0, 0.4);
    --radius:        12px;
    --radius-sm:     8px;
    --radius-xs:     6px;
    --transition:    all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
}

a { color: var(--info); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }

/* ─── LOGIN SAYFASI ─── */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #0f3460 100%);
}

.login-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow);
    text-align: center;
}

.login-card h1 {
    color: var(--accent);
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.login-card .subtitle {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 32px;
}

/* ─── GENEL LAYOUT ─── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, #0d1b2a 100%);
    border-right: 1px solid var(--border);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border);
    text-align: center;
}

.sidebar-brand h2 {
    color: var(--accent);
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-brand small {
    color: var(--text-muted);
    font-size: 11px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 4px;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-nav a:hover {
    background: rgba(233, 69, 96, 0.1);
    color: var(--text-primary);
}

.sidebar-nav a.active {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.sidebar-nav .nav-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    font-size: 12px;
    color: var(--text-muted);
    text-align: center;
}

/* ─── ANA İÇERİK ─── */
.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 0;
}

.topbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 16px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar h1 {
    font-size: 22px;
    font-weight: 600;
    color: var(--text-primary);
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.content-area {
    padding: 32px;
}

/* ─── KARTLAR ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-hover));
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--border-light);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-top: 4px;
}

.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.info::before    { background: var(--info); }
.stat-card.error::before   { background: var(--error); }

/* ─── TABLO ─── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
}

.card-body { padding: 24px; }

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

.data-table th {
    background: rgba(15, 52, 96, 0.5);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(42, 42, 74, 0.5);
    font-size: 13px;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(233, 69, 96, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ─── BADGE ─── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-active   { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.badge-expired  { background: rgba(255, 23, 68, 0.15); color: var(--error); }
.badge-suspended{ background: rgba(255, 214, 0, 0.15); color: var(--warning); }
.badge-revoked  { background: rgba(106, 106, 122, 0.15); color: var(--text-muted); }
.badge-trial    { background: rgba(0, 176, 255, 0.15); color: var(--info); }
.badge-standard { background: rgba(0, 200, 83, 0.15); color: var(--success); }
.badge-professional { background: rgba(233, 69, 96, 0.15); color: var(--accent); }
.badge-enterprise   { background: rgba(156, 39, 176, 0.15); color: #ce93d8; }
.badge-lifetime     { background: rgba(255, 214, 0, 0.15); color: var(--warning); }

/* ─── FORM ELEMENTLERİ ─── */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-xs);
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-control::placeholder {
    color: var(--text-muted);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23a0a0b0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

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

/* ─── BUTONLAR ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--accent-glow);
    color: #fff;
}

.btn-secondary {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-success {
    background: linear-gradient(135deg, #00c853, #00e676);
    color: #fff;
}

.btn-danger {
    background: linear-gradient(135deg, #ff1744, #ff5252);
    color: #fff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-icon {
    padding: 8px;
    border-radius: var(--radius-xs);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.btn-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ─── MODAL ─── */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.95); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 { font-size: 18px; font-weight: 600; }

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
    line-height: 1;
}

.modal-close:hover { color: var(--accent); }

.modal-body { padding: 24px; }

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ─── ALERT ─── */
.alert {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: rgba(0, 200, 83, 0.1); border: 1px solid rgba(0, 200, 83, 0.3); color: var(--success); }
.alert-error   { background: rgba(255, 23, 68, 0.1); border: 1px solid rgba(255, 23, 68, 0.3); color: var(--error); }
.alert-warning { background: rgba(255, 214, 0, 0.1); border: 1px solid rgba(255, 214, 0, 0.3); color: var(--warning); }
.alert-info    { background: rgba(0, 176, 255, 0.1); border: 1px solid rgba(0, 176, 255, 0.3); color: var(--info); }

/* ─── ARAMA ─── */
.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 16px 10px 40px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    outline: none;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--accent);
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* ─── PAGINATION ─── */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-xs);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition);
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* ─── EMPTY STATE ─── */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h4 { font-size: 16px; margin-bottom: 8px; color: var(--text-secondary); }
.empty-state p { font-size: 13px; }

/* ─── YÜKLEME ANİMASYONU ─── */
.spinner {
    display: inline-block;
    width: 20px; height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .content-area { padding: 16px; }
    .topbar { padding: 12px 16px; }
}
