.ibn-tool-page { padding: 40px 0 60px; }
.ibn-tool-header { text-align: center; margin-bottom: 40px; }
.ibn-tool-title { font-size: 32px; font-weight: 800; color: #12172b; margin-bottom: 12px; }
.ibn-tool-excerpt { font-size: 16px; color: #64748b; max-width: 600px; margin: 0 auto; }

/* Tool App Container */
.ibn-tool-app { background: #f8f9fa; border: 1px solid #e2e8f0; border-radius: 16px; padding: 32px; margin-bottom: 40px; }
.ibn-tool-app label { display: block; font-weight: 600; color: #334155; margin-bottom: 6px; font-size: 14px; }
.ibn-tool-app input[type="number"],
.ibn-tool-app input[type="text"],
.ibn-tool-app select { width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; background: #fff; transition: border-color .2s; }
.ibn-tool-app input:focus, .ibn-tool-app select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.ibn-tool-app .ibn-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.ibn-tool-app .ibn-form-group { margin-bottom: 16px; }
.ibn-tool-app .ibn-btn { display: inline-block; padding: 14px 32px; background: #2563eb; color: #fff; border: none; border-radius: 8px; font-size: 16px; font-weight: 600; cursor: pointer; transition: background .2s; }
.ibn-tool-app .ibn-btn:hover { background: #1d4ed8; }
.ibn-tool-app .ibn-btn-secondary { background: #64748b; }
.ibn-tool-app .ibn-btn-secondary:hover { background: #475569; }

/* Results */
.ibn-result { background: #fff; border: 2px solid #2563eb; border-radius: 12px; padding: 24px; margin-top: 24px; }
.ibn-result-title { font-size: 14px; color: #64748b; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.ibn-result-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid #f1f5f9; }
.ibn-result-row:last-child { border-bottom: none; }
.ibn-result-label { color: #475569; font-size: 15px; }
.ibn-result-value { font-size: 18px; font-weight: 700; color: #12172b; }
.ibn-result-value.highlight { color: #2563eb; font-size: 24px; }

/* Tool Content (SEO text below) */
.ibn-tool-content { margin-top: 40px; padding-top: 32px; border-top: 1px solid #e2e8f0; }
.ibn-tool-content h2 { font-size: 22px; margin: 24px 0 12px; }
.ibn-tool-content p { color: #475569; line-height: 1.7; }

/* Archive Grid */
.ibn-tools-archive { padding: 40px 0 60px; }
.ibn-tools-archive-title { font-size: 36px; font-weight: 800; color: #12172b; }
.ibn-tools-archive-desc { font-size: 16px; color: #64748b; margin-top: 8px; }
.ibn-tools-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.ibn-tool-card { display: flex; flex-direction: column; padding: 0; background: #fff; border-radius: 20px; text-decoration: none; transition: all .35s ease; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.06); border: 1px solid transparent; }
.ibn-tool-card:hover { box-shadow: 0 12px 40px rgba(37,99,235,.12); transform: translateY(-6px); border-color: #2563eb; }
.ibn-tool-card-icon { width: 100%; height: 140px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%); font-size: 48px; color: #2563eb; position: relative; }
.ibn-tool-card:nth-child(2) .ibn-tool-card-icon { background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%); color: #16a34a; }
.ibn-tool-card:nth-child(3) .ibn-tool-card-icon { background: linear-gradient(135deg, #fefce8 0%, #fef3c7 100%); color: #ca8a04; }
.ibn-tool-card:nth-child(4) .ibn-tool-card-icon { background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%); color: #db2777; }
.ibn-tool-card:nth-child(5) .ibn-tool-card-icon { background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%); color: #7c3aed; }
.ibn-tool-card-icon img { width: 56px; height: 56px; object-fit: contain; }
.ibn-tool-card-icon i { font-size: 48px; }
.ibn-tool-card-body { padding: 24px 28px 28px; display: flex; flex-direction: column; flex: 1; }
.ibn-tool-card-title { font-size: 20px; font-weight: 800; color: #12172b; margin: 0 0 10px; line-height: 1.3; }
.ibn-tool-card-desc { font-size: 14px; color: #64748b; margin: 0 0 20px; flex: 1; line-height: 1.6; }
.ibn-tool-card-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: #2563eb; padding: 10px 20px; background: #eff6ff; border-radius: 8px; transition: all .2s; align-self: flex-start; }
.ibn-tool-card:hover .ibn-tool-card-btn { background: #2563eb; color: #fff; }
.ibn-tool-card-btn i { transition: transform .2s; }
.ibn-tool-card:hover .ibn-tool-card-btn i { transform: translateX(4px); }

@media (max-width: 768px) {
    .ibn-tools-grid { grid-template-columns: 1fr; }
    .ibn-tool-app .ibn-form-row { grid-template-columns: 1fr; }
    .ibn-tool-title { font-size: 24px; }
    .ibn-tool-app { padding: 20px; }
}

/* Tools Menu Button in Header */
.ibn-menu-tools-btn > a {
    background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
    color: #fff !important;
    padding: 8px 20px !important;
    border-radius: 8px !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    letter-spacing: 0.5px;
    transition: all .3s ease !important;
    text-transform: uppercase;
}
.ibn-menu-tools-btn > a:hover {
    background: linear-gradient(135deg, #1d4ed8, #6d28d9) !important;
    box-shadow: 0 4px 15px rgba(37,99,235,.35) !important;
    transform: translateY(-1px);
}

/* === Invoice Generator Styles === */
.ibn-invoice-wrap { max-width: 100%; }
.ibn-inv-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid #e2e8f0; }
.ibn-inv-section:last-of-type { border-bottom: none; }
.ibn-inv-section-title { font-size: 16px; font-weight: 700; color: #12172b; margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.ibn-inv-section-title i { color: #2563eb; font-size: 18px; }

/* Items Table */
.ibn-inv-table { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.ibn-inv-table th { padding: 10px 12px; text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: #64748b; background: #f1f5f9; border-radius: 6px; font-weight: 700; }
.ibn-inv-table td { padding: 8px 4px; vertical-align: middle; }
.ibn-inv-table input { width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 6px; font-size: 14px; background: #fff; }
.ibn-inv-table input:focus { border-color: #2563eb; outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.08); }
.ibn-inv-item-total { font-weight: 700; color: #12172b; text-align: right; padding-right: 8px !important; white-space: nowrap; }
.ibn-inv-remove-btn { background: none; border: none; color: #dc2626; font-size: 22px; cursor: pointer; padding: 4px 8px; border-radius: 4px; transition: background .2s; }
.ibn-inv-remove-btn:hover { background: #fef2f2; }
.ibn-inv-add-btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 20px; background: #eff6ff; color: #2563eb; border: 1px dashed #93c5fd; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }
.ibn-inv-add-btn:hover { background: #dbeafe; border-color: #2563eb; }

/* VAT Toggle */
.ibn-inv-vat-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: #334155; cursor: pointer; }
.ibn-inv-vat-toggle input { width: 18px; height: 18px; accent-color: #2563eb; }

/* Totals */
.ibn-inv-totals { margin-left: auto; max-width: 340px; background: #f8fafc; border-radius: 12px; padding: 20px 24px; }
.ibn-inv-total-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; color: #475569; border-bottom: 1px solid #e2e8f0; }
.ibn-inv-total-row:last-child { border-bottom: none; }
.ibn-inv-grand-total { font-size: 22px; font-weight: 800; color: #2563eb; border-top: 2px solid #2563eb; border-bottom: none; padding-top: 12px; margin-top: 4px; }

/* Textarea */
.ibn-tool-app textarea { width: 100%; padding: 12px 16px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; resize: vertical; }
.ibn-tool-app textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }

/* Action Buttons */
.ibn-inv-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.ibn-inv-actions .ibn-btn { display: inline-flex; align-items: center; gap: 8px; }
.ibn-inv-actions .ibn-btn i { font-size: 16px; }

/* ── Lari rates block on the currency converter page ─────────────────── */
.ibn-rates { margin: 8px 0 36px; }
.ibn-rates-head h2 { font-size: 24px; font-weight: 800; color: #12172b; margin: 0 0 6px; }
.ibn-rates-head p { color: #64748b; font-size: 14.5px; margin: 0 0 20px; }
.ibn-rates-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 12px;
    margin-bottom: 30px;
}
.ibn-rate-card {
    border: 1px solid #eef0f6;
    border-radius: 16px;
    background: #fff;
    padding: 14px 16px 6px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    overflow: hidden;
}
.ibn-rate-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ibn-rate-code { font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #475569; }
.ibn-rate-diff { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ibn-rate-card.is-up .ibn-rate-diff { color: #16a34a; }
.ibn-rate-card.is-down .ibn-rate-diff { color: #dc2626; }
.ibn-rate-card.is-flat .ibn-rate-diff { color: #94a3b8; }
.ibn-rate-value { font-size: 27px; font-weight: 800; color: #0f172a; line-height: 1.2; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ibn-rate-value small { font-size: 16px; font-weight: 700; color: #64748b; }
.ibn-rate-name { font-size: 12.5px; color: #64748b; margin-top: 2px; }
.ibn-rate-spark { display: block; width: calc(100% + 32px); height: 46px; margin: 8px -16px -6px; }

.ibn-rates-table-wrap h3 { font-size: 18px; font-weight: 700; color: #12172b; margin: 0 0 12px; }
.ibn-rates-table { width: 100%; border-collapse: collapse; font-size: 14.5px; border: 1px solid #eef0f6; border-radius: 14px; overflow: hidden; }
.ibn-rates-table th {
    text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em;
    color: #64748b; font-weight: 700; background: #f8f9fc; padding: 10px 14px; border-bottom: 1px solid #eef0f6;
}
.ibn-rates-table td { padding: 10px 14px; border-bottom: 1px solid #f1f3f9; color: #334155; }
.ibn-rates-table tbody tr:last-child td { border-bottom: 0; }
.ibn-rates-table td span { color: #94a3b8; font-size: 13px; }
.ibn-rate-num { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 600; }
.ibn-rate-num.is-up { color: #16a34a; }
.ibn-rate-num.is-down { color: #dc2626; }
.ibn-rate-num.is-flat { color: #94a3b8; }
.ibn-rates-source { color: #94a3b8; font-size: 12.5px; margin-top: 10px; }

@media (max-width: 767px) {
    .ibn-rates-cards { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
    .ibn-rate-value { font-size: 23px; }
    .ibn-rates-table { font-size: 13.5px; }
    .ibn-rates-table th, .ibn-rates-table td { padding: 9px 10px; }
    .ibn-rates-table td span { display: none; }
}
.ibn-rates-table-scroll { max-height: 520px; overflow-y: auto; border-radius: 14px; }
.ibn-rates-table-scroll .ibn-rates-table { border-radius: 0; }
.ibn-rates-table-scroll thead th { position: sticky; top: 0; z-index: 1; }
