/* ===== VARIABEL ===== */
:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --secondary: #2ecc71;
    --secondary-dark: #27ae60;
    --danger: #e74c3c;
    --danger-dark: #c0392b;
    --warning: #f39c12;
    --light: #ecf0f1;
    --dark: #2c3e50;
    --text: #34495e;
    --gray: #95a5a6;
    --border: #bdc3c7;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f5f7fa;
    color: var(--text);
    line-height: 1.6;
    padding: 20px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    color: var(--dark);
    margin-bottom: 15px;
}

h1 {
    font-size: 2.2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.subtitle {
    color: var(--gray);
    margin-bottom: 30px;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
    margin-bottom: 25px;
    animation: fadeIn 0.5s ease-out;
}

.form-section {
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 20px;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 16px;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: var(--danger-dark);
}

.btn-success {
    background-color: var(--secondary);
    color: white;
}

.btn-success:hover {
    background-color: var(--secondary-dark);
}

.btn-icon {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
}

/* ===== TABLES ===== */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 15px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background-color: var(--light);
    font-weight: 600;
    color: var(--dark);
}

/* ===== TOOLTIPS ===== */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    font-weight: normal;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* ===== RESULT DISPLAY ===== */
.result-card {
    background-color: #f8f9fa;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin: 20px 0;
}

.result-item {
    background: white;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.result-label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--dark);
}

.result-value {
    font-size: 1.1rem;
    color: var(--primary);
}

.highlight .result-value {
    color: var(--secondary);
    font-size: 1.3rem;
}

.profit-calculation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.profit-calculation h3 {
    color: var(--secondary);
}

/* ===== UTILITY CLASSES ===== */
.empty-message {
    color: var(--gray);
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.text-center {
    text-align: center;
}

.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .result-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .card {
        padding: 15px;
    }
}
.btn-icon {
    color: #ff4757;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}
.btn-icon:hover {
    color: #ff0000;
}