/*
 * ParalinkPOS — Admin Panel Ana Stil Dosyası
 *
 * Renk paleti, layout, tipografi ve responsive yapı.
 */

/* ============================================================================
   CSS Custom Properties (Renk Paleti)
   ============================================================================ */
:root {
    /* Primary */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;

    /* Semantic */
    --success-50: #ecfdf5;
    --success-500: #10b981;
    --success-600: #059669;
    --warning-50: #fffbeb;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --danger-50: #fef2f2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    --info-50: #eff6ff;
    --info-500: #3b82f6;
    --info-600: #2563eb;

    /* Neutral */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Layout */
    --container-max: 1200px;
    --navbar-height: 60px;
    --sidebar-width: 240px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Font */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-600);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================================================
   Tipografi
   ============================================================================ */
h1, h2, h3, h4, h5, h6 {
    color: var(--gray-900);
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 1.75rem; margin-bottom: 1rem; }
h2 { font-size: 1.5rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }

small {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Fira Mono', Menlo, Consolas, monospace;
    font-size: 0.875em;
    background: var(--gray-100);
    padding: 0.125em 0.375em;
    border-radius: var(--radius-sm);
}

/* ============================================================================
   Layout
   ============================================================================ */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 1.5rem 0;
}

/* ============================================================================
   Navbar
   ============================================================================ */
.navbar {
    background: var(--gray-900);
    color: white;
    height: var(--navbar-height);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.navbar-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.125rem;
}

.navbar-brand:hover {
    color: white;
    text-decoration: none;
}

.navbar-logo {
    font-size: 1.5rem;
}

.navbar-title small {
    color: var(--gray-400);
    font-weight: 400;
    font-size: 0.75rem;
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.25rem;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.navbar-item {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    color: var(--gray-300);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.navbar-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

.navbar-item-active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.navbar-item-logout {
    color: var(--danger-500);
    margin-left: 0.5rem;
}

.navbar-item-logout:hover {
    color: var(--danger-500);
    background: rgba(239, 68, 68, 0.1);
}

/* ============================================================================
   Footer
   ============================================================================ */
.footer {
    background: var(--gray-100);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* ============================================================================
   Page Header
   ============================================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-header-title h1 {
    margin-bottom: 0;
}

/* ============================================================================
   Stat Cards (Dashboard)
   ============================================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    text-align: center;
    transition: box-shadow var(--transition-fast);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-card-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* Stat card color variants */
.stat-card-total .stat-card-value { color: var(--primary-600); }
.stat-card-active .stat-card-value { color: var(--success-600); }
.stat-card-revoked .stat-card-value { color: var(--danger-600); }
.stat-card-expired .stat-card-value { color: var(--warning-600); }

/* ============================================================================
   Filter Bar
   ============================================================================ */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    padding: 1rem;
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.filter-bar select,
.filter-bar input[type="text"],
.filter-bar input[type="search"] {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--gray-700);
    background: white;
    min-width: 140px;
    transition: border-color var(--transition-fast);
}

.filter-bar select:focus,
.filter-bar input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

/* ============================================================================
   Responsive — Tablet
   ============================================================================ */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--gray-900);
        flex-direction: column;
        padding: 1rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: var(--shadow-lg);
    }

    .navbar-menu.menu-open {
        display: flex;
    }

    .navbar-item {
        padding: 0.75rem 1rem;
        width: 100%;
    }

    .navbar-item-logout {
        margin-left: 0;
        margin-top: 0.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1rem;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar select,
    .filter-bar input {
        width: 100%;
    }
}

/* ============================================================================
   Responsive — Mobile
   ============================================================================ */
@media (max-width: 480px) {
    body {
        font-size: 0.875rem;
    }

    h1 { font-size: 1.375rem; }
    h2 { font-size: 1.25rem; }

    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-card-value {
        font-size: 1.5rem;
    }
}
