/*--------------------------------------------------------------
# Tools Pages Styles
# 与 special.css 风格统一 - 相同的卡片、阴影、圆角、交互模式
# 品牌色: #f03c02
--------------------------------------------------------------*/

:root {
    --primary: #f03c02;
    --primary-light: #fd490f;
    --primary-dark: #c53030;
    --primary-subtle: rgba(240, 60, 2, 0.08);
    --primary-bg: #fff5f2;
    --border: #e8ecf1;
    --border-card: rgba(0, 0, 0, 0.04);
    --text: #333;
    --text-secondary: #666;
    --text-muted: #999;
    --bg-light: #f8f9fc;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 35px rgba(240, 60, 2, 0.12);
    --transition: all 0.3s ease;
    --gradient: linear-gradient(135deg, #f03c02 0%, #fd490f 100%);
}

/* ========================================
   Main Layout
   ======================================== */

#tools {
    padding: 30px 0 50px;
    background: var(--bg-light);
    min-height: 80vh;
}

#tools_form {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-card);
}

#tools_result {
    padding: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 28px;
    overflow: hidden;
    border: 1px solid var(--border-card);
}

#tools_result .section-inner {
    padding: 28px 32px;
}

/* ========================================
   Form Layout - Grid
   ======================================== */

#tools_form .form-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    /*margin-bottom: 20px;*/
}

#tools_form .form-field {
    grid-column: span 1;
}

@media (max-width: 1200px) {
    #tools_form .form-row {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    #tools_form .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    #tools_form .form-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    #tools_form .form-field {
        grid-column: span 1;
    }
}

/* ========================================
   Form Labels
   ======================================== */

#tools_form .form-label {
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--text);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

#tools_form .form-label .text-danger {
    color: var(--primary) !important;
    font-size: 0.9rem;
}

/* ========================================
   Input Groups
   ======================================== */

#tools_form .input-group {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    background: #fff;
    display: flex;
    align-items: stretch;
}

#tools_form .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

#tools_form .form-control,
#tools_form .form-select {
    border: none;
    padding: 9px 14px;
    font-size: 14px;
    color: var(--text);
    height: 38px;
    flex: 1;
    background: transparent;
}

#tools_form .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 34px;
}

#tools_form .form-control::placeholder {
    color: var(--text-muted);
}

#tools_form .input-group-text {
    border: none;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 0.82rem;
    padding: 8px 12px;
    font-weight: 500;
    height: 38px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

#tools_form .input-group-text i {
    display: flex;
    align-items: center;
    justify-content: center;
}

#tools_form .input-group-text .bi-question-circle {
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

#tools_form .input-group-text .bi-question-circle:hover {
    transform: scale(1.15);
}

#tools_form .input-group:has(.form-control:disabled),
#tools_form .input-group:has(.form-select:disabled) {
    background: var(--bg-light);
    border-color: var(--border);
    opacity: 0.8;
}

#tools_form .form-control:disabled,
#tools_form .form-select:disabled {
    background: var(--bg-light);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

#tools_form .form-control:disabled::-webkit-input-placeholder {
    color: var(--text-muted);
}

#tools_form .input-group-text:has(+ .form-control:disabled),
#tools_form .input-group:has(.form-control:disabled) .input-group-text {
    background: #e9ecef;
    color: var(--text-muted);
}

#tools_form select.form-select:disabled {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 34px;
}

/* ========================================
   Section Titles
   ======================================== */

#tools_form .form-section-title {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text);
    margin: 16px 0 12px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

/* ========================================
   Buttons (Primary)
   ======================================== */

#tools_form .btn {
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    transition: var(--transition);
    margin: 4px;
    min-width: 105px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#tools_form .btn i {
    margin-right: 6px;
    font-size: 1rem;
}

#tools_form .btn-primary {
    background: var(--gradient);
    color: #fff;
}

#tools_form .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 60, 2, 0.3);
}

#tools_form .btn-outline-secondary {
    border: 1.5px solid #d1d5db;
    color: var(--text-secondary);
    background: transparent;
}

#tools_form .btn-outline-secondary:hover {
    background: var(--bg-light);
    border-color: var(--text-secondary);
}

#tools_form .btn-outline-danger {
    border: 1.5px solid #ef4444;
    color: #ef4444;
    background: transparent;
}

#tools_form .btn-outline-danger:hover {
    background: #fef2f2;
}

#tools_form .btn-calculate,
.btn-calculate {
    background: var(--gradient);
    color: #fff;
    border: none;
}

#tools_form .btn-calculate:hover,
.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 60, 2, 0.3);
}

#tools_form .btn-clear,
.btn-clear {
    background: #0891b2;
    color: #fff;
    border: none;
}

#tools_form .btn-clear:hover,
.btn-clear:hover {
    background: #0e7490;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(8, 145, 178, 0.3);
}

#tools_form .btn-reset,
.btn-reset {
    background: #64748b;
    color: #fff;
    border: none;
}

#tools_form .btn-reset:hover,
.btn-reset:hover {
    background: #475569;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(100, 116, 139, 0.3);
}

/* ========================================
   Action Buttons (Guide, Consult, Purple)
   ======================================== */

.btn-guide {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: var(--transition);
    gap: 6px;
}

.btn-guide i {
    font-size: 1rem;
}

.btn-guide:hover {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-2px);
}

#consult_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid #ef4444;
    color: #ef4444;
    background: transparent;
    transition: var(--transition);
    gap: 6px;
}

#consult_button i {
    font-size: 1rem;
}

#consult_button:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-2px);
}

.btn-purple {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
    transition: var(--transition);
    gap: 6px;
}

.btn-purple i {
    font-size: 1rem;
}

.btn-purple:hover {
    background: var(--gradient);
    color: #fff;
    transform: translateY(-2px);
}

/* ========================================
   Result Table
   ======================================== */

#tools_result .result-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

#tools_result .result-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

#tools_result .table-responsive {
    border-radius: var(--radius-sm);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--border);
}

#tools_result .table {
    margin-bottom: 0;
    width: 100%;
    min-width: 600px;
    table-layout: fixed;
}

#tools_result .table thead th {
    background: var(--bg-light);
    color: var(--text);
    font-weight: 400;
    padding: 12px 14px;
    border-bottom: 2px solid var(--border);
    font-size: 0.85rem;
    white-space: nowrap;
}

#tools_result .table thead th:nth-child(1) {
    width: 18%;
}

#tools_result .table thead th:nth-child(2) {
    width: 15%;
    min-width: 100px;
}

#tools_result .table thead th:nth-child(3) {
    width: auto;
}

#tools_result .table tbody td {
    padding: 11px 14px;
    vertical-align: top;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.85rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#tools_result .table tbody td:nth-child(1) {
    font-weight: 400;
    color: var(--text);
    white-space: nowrap;
}

#tools_result .table tbody td:nth-child(2) {
    text-align: right;
    min-width: 80px;
}

#tools_result .table tbody tr:hover {
    background: rgba(0, 0, 0, 0.015);
}

#tools_result .table tbody .text-danger {
    color: var(--primary) !important;
    font-weight: 400;
}

#tools_result .table tbody tr.table-info td,
#tools_result .table tbody tr.table-warning td,
#tools_result .table tbody tr.table-danger td {
    background: var(--bg-light) !important;
    font-weight: 400;
    color: var(--text);
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

#tools_result .table tbody tr.table-primary td {
    background: var(--primary-bg) !important;
    border-top: 2px solid var(--primary);
    border-bottom: 2px solid var(--primary);
    padding: 14px;
}

#tools_result .table tbody tr.table-primary .total_fee_label {
    font-size: 1.15rem;
    color: var(--primary) !important;
    font-weight: 400;
}

/* ========================================
   Alerts
   ======================================== */

.alert {
    border: none;
    background: transparent;
    padding: 12px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.alert-info {
    color: var(--text-secondary);
}

.alert-success {
    color: var(--text-secondary);
}

.note {
    text-align: center;
    border: none;
    background: transparent;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ========================================
   Modal
   ======================================== */

.modal-content {
    border-radius: var(--radius);
    border: none;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: var(--gradient);
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 16px 24px;
}

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

#supportModal .btn {
    padding: 9px 20px;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#supportModal .btn-primary {
    background: var(--gradient);
    border: none;
    color: #fff;
}

#supportModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 60, 2, 0.3);
}

#supportModal .btn-outline-secondary {
    border: 1.5px solid #d1d5db;
    color: var(--text-secondary);
    background: transparent;
}

#supportModal .btn-outline-secondary:hover {
    background: var(--bg-light);
}

#supportModal .form-select,
#supportModal .form-control {
    height: 42px;
    padding: 9px 14px;
    font-size: 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    background: #fff;
}

#supportModal .form-select:focus,
#supportModal .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

#supportModal .form-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' fill='%236c757d' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 12px) center;
    padding-right: 34px;
}

#supportModal .input-group {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    background: #fff;
    display: flex;
    align-items: stretch;
}

#supportModal .input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
}

#supportModal .input-group .form-control,
#supportModal .input-group .form-select {
    border: none;
    height: 42px;
    flex: 1;
}

#supportModal .input-group-text {
    border: none;
    background: var(--bg-light);
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 9px 14px;
    font-weight: 500;
    height: 42px;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

/* ========================================
   Button Group
   ======================================== */

.button-group-wrapper {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px 0;
}

.button-group-wrapper .btn {
    min-width: 130px;
}

/* ========================================
   Result Box & Error Box
   ======================================== */

.result-box {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-top: 18px;
}

.error-box {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #ef4444;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 14px;
    color: #7f1d1d;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    line-height: 1.5;
}

.error-box i {
    font-size: 1.2rem;
    margin-right: 12px;
    color: #ef4444;
    flex-shrink: 0;
}

/* ========================================
   Chinese Amount
   ======================================== */

.chinese-amount {
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text);
    background: var(--primary-bg);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary);
}

/* ========================================
   Batch Items
   ======================================== */

.batch-item {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    margin-bottom: 10px;
    transition: var(--transition);
}

.batch-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.batch-item.success {
    border-left: 4px solid #28a745;
}

.batch-item.error {
    border-left: 4px solid #dc3545;
    background: #fef2f2;
}

/* ========================================
   Timeline
   ======================================== */

.vertical-timeline {
    position: relative;
    padding: 12px 0;
}

.vertical-timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 15px;
    width: 2px;
    background: var(--primary);
    opacity: 0.3;
}

.timeline-item {
    position: relative;
    padding-left: 44px;
    margin-bottom: 18px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--gradient);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(240, 60, 2, 0.25);
    z-index: 1;
}

.timeline-content {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    border-left: 3px solid var(--primary);
    transition: var(--transition);
}

.timeline-content:hover {
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.timeline-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.timeline-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ========================================
   Special CSS Card Components
   (与 special.css 中的组件风格一致)
   ======================================== */

/* --- Icon Box --- */
.icon-box {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: var(--radius);
    padding: 24px 18px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-card);
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 8px 0;
}

.icon-box i {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    line-height: 1;
    display: block;
}

.icon-box h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.icon-box p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.icon-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.icon-box:hover i {
    color: var(--primary-dark);
}

.icon-box:hover h4 {
    color: var(--primary);
}

/* --- Process Card --- */
.process-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 24px;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-card);
    display: flex;
    flex-direction: column;
}

.process-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.process-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.process-icon-dark {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.process-icon-dark i {
    font-size: 1.25rem;
    color: #fff;
    line-height: 1;
}

.process-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.process-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(240, 60, 2, 0.08);
    line-height: 1;
}

.process-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.process-details {
    list-style: none;
    padding: 0;
    margin: 0;
}

.process-details li {
    position: relative;
    padding-left: 18px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
}

.process-details li:last-child {
    margin-bottom: 0;
}

.process-details li::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary);
    font-size: 1rem;
}

/* --- Solution Card --- */
.solution-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 20px;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-card);
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.solution-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.solution-icon-dark {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.solution-icon-dark i {
    font-size: 1.25rem;
    color: #fff;
    line-height: 1;
}

.solution-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.solution-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.solution-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.solution-card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    text-align: left;
}

.solution-card ul li:last-child {
    margin-bottom: 0;
}

.solution-card ul li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.solution-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(240, 60, 2, 0.08);
    line-height: 1;
}

/* --- Law Card --- */
.law-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px 20px;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    border: 1px solid var(--border-card);
}

.law-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.law-card-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.law-icon-dark {
    width: 50px;
    height: 50px;
    background: var(--gradient);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.law-icon-dark i {
    font-size: 1.25rem;
    color: #fff;
    line-height: 1;
}

.law-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.law-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.law-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.law-card ul li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 8px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
    text-align: left;
}

.law-card ul li:last-child {
    margin-bottom: 0;
}

.law-card ul li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.law-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 3rem;
    font-weight: 700;
    color: rgba(240, 60, 2, 0.08);
    line-height: 1;
}

/* --- Info Card --- */
.info-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    border: 1px solid var(--border-card);
}

.info-card:hover {
    box-shadow: var(--shadow-hover);
}

.info-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary);
    display: inline-block;
}

.info-card p {
    color: #555;
    font-size: 0.93rem;
    line-height: 1.8;
    margin-bottom: 12px;
}

.info-card p:last-child {
    margin-bottom: 0;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin: 15px 0 0;
}

.info-card ul li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
}

.info-card ul li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 1px;
    color: var(--primary);
    font-weight: bold;
    font-size: 0.9rem;
}

.info-card strong {
    color: var(--primary);
}

/* --- Formula Box --- */
.formula-box {
    background: var(--primary-bg);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 18px 22px;
    margin: 20px 0;
}

.formula-box p {
    margin-bottom: 8px;
    font-size: 0.93rem;
    color: #555;
}

.formula-box p:last-child {
    margin-bottom: 0;
}

.formula-box code {
    background: rgba(240, 60, 2, 0.1);
    color: var(--primary);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* --- Section with Background --- */
.special-section {
    padding: 10px 0;
}

.special-section.section-bg {
    background: var(--bg-light);
}

.special-section .section-title {
    text-align: center;
    margin-bottom: 30px;
}

.special-section .section-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
}

.special-section .section-title p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
}

/* --- Process Item --- */
.process_item {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-sm);
    padding: 15px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text);
    transition: var(--transition);
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.process_item:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* ========================================
   Misc Utilities
   ======================================== */

.text-danger {
    color: var(--primary) !important;
}

.btn:active {
    transform: scale(0.97);
}

.tooltip-inner {
    background: var(--text);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    max-width: 300px;
    line-height: 1.5;
}

.is_dead {
    display: block !important;
}

.is_injury {
    display: block !important;
}

tr.is_dead {
    display: table-row !important;
}

tr.is_injury {
    display: table-row !important;
}

#batchAmounts {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.88rem;
    transition: var(--transition);
    resize: vertical;
    max-height: 200px;
    min-height: 120px;
    background: #fff;
}

#batchAmounts:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
    outline: none;
}

#converterTabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 1.1rem;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: var(--transition);
}

#converterTabs .nav-link.active {
    background: var(--bg-light);
    border-color: var(--border) var(--border) #fff;
    font-weight: 600;
    color: var(--primary);
}

#converterTabs .nav-link:hover:not(.active) {
    color: var(--primary);
    border-color: transparent;
}

#help .text-center {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 14px;
    transition: var(--transition);
}

#help .text-center:hover {
    box-shadow: var(--shadow);
}

#help .text-center i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 8px;
    display: block;
}

.amount-display {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.card {
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
}

.card-header {
    border-bottom: none;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

#tools_form {
    animation: fadeIn 0.5s ease;
}

#tools_result {
    animation: slideIn 0.4s ease;
}

/* ========================================
   Responsive - 768px
   ======================================== */

@media (max-width: 768px) {
    #tools {
        padding: 20px 0 40px;
    }

    #tools_form {
        padding: 20px 16px;
        border-radius: 10px;
    }

    #tools_form .form-label {
        font-size: 0.82rem;
    }

    #tools_form .input-group-text {
        font-size: 0.78rem;
        padding: 8px 10px;
    }

    #tools_form .btn {
        width: 100%;
        margin: 4px 0;
    }

    #tools_result .section-inner {
        padding: 20px 16px;
    }

    #tools_result .result-title {
        font-size: 1.2rem;
    }

    .table thead th {
        padding: 10px 8px;
        font-size: 0.8rem;
    }

    .table tbody td {
        padding: 10px 8px;
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .modal-dialog {
        margin: 12px;
    }

    .process-card,
    .solution-card,
    .law-card {
        padding: 20px 15px;
    }

    .process-icon-dark,
    .solution-icon-dark,
    .law-icon-dark {
        width: 40px;
        height: 40px;
    }

    .process-icon-dark i,
    .solution-icon-dark i,
    .law-icon-dark i {
        font-size: 1rem;
    }

    .process-title,
    .solution-title,
    .law-title {
        font-size: 1.1rem;
    }

    .process-number,
    .solution-number,
    .law-number {
        font-size: 2rem;
        top: 5px;
        right: 10px;
    }
}

/* ========================================
   Responsive - 576px
   ======================================== */

@media (max-width: 576px) {
    .breadcrumbs h2 {
        font-size: 1.25rem;
    }

    #tools_form {
        padding: 16px 12px;
        border-radius: 8px;
    }

    #tools_form .form-label {
        font-size: 0.8rem;
    }

    #tools_form .form-select {
        font-size: 14px;
        padding: 9px 34px 9px 12px;
    }

    #tools_form .input-group-text {
        font-size: 0.75rem;
        padding: 8px;
    }

    #tools_form .btn {
        padding: 10px 18px;
        font-size: 0.88rem;
    }

    #tools_result {
        margin-top: 20px;
    }

    #tools_result .result-title {
        font-size: 1.1rem;
    }

    #tools_result .section-inner {
        padding: 16px 12px;
    }

    .table thead th {
        font-size: 0.75rem;
        padding: 8px 6px;
    }

    .table tbody td {
        padding: 8px 6px;
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .table tbody tr.table-primary .total_fee_label {
        font-size: 1rem;
    }

    .modal-header {
        padding: 14px 18px;
    }

    .modal-body {
        padding: 18px 16px;
    }

    .modal-footer {
        padding: 14px 18px;
    }

    .icon-box {
        padding: 18px 12px;
        margin: 6px 0;
    }

    .special-section .section-title h2 {
        font-size: 1.35rem;
    }
}

/* ========================================
   Image Tool Styles
   ======================================== */

.image-tool-wrapper {
    padding: 28px 32px;
}

.image-tool-wrapper .image-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.image-tool-wrapper .image-title i {
    color: var(--primary);
    font-size: 1.5rem;
}

.image-tool-wrapper .image-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.image-tool-wrapper .image-drop-zone {
    background: var(--bg-light);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 24px;
}

.image-tool-wrapper .image-drop-zone:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.image-tool-wrapper .image-drop-zone i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    display: block;
}

.image-tool-wrapper .image-drop-zone p {
    margin: 12px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.image-tool-wrapper .file-upload-wrapper {
    margin-top: 16px;
}

.image-tool-wrapper .file-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.image-tool-wrapper .file-upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    background: var(--gradient);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(240, 60, 2, 0.25);
}

.image-tool-wrapper .file-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(240, 60, 2, 0.35);
}

.image-tool-wrapper .file-upload-btn:active {
    transform: translateY(0);
}

.image-tool-wrapper .file-upload-btn i {
    font-size: 1.1rem;
}

.image-tool-wrapper .image-settings-card {
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    height: 100%;
}

.image-tool-wrapper .image-settings-card .card-header {
    background: var(--gradient);
    border-bottom: none;
    padding: 14px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    border-radius: var(--radius) var(--radius) 0 0;
}

.image-tool-wrapper .image-settings-card .card-body {
    padding: 20px;
}

.image-tool-wrapper .image-settings-card .form-group {
    margin-bottom: 16px;
}

.image-tool-wrapper .image-settings-card .form-group:last-child {
    margin-bottom: 0;
}

.image-tool-wrapper .image-settings-card .col-form-label {
    font-size: 0.85rem;
    color: var(--text);
    padding-top: 8px;
    padding-bottom: 8px;
}

.image-tool-wrapper .image-settings-card .form-control,
.image-tool-wrapper .image-settings-card .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.85rem;
    color: var(--text);
    background: #fff;
    transition: var(--transition);
}

.image-tool-wrapper .image-settings-card .form-control:focus,
.image-tool-wrapper .image-settings-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-subtle);
    outline: none;
}

.image-tool-wrapper .image-settings-card .help-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
    padding: 0 12px;
}

.image-tool-wrapper .image-info-card {
    border: 1px solid var(--border-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    background: #fff;
    margin-bottom: 16px;
}

.image-tool-wrapper .image-info-card:last-child {
    margin-bottom: 0;
}

.image-tool-wrapper .image-info-card .card-header {
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.image-tool-wrapper .image-info-card .card-header .btn-outline-primary {
    border: 1.5px solid var(--primary);
    color: var(--primary);
    background: transparent;
    padding: 4px 10px;
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.image-tool-wrapper .image-info-card .card-header .btn-outline-primary:hover {
    background: var(--primary);
    color: #fff;
}

.image-tool-wrapper .image-info-card .card-body {
    padding: 16px;
}

.image-tool-wrapper .image-info-card .img-preview {
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    padding: 12px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-tool-wrapper .image-info-card .img-preview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

.image-tool-wrapper .image-info-card dl.row {
    margin-bottom: 0;
}

.image-tool-wrapper .image-info-card dt {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 400;
    padding: 4px 0;
}

.image-tool-wrapper .image-info-card dd {
    font-size: 0.82rem;
    color: var(--text);
    padding: 4px 0;
}
