/**
 * HemenQR - Shadcn Tema CSS
 * Modern ve şık tasarım
 */

/* =====================================================
   CSS Değişkenleri (Shadcn Teması)
   ===================================================== */
:root {
    /* Ana renkler */
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;
    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;
    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;
    --primary: 240 5.9% 10%;
    --primary-foreground: 0 0% 98%;
    --secondary: 240 4.8% 95.9%;
    --secondary-foreground: 240 5.9% 10%;
    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;
    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;
    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;
    --radius: 0.5rem;

    /* Özel renkler */
    --success: 142 76% 36%;
    --warning: 38 92% 50%;
    --info: 199 89% 48%;

    /* Input ve Border */
    --border: 240 5.9% 85%;
    --input: 240 5.9% 85%;
    --ring: 240 5.9% 10%;

    /* Font */
    --font-heading: 'Inter', sans-serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Dark mode */
.dark {
    --background: 240 10% 3.9%;
    --foreground: 0 0% 98%;
    --card: 240 10% 3.9%;
    --card-foreground: 0 0% 98%;
    --popover: 240 10% 3.9%;
    --popover-foreground: 0 0% 98%;
    --primary: 0 0% 98%;
    --primary-foreground: 240 5.9% 10%;
    --secondary: 240 3.7% 15.9%;
    --secondary-foreground: 0 0% 98%;
    --muted: 240 3.7% 15.9%;
    --muted-foreground: 240 5% 64.9%;
    --accent: 240 3.7% 15.9%;
    --accent-foreground: 0 0% 98%;
    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 0 0% 98%;
    --border: 240 3.7% 15.9%;
    --input: 240 3.7% 15.9%;
    --ring: 240 4.9% 83.9%;
}

/* =====================================================
   Reset ve Temel Stiller
   ===================================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    max-width: 100vw;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input,
textarea,
select {
    font-family: inherit;
}

/* =====================================================
   Layout
   ===================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container-sm {
    max-width: 640px;
}

.container-md {
    max-width: 768px;
}

.container-lg {
    max-width: 1024px;
}

/* =====================================================
   Shadcn Bileşenleri - Button
   ===================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1rem;
    border: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 2px solid hsl(var(--ring));
    outline-offset: 2px;
}

.btn:disabled {
    opacity: 0.5;
    pointer-events: none;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background: hsl(var(--secondary) / 0.8);
}

.btn-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.btn-destructive:hover {
    background: hsl(var(--destructive) / 0.9);
}

.btn-outline {
    background: transparent;
    border: 1px solid hsl(var(--input));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background: hsl(var(--accent));
}

.btn-ghost {
    background: transparent;
    color: hsl(var(--foreground));
}

.btn-ghost:hover {
    background: hsl(var(--accent));
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

/* =====================================================
   Shadcn Bileşenleri - Card
   ===================================================== */
.card {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.card-description {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
}

.card-content {
    padding: 1.5rem;
}

.card-footer {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* =====================================================
   Shadcn Bileşenleri - Input
   ===================================================== */
.input {
    width: 100%;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    border: 1px solid hsl(var(--input));
    border-radius: var(--radius);
    background: transparent;
    color: hsl(var(--foreground));
    transition: all 0.2s ease;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 2px hsl(var(--ring) / 0.2);
}

.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =====================================================
   Shadcn Bileşenleri - Label
   ===================================================== */
.label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: hsl(var(--foreground));
}

/* =====================================================
   Shadcn Bileşenleri - Form Group
   ===================================================== */
.form-group {
    margin-bottom: 1.25rem;
}

/* =====================================================
   Shadcn Bileşenleri - Badge
   ===================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid transparent;
}

.badge-default {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-success {
    background: hsl(var(--success));
    color: white;
}

.badge-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
}

.badge-outline {
    background: transparent;
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}

/* =====================================================
   Shadcn Bileşenleri - Alert
   ===================================================== */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid;
    margin-bottom: 1rem;
}

.alert-success {
    background: hsl(var(--success) / 0.1);
    border-color: hsl(var(--success) / 0.3);
    color: hsl(var(--success));
}

.alert-error {
    background: hsl(var(--destructive) / 0.1);
    border-color: hsl(var(--destructive) / 0.3);
    color: hsl(var(--destructive));
}

.alert-warning {
    background: hsl(var(--warning) / 0.1);
    border-color: hsl(var(--warning) / 0.3);
    color: hsl(var(--warning));
}

.alert-info {
    background: hsl(var(--info) / 0.1);
    border-color: hsl(var(--info) / 0.3);
    color: hsl(var(--info));
}

/* =====================================================
   Shadcn Bileşenleri - Table
   ===================================================== */
.table-wrapper {
    overflow-x: auto;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background: hsl(var(--muted));
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 500;
    border-bottom: 1px solid hsl(var(--border));
}

.table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: hsl(var(--muted) / 0.5);
}

/* =====================================================
   Shadcn Bileşenleri - Avatar
   ===================================================== */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: hsl(var(--muted));
    color: hsl(var(--muted-foreground));
    font-weight: 500;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-lg {
    width: 4rem;
    height: 4rem;
    font-size: 1.25rem;
}

/* =====================================================
   Shadcn Bileşenleri - Separator
   ===================================================== */
.separator {
    height: 1px;
    background: hsl(var(--border));
    margin: 1rem 0;
}

.separator-vertical {
    width: 1px;
    height: auto;
    margin: 0 1rem;
}

/* =====================================================
   Shadcn Bileşenleri - Checkbox
   ===================================================== */
.checkbox {
    appearance: none;
    width: 1rem;
    height: 1rem;
    border: 1px solid hsl(var(--input));
    border-radius: 0.25rem;
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox:checked {
    background: hsl(var(--primary));
    border-color: hsl(var(--primary));
    background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
}

/* =====================================================
   Yardımcı Sınıflar
   ===================================================== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.text-sm {
    font-size: 0.875rem;
}

.text-xs {
    font-size: 0.75rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.text-3xl {
    font-size: 1.875rem;
}

.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

.text-muted {
    color: hsl(var(--muted-foreground));
}

.text-primary {
    color: hsl(var(--primary));
}

.text-success {
    color: hsl(var(--success));
}

.text-destructive {
    color: hsl(var(--destructive));
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.space-y-1>*+* {
    margin-top: 0.25rem;
}

.space-y-2>*+* {
    margin-top: 0.5rem;
}

.space-y-3>*+* {
    margin-top: 0.75rem;
}

.space-y-4>*+* {
    margin-top: 1rem;
}

.space-y-6>*+* {
    margin-top: 1.5rem;
}

.space-y-8>*+* {
    margin-top: 2rem;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: 0.25rem;
}

.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-8 {
    padding: 2rem;
}

.m-0 {
    margin: 0;
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-3 {
    margin-top: 0.75rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.rounded {
    border-radius: var(--radius);
}

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: calc(var(--radius) + 0.25rem);
}

.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.sticky {
    position: sticky;
    top: 0;
}

.z-10 {
    z-index: 10;
}

.z-20 {
    z-index: 20;
}

.z-50 {
    z-index: 50;
}

.shadow {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

.transition {
    transition: all 0.2s ease;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {

    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }

    .md-flex-col {
        flex-direction: column;
    }

    .md-hidden {
        display: none;
    }
}

@media (min-width: 768px) {
    .md-grid-cols-2 {
        grid-template-columns: repeat(2, 1fr);
    }

    .md-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .md-hidden-up {
        display: none;
    }
}

@media (min-width: 1024px) {
    .lg-grid-cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .lg-grid-cols-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}