:root {
    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;
    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;
    --secondary: 210 40% 96%;
    --secondary-foreground: 222.2 84% 4.9%;
    --muted: 210 40% 96%;
    --muted-foreground: 215.4 16.3% 46.9%;
    --accent: 210 40% 96%;
    --accent-foreground: 222.2 84% 4.9%;
    --destructive: 0 72.2% 50.6%;
    --destructive-foreground: 210 40% 98%;
    --success: 142.1 76.2% 36.3%;
    --success-foreground: 355.7 100% 97.3%;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(to bottom right, #f8fafc, #e2e8f0);
    min-height: 100vh;
}

/* Shadcn-style components */
.card {
    background: white;
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.card-header {
    padding: 1.5rem 1.5rem 0;
}

.card-content {
    padding: 1.5rem;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
    border: none;
    outline: none;
}

.button-primary {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
}

.button-primary:hover {
    background: hsl(222.2 47.4% 8%);
}

.button-secondary {
    background: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
    border: 1px solid hsl(var(--border));
    padding: 0.5rem 1rem;
}

.button-secondary:hover {
    background: hsl(210 40% 94%);
}

.button-destructive {
    background: hsl(var(--destructive));
    color: hsl(var(--destructive-foreground));
    padding: 0.5rem 1rem;
}

.button-destructive:hover {
    background: hsl(0 72.2% 45%);
}

.button-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.input {
    display: flex;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid hsl(var(--border));
    background: white;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    transition: all 0.15s ease-in-out;
}

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

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.15s ease-in-out;
}

.badge-success {
    background: hsl(var(--success) / 0.1);
    color: hsl(var(--success));
}

.badge-destructive {
    background: hsl(var(--destructive) / 0.1);
    color: hsl(var(--destructive));
}

.table {
    width: 100%;
    caption-side: bottom;
    border-collapse: collapse;
}

.table-header {
    border-bottom: 1px solid hsl(var(--border));
}

.table-header th {
    height: 3rem;
    padding: 0 1rem;
    text-align: left;
    font-weight: 500;
    color: hsl(var(--muted-foreground));
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.table-row {
    border-bottom: 1px solid hsl(var(--border));
    transition: background-color 0.15s ease-in-out;
}

.table-row:hover {
    background: hsl(210 40% 98%);
}

.table-cell {
    padding: 1rem;
    vertical-align: middle;
}

.input-row {
    background: hsl(210 40% 98%);
}

.input-row:hover {
    background: hsl(210 40% 97%);
}

.stat-card {
    background: linear-gradient(135deg, white 0%, hsl(210 40% 98%) 100%);
    border: 1px solid hsl(var(--border));
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.15s ease-in-out;
}

.stat-card:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

.toast {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 50;
    background: white;
    border: 1px solid hsl(var(--border));
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);
    display: none;
    min-width: 300px;
}

.toast-success {
    border-left: 4px solid hsl(var(--success));
}

.toast-error {
    border-left: 4px solid hsl(var(--destructive));
}

.profit {
    color: hsl(var(--success));
    font-weight: 600;
}

.loss {
    color: hsl(var(--destructive));
    font-weight: 600;
}

.header-gradient {
    background: linear-gradient(135deg, hsl(var(--primary)) 0%, hsl(222.2 47.4% 8%) 100%);
    color: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.floating-action {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 40;
}

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

.toast {
    animation: slideIn 0.3s ease-out;
}

.glassmorphism {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
