/* /Users/onerhatipoglu/Documents/Finanzbasket/portfolyst_V2/assets/css/style.css */
[x-cloak] {
    display: none !important;
}

:root {
    /* Pantone Inspired Blues & Financial Palette */
    --primary: 217 91% 60%;
    --primary-foreground: 210 40% 98%;
    --background: 210 20% 98%;
    --foreground: 222 47% 11%;
    --card: 0 0% 100%;
    --card-foreground: 222 47% 11%;
    --popover: 0 0% 100%;
    --popover-foreground: 222 47% 11%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222 47% 11%;
    --muted: 210 40% 96%;
    --muted-foreground: 215 16% 47%;
    --accent: 210 40% 96%;
    --accent-foreground: 222 47% 11%;
    --destructive: 0 84% 60%;
    --destructive-foreground: 210 40% 98%;
    --border: 214 32% 91%;
    --input: 214 32% 91%;
    --ring: 221 83% 53%;
    --radius: 0.75rem;

    --success: 142 70% 45%;
    --warning: 38 92% 50%;
}

[data-theme="dark"] {
    --background: 222 47% 11%;
    --foreground: 210 40% 98%;
    --card: 222 47% 11%;
    --card-foreground: 210 40% 98%;
    --popover: 222 47% 11%;
    --popover-foreground: 210 40% 98%;
    --primary: 217 91% 60%;
    --primary-foreground: 222 47% 11%;
    --secondary: 217 33% 17%;
    --secondary-foreground: 210 40% 98%;
    --muted: 217 33% 17%;
    --muted-foreground: 215 20% 65%;
    --accent: 217 33% 17%;
    --accent-foreground: 210 40% 98%;
    --destructive: 0 62% 30%;
    --destructive-foreground: 210 40% 98%;
    --border: 217 33% 17%;
    --input: 217 33% 17%;
    --ring: 224 76% 48%;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: hsl(var(--background));
    color: hsl(var(--foreground));
    line-height: 1.5;
    transition: background-color 0.3s, color 0.3s;
}

/* Glassmorphism Classes */
.glass {
    background: hsla(var(--card), 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid hsla(var(--border), 0.5);
}

/* Card Styling */
.card-modern {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.card-modern:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Sidebar & Layout */
.sidebar {
    position: fixed;
    z-index: 50;
    transition: all 0.3s ease;
}

.main-content {
    min-height: 100vh;
}

/* Modal Helper */
.modal-content-scroll {
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    padding-right: 8px;
}

/* Table Modernization */
.table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    background: hsl(var(--card));
}

table {
    width: 100%;
    min-width: 600px;
    /* Ensure horizontal scroll on mobile */
    border-collapse: collapse;
}

th {
    background: hsl(var(--muted) / 0.5);
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: hsl(var(--muted-foreground));
    letter-spacing: 0.05em;
}

td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
    font-size: 0.875rem;
}

tr:hover td {
    background: hsl(var(--muted) / 0.3);
}

/* Form Styles */
.input-modern {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: calc(var(--radius) - 2px);
    font-size: 0.875rem;
    color: hsl(var(--foreground));
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-modern:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsl(var(--primary) / 0.15);
}

/* Button UI */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    min-height: 3.5rem;
    /* h-14 equivalent (56px) */
    border-radius: 1rem;
    /* rounded-2xl equivalent */
    font-weight: 700;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    gap: 0.5rem;
    letter-spacing: 0.025em;
}

.btn-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
        padding: 1rem;
    }

    .sidebar.open {
        transform: translateX(0);
    }
}

/* Scaling Utilities */
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

@media (max-width: 640px) {
    .card-modern {
        padding: 1rem !important;
        border-radius: 1rem;
    }

    h1 {
        font-size: 1.875rem !important;
        line-height: 2.25rem !important;
    }
}

html {
    touch-action: manipulation;
}