* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Inter, Arial, sans-serif;
    background: #f4f7fb;
    color: #111827;
}

.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */

.sidebar {
    width: 260px;
    background: #0f172a;
    color: white;
    padding: 30px;
}

.logo h2 {
    font-size: 26px;
}

.logo span {
    color: #94a3b8;
    font-size: 13px;
}

.sidebar nav {
    margin-top: 40px;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    padding: 14px;
    margin-bottom: 10px;
    border-radius: 10px;
    cursor: pointer;
    transition: .3s;
}

.sidebar li:hover,
.sidebar li.active {
    background: #1e293b;
}

/* Main */

.main-content {
    flex: 1;
    padding: 30px;
}

.header {
    margin-bottom: 25px;
}

.header h1 {
    font-size: 34px;
    margin-bottom: 8px;
}

.header p {
    color: #64748b;
}

/* Cards */

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.card h4 {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 10px;
}

.card h2 {
    color: #2563eb;
}

/* Calculator */

.calculator-card,
.table-card,
.chart-card {
    background: white;
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 3px 12px rgba(0,0,0,.08);
}

.calculator-card h2,
.table-card h2,
.chart-card h2 {
    margin-bottom: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit,minmax(220px,1fr));
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.form-group input,
.form-group select {
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 10px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #2563eb;
}

.calculate-btn {
    margin-top: 20px;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px 25px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
}

.calculate-btn:hover {
    opacity: .9;
}

/* Table */

table {
    width: 100%;
    border-collapse: collapse;
}

table td {
    padding: 14px;
    border-bottom: 1px solid #e5e7eb;
}

table td:first-child {
    color: #64748b;
    width: 50%;
}

/* Chart */

.chart-card canvas {
    width: 100%;
    min-height: 400px;
}

/* Mobile */

@media(max-width: 900px) {

    .layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .main-content {
        padding: 15px;
    }

}