/* Ibu Keuangan Frontend Styles */

.ik-form-wrapper {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 25px;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ik-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.ik-form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 14px;
}

.ik-form-group input,
.ik-form-group select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.ik-form-group input:focus,
.ik-form-group select:focus {
    outline: none;
    border-color: #1a5276;
    box-shadow: 0 0 0 3px rgba(26, 82, 118, 0.1);
}

.ik-form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 35px;
}

/* Buttons */
.ik-btn {
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.ik-btn-primary {
    background: #1a5276;
    color: white;
    width: 100%;
}

.ik-btn-primary:hover:not(:disabled) {
    background: #0d3a5c;
    box-shadow: 0 4px 12px rgba(26, 82, 118, 0.3);
}

.ik-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Message */
.ik-form-message {
    padding: 12px;
    border-radius: 4px;
    margin-top: 15px;
    font-size: 14px;
}

.ik-form-message.ik-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.ik-form-message.ik-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Quick Actions */
.ik-quick-actions {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.ik-quick-actions h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 14px;
}

.ik-quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.ik-quick-action {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.ik-quick-action:hover {
    background: #1a5276;
    color: white;
    border-color: #1a5276;
}

/* Summary Cards */
.ik-summary-wrapper {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.ik-summary-header {
    margin-bottom: 30px;
}

.ik-summary-header h2 {
    margin: 0;
    color: #1a5276;
    border-bottom: 3px solid #1a5276;
    padding-bottom: 10px;
}

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

.ik-summary-cards .ik-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ik-summary-cards .ik-card h3 {
    margin: 0 0 10px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ik-summary-cards .ik-card .ik-amount {
    font-size: 24px;
    color: white;
    margin: 10px 0;
}

.ik-summary-cards .ik-card .ik-meta {
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
}

.ik-summary-cards .ik-card:nth-child(1) {
    background: linear-gradient(135deg, #06d6a0 0%, #118ab2 100%);
}

.ik-summary-cards .ik-card:nth-child(2) {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

.ik-summary-cards .ik-card:nth-child(3) {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
}

/* Breakdown Table */
.ik-breakdown {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.ik-breakdown h3 {
    margin-top: 0;
}

.ik-breakdown-table {
    width: 100%;
    border-collapse: collapse;
}

.ik-breakdown-table td {
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ik-breakdown-table td:first-child {
    font-weight: 500;
    color: #333;
}

.ik-breakdown-table td.ik-amount {
    text-align: right;
    font-weight: bold;
    color: #1a5276;
    font-family: 'Courier New', monospace;
}

/* Insights */
.ik-insights {
    background: #fffbf0;
    border-left: 4px solid #ffc107;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.ik-insights h3 {
    margin-top: 0;
    color: #f57f17;
}

.ik-summary-text {
    color: #666;
    line-height: 1.6;
    margin: 15px 0;
}

.ik-recommendations {
    background: white;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.ik-recommendations h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.ik-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.ik-recommendations li {
    margin: 8px 0;
    color: #666;
    line-height: 1.5;
}

.ik-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 12px;
    border-radius: 4px;
    color: #856404;
    margin-top: 15px;
}

/* Transactions Table */
.ik-transactions-wrapper {
    background: white;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.ik-transactions-wrapper h2 {
    margin-top: 0;
    color: #1a5276;
    border-bottom: 3px solid #1a5276;
    padding-bottom: 10px;
}

.ik-transactions-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.ik-transactions-table thead {
    background: #f5f5f5;
}

.ik-transactions-table th {
    padding: 12px;
    text-align: left;
    font-weight: bold;
    color: #333;
    border-bottom: 2px solid #e0e0e0;
    font-size: 13px;
}

.ik-transactions-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.ik-transactions-table tbody tr {
    transition: background 0.2s;
}

.ik-transactions-table tbody tr:hover {
    background: #fafafa;
}

.ik-transactions-table .ik-nominal {
    font-weight: bold;
    text-align: right;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.ik-transactions-table .ik-nominal.masuk {
    color: #06d6a0;
}

.ik-transactions-table .ik-nominal.keluar {
    color: #e63946;
}

/* Responsive */
@media (max-width: 768px) {
    .ik-form-wrapper {
        padding: 15px;
        border-radius: 4px;
    }
    
    .ik-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .ik-quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ik-transactions-table {
        font-size: 12px;
    }
    
    .ik-transactions-table th,
    .ik-transactions-table td {
        padding: 8px;
    }
    
    .ik-breakdown-table td {
        padding: 8px 0;
    }
}

@media (max-width: 480px) {
    .ik-quick-actions {
        grid-template-columns: 1fr;
    }
    
    .ik-summary-cards {
        grid-template-columns: 1fr;
    }
    
    .ik-summary-cards .ik-card .ik-amount {
        font-size: 20px;
    }
}
