/* Calculator Pages Common Styles */
:root {
    --brand: #1e3a8a;
    --brand-2: #2563eb;
    --accent: #0ea5e9;
    --bg: #f7f9ff;
    --card: #ffffff;
    --muted: #58627a;
    --text: #0f172a;
    --line: #e6e9f5;
}

/* Section Headers */
.section-title {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.section-title h2 {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: 1.25rem;
    color: var(--brand);
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(37,99,235,.1);
    border-radius: 10px;
    margin-right: 12px;
    color: var(--brand-2);
    transition: all 0.3s ease;
}

.section-icon i {
    font-size: 20px;
}

.section-title:hover .section-icon {
    transform: scale(1.05);
    background: rgba(37,99,235,.15);
}

/* Card Styles */
.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(2,6,23,.05);
    padding: 24px;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 12px 24px rgba(2,6,23,.08);
}

/* Form Elements */
.grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.grid:last-child {
    margin-bottom: 0;
}

.grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .grid.cols-2, .grid.cols-3 {
        grid-template-columns: 1fr;
    }
}

/* Form Controls */
label {
    font-size: 12px;
    color: var(--muted);
    font-weight: 500;
    margin-bottom: 6px;
    display: block;
}

input, select, textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text);
    font-size: 14px;
    transition: all 0.2s ease;
}

input:hover, select:hover {
    border-color: var(--brand-2);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--brand-2);
    box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}

/* Helper Classes */
.input-hint {
    font-size: 11px;
    color: var(--muted);
    margin-top: 4px;
    display: block;
}

.muted {
    color: var(--muted);
    font-size: 12px;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--brand-2);
    background: var(--brand-2);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37,99,235,.15);
}

.btn.ghost {
    background: #fff;
    color: var(--brand-2);
}

.btn.ghost:hover {
    background: rgba(37,99,235,.05);
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.page-title {
    font-size: 24px;
    color: var(--brand);
    margin: 0;
}

.page-subtitle {
    color: var(--muted);
    font-size: 14px;
    margin: 4px 0 0 0;
}

/* Print Styles */
@media print {
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        padding: 10px;
        margin: 0;
    }

    .btn, .page-header {
        display: none !important;
    }
}

/* Tooltips */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: var(--text);
    color: #fff;
    font-size: 12px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

[data-tooltip]:hover:after {
    opacity: 1;
    visibility: visible;
}