* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    color: #e2e8f0;
    min-height: 100vh;
}

.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    font-size: 18px;
    font-weight: 700;
    color: #fbbf24;
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-button {
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: rgba(217, 119, 6, 0.2);
    border-color: rgba(217, 119, 6, 0.5);
    color: #f1f5f9;
}

.nav-button.active {
    background: rgba(217, 119, 6, 0.3);
    border-color: rgba(217, 119, 6, 0.5);
    color: #fcd34d;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.header {
    margin-bottom: 40px;
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(217, 119, 6, 0.15) 0%, transparent 50%);
    border-radius: 20px;
    filter: blur(30px);
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon-box {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 8px 24px rgba(217, 119, 6, 0.3);
    flex-shrink: 0;
}

.header-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.header-title-row h1 {
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.badge {
    background: rgba(217, 119, 6, 0.3);
    border: 1px solid rgba(217, 119, 6, 0.5);
    color: #fcd34d;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

.header-subtitle {
    color: #94a3b8;
    font-size: 14px;
}

.card {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    margin-bottom: 24px;
}

.card:hover {
    border-color: rgba(203, 213, 225, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.card-icon {
    font-size: 24px;
}

.profit-card {
    border-top: 3px solid #10b981;
}

.inventory-card {
    border-top: 3px solid #d97706;
}

.profit-section {
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 8px;
}

.profit-label {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.profit-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profit-icon {
    font-size: 18px;
}

.profit-value {
    font-size: 32px;
    font-weight: 700;
    color: #10b981;
}

.profit-unit {
    font-size: 14px;
    color: #64748b;
}

.card-subtitle {
    color: #94a3b8;
    font-size: 13px;
    margin-bottom: 24px;
}

.section {
    margin-bottom: 32px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.1);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.card-item {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(203, 213, 225, 0.1);
    border-radius: 10px;
    padding: 16px;
    transition: all 0.3s ease;
}

.card-item:hover {
    background: rgba(15, 23, 42, 0.8);
    border-color: rgba(203, 213, 225, 0.2);
    transform: translateY(-2px);
}

.card-item-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.card-item-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.card-item-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #f1f5f9;
    flex-grow: 1;
}

.card-item-wl {
    font-size: 11px;
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.input-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-input-group {
    position: relative;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input {
    padding-right: 50px !important;
}

.unit-toggle {
    position: absolute;
    right: 8px;
    color: #cbd5e1;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px 6px;
    border-radius: 4px;
}

.unit-toggle:hover {
    color: #f1f5f9;
    background: rgba(217, 119, 6, 0.15);
}

.unit-arrow {
    font-size: 8px;
    transition: transform 0.3s ease;
}

.unit-toggle:hover .unit-arrow {
    transform: scaleY(1.2);
}

label {
    font-size: 10px;
    font-weight: 600;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="number"] {
    width: 100%;
    padding: 8px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(203, 213, 225, 0.15);
    border-radius: 6px;
    color: #f1f5f9;
    font-size: 13px;
    transition: all 0.3s ease;
}

input[type="number"]:focus {
    outline: none;
    border-color: rgba(217, 119, 6, 0.5);
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.1);
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

.helper-text {
    font-size: 9px;
    color: #64748b;
}

@media (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 640px) {
    .header-title-row h1 {
        font-size: 24px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }
}

.watermark {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 13px;
    font-weight: 700;
    color: #fbbf24;
    pointer-events: none;
    z-index: 50;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 10px 16px;
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.2) 0%, rgba(217, 119, 6, 0.1) 100%);
    border: 1px solid rgba(217, 119, 6, 0.4);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
    animation: watermarkGlow 3s ease-in-out infinite;
}

@keyframes watermarkGlow {
    0%, 100% {
        box-shadow: 0 8px 32px rgba(217, 119, 6, 0.2);
        border-color: rgba(217, 119, 6, 0.4);
    }
    50% {
        box-shadow: 0 8px 32px rgba(217, 119, 6, 0.4);
        border-color: rgba(217, 119, 6, 0.6);
    }
}