/* ==========================================================================
   IP SUBNET CALCULATOR - STYLES
   Exact clone of reference image & Calculator Archive design system
   ========================================================================== */

.subnet-page-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 14px 20px 40px;
  font-family: Arial, Helvetica, sans-serif;
  color: #333333;
}

/* Top Bar: Breadcrumbs & Utility Actions */
.subnet-top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.subnet-breadcrumbs {
  font-size: 13px;
  color: #555555;
  margin-bottom: 4px;
}

.subnet-breadcrumbs a {
  color: #0844a4;
  text-decoration: none;
}

.subnet-breadcrumbs a:hover {
  text-decoration: underline;
}

.subnet-breadcrumbs .sep {
  margin: 0 4px;
  color: #888888;
}

.subnet-breadcrumbs .current {
  color: #333333;
  font-weight: normal;
}

/* Quick Action Buttons (Top) */
.subnet-top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Top Search Bar matching Requirement 2 */
.subnet-top-search-wrap {
  flex: 1;
  max-width: 380px;
  margin: 0 16px;
}

.subnet-top-search-wrap .subnet-search-dropdown-wrap {
  display: flex;
  position: relative;
  width: 100%;
}

.subnet-top-search-input {
  width: 100%;
  height: 28px;
  padding: 3px 30px 3px 8px;
  font-size: 12px;
  border: 1px solid #c4cbd3;
  border-radius: 3px;
  box-sizing: border-box;
  background-color: #ffffff;
  color: #1e293b;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.subnet-top-search-input:focus {
  outline: none;
  border-color: #0844a4;
  box-shadow: 0 0 0 2px rgba(8, 68, 164, 0.15);
}

.subnet-top-search-btn {
  position: absolute;
  right: 3px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.subnet-top-search-btn:hover {
  color: #0844a4;
}

.subnet-top-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: bold;
  color: #0844a4;
  background-color: #f6f8fa;
  border: 1px solid #d0d7de;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.subnet-top-btn:hover {
  background-color: #e8f0fe;
  border-color: #0844a4;
}

/* Page Title & Intro */
.subnet-title {
  font-size: 26px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 8px 0;
  line-height: 1.2;
}

.subnet-description {
  font-size: 13px;
  line-height: 1.5;
  color: #333333;
  margin-bottom: 20px;
}

/* Main Layout: Left Content & Right Sidebar */
.subnet-main-layout {
  display: flex;
  gap: 28px;
  align-items: flex-start;
}

.subnet-calc-col {
  flex: 1;
  min-width: 0;
}

.subnet-sidebar-col {
  width: 270px;
  flex-shrink: 0;
}

@media (max-width: 860px) {
  .subnet-main-layout {
    flex-direction: column;
  }
  .subnet-sidebar-col {
    width: 100%;
  }
  .subnet-top-search-wrap {
    order: 3;
    max-width: 100%;
    margin: 8px 0 0;
    width: 100%;
  }
}

/* Calculator Section & Card (matching Image 2) */
.subnet-calc-section {
  margin-bottom: 26px;
}

.subnet-sec-title {
  font-size: 18px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 10px 0;
  padding-bottom: 3px;
  border-bottom: 1px solid #d8e2ec;
}

.subnet-form-card {
  background-color: #f2f4f7;
  border: 1px solid #d0d7de;
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.subnet-form-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 13px;
}

.subnet-form-row:last-child {
  margin-bottom: 0;
}

.subnet-label {
  width: 120px;
  font-size: 13px;
  font-weight: normal;
  color: #333333;
  flex-shrink: 0;
}

.subnet-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Radio buttons group for Network Class */
.subnet-radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: #333333;
}

.subnet-radio-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  user-select: none;
}

.subnet-radio-group input[type="radio"] {
  cursor: pointer;
  accent-color: #0844a4;
}

/* Inputs & Selects */
.subnet-select {
  height: 28px;
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid #b8c4d0;
  border-radius: 3px;
  background-color: #ffffff;
  color: #1e293b;
  min-width: 200px;
  max-width: 320px;
  cursor: pointer;
}

.subnet-select:focus,
.subnet-input:focus {
  outline: none;
  border-color: #0844a4;
  box-shadow: 0 0 0 2px rgba(8, 68, 164, 0.15);
}

.subnet-input {
  height: 28px;
  padding: 2px 8px;
  font-size: 13px;
  border: 1px solid #b8c4d0;
  border-radius: 3px;
  background-color: #ffffff;
  color: #1e293b;
  width: 220px;
  max-width: 100%;
}

.subnet-input.ipv6-input {
  width: 290px;
}

/* Buttons Row matching Image 2 */
.subnet-btn-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  margin-left: 120px;
}

@media (max-width: 560px) {
  .subnet-form-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  .subnet-label {
    width: 100%;
  }
  .subnet-btn-row {
    margin-left: 0;
  }
  .subnet-input,
  .subnet-select {
    width: 100%;
    max-width: 100%;
  }
}

/* Green Calculate Button with play symbol ▶ */
.subnet-calc-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: #2b7d2b;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 16px;
  border: 1px solid #236723;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.05s;
}

.subnet-calc-btn:hover {
  background-color: #246824;
}

.subnet-calc-btn:active {
  transform: translateY(1px);
}

.subnet-calc-btn .calc-arrow {
  font-size: 11px;
}

/* Clear Button */
.subnet-clear-btn {
  background-color: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: normal;
  padding: 6px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.15s;
}

.subnet-clear-btn:hover {
  background-color: #cbd5e1;
  color: #0f172a;
}

/* Results Box */
.subnet-result-card {
  border: 1px solid #2b5a88;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 14px;
  margin-bottom: 24px;
  background-color: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.subnet-result-header {
  background-color: #2b5a88;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 7px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subnet-result-header .header-badge {
  background: rgba(255, 255, 255, 0.2);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: normal;
}

.subnet-result-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.subnet-res-btn {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background-color 0.15s;
}

.subnet-res-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.subnet-result-body {
  padding: 14px 16px;
}

/* Key Metrics Grid */
.subnet-key-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.subnet-metric-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 12px;
}

.subnet-metric-title {
  font-size: 11px;
  text-transform: uppercase;
  color: #64748b;
  font-weight: bold;
  margin-bottom: 4px;
  letter-spacing: 0.5px;
}

.subnet-metric-val {
  font-size: 16px;
  font-weight: bold;
  color: #0844a4;
  word-break: break-all;
}

.subnet-metric-sub {
  font-size: 11px;
  color: #64748b;
  margin-top: 2px;
}

/* Results Data Table */
.subnet-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 16px;
}

.subnet-data-table th,
.subnet-data-table td {
  padding: 6px 10px;
  text-align: left;
  border-bottom: 1px solid #edf2f7;
}

.subnet-data-table tr:hover {
  background-color: #f8fafc;
}

.subnet-data-table td.col-prop {
  width: 180px;
  color: #475569;
  font-weight: 600;
}

.subnet-data-table td.col-val {
  color: #0f172a;
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 12.5px;
}

.subnet-tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: bold;
  border-radius: 3px;
  margin-left: 6px;
  font-family: Arial, sans-serif;
}

.subnet-tag-blue { background: #e0f2fe; color: #0369a1; }
.subnet-tag-green { background: #dcfce7; color: #15803d; }
.subnet-tag-amber { background: #fef3c7; color: #b45309; }

/* Visual Chart & Bit Visualizer (Requirement 5) */
.subnet-visual-block {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 14px 16px;
  margin-top: 14px;
}

.subnet-visual-title {
  font-size: 13px;
  font-weight: bold;
  color: #0844a4;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subnet-bit-bar {
  display: flex;
  width: 100%;
  height: 28px;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
  margin-bottom: 8px;
}

.subnet-bit-bar .network-slice {
  background-color: #0844a4;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  transition: width 0.3s;
}

.subnet-bit-bar .host-slice {
  background-color: #16a34a;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  transition: width 0.3s;
}

.subnet-bit-octets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  font-family: Consolas, monospace;
  font-size: 11px;
  text-align: center;
  margin-top: 8px;
}

.subnet-octet-box {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 6px;
  border-radius: 3px;
}

.subnet-octet-box .binary-str {
  color: #0844a4;
  font-weight: bold;
  letter-spacing: 1px;
}

.subnet-octet-box .dec-str {
  color: #64748b;
  font-size: 10px;
}

/* Range Timeline Bar */
.subnet-range-diagram {
  margin-top: 14px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
}

.subnet-range-steps {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  margin: 12px 0;
}

.subnet-range-steps::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 3px;
  background: #cbd5e1;
  z-index: 1;
}

.subnet-range-step {
  position: relative;
  z-index: 2;
  background: #ffffff;
  padding: 3px 8px;
  border: 1px solid #94a3b8;
  border-radius: 4px;
  text-align: center;
  font-size: 11px;
}

.subnet-range-step.network-pt { border-color: #0844a4; color: #0844a4; font-weight: bold; }
.subnet-range-step.first-pt { border-color: #0284c7; color: #0284c7; }
.subnet-range-step.last-pt { border-color: #16a34a; color: #16a34a; }
.subnet-range-step.bcast-pt { border-color: #dc2626; color: #dc2626; font-weight: bold; }

/* Typical Subnets Table (Exact matching Image 2) */
.subnet-table-intro {
  font-size: 13px;
  color: #333333;
  margin: 22px 0 10px 0;
}

.subnet-reference-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  border: 1px solid #2b5a88;
  margin-bottom: 24px;
}

.subnet-reference-table th {
  background-color: #2b5a88;
  color: #ffffff;
  font-weight: bold;
  padding: 7px 10px;
  text-align: left;
  border: 1px solid #2b5a88;
}

.subnet-reference-table td {
  padding: 5px 10px;
  border: 1px solid #d8e2ec;
  color: #333333;
}

.subnet-reference-table tr:nth-child(even) {
  background-color: #f8fafc;
}

.subnet-reference-table tr.class-row {
  background-color: #eaeff5;
  font-weight: bold;
  color: #0844a4;
  text-align: center;
}

.subnet-reference-table tr.class-row td {
  padding: 6px 10px;
  background-color: #e2e8f0;
  border-top: 1px solid #94a3b8;
  border-bottom: 1px solid #94a3b8;
  font-size: 13.5px;
}

.subnet-reference-table tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.1s;
}

.subnet-reference-table tr.clickable-row:hover {
  background-color: #fef08a;
}

/* Fraction Arithmetic Tool (Core Requirement 1 & 6) */
.subnet-fraction-tool {
  background-color: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 16px 18px;
  margin-bottom: 26px;
}

.subnet-fraction-title {
  font-size: 16px;
  font-weight: bold;
  color: #0844a4;
  margin-bottom: 6px;
}

.subnet-fraction-desc {
  font-size: 12.5px;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 14px;
}

.subnet-fraction-calc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.subnet-fraction-input-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #ffffff;
  padding: 4px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
}

.subnet-fraction-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.subnet-fraction-stack input {
  width: 44px;
  height: 22px;
  text-align: center;
  font-size: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 2px;
}

.subnet-fraction-divider {
  width: 100%;
  height: 1px;
  background-color: #334155;
}

.subnet-fraction-op-select {
  height: 32px;
  padding: 2px 6px;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background-color: #ffffff;
}

.subnet-fraction-result {
  margin-top: 10px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid #2b5a88;
  border-radius: 4px;
  font-size: 13.5px;
  color: #0f172a;
}

/* SEO / AEO / GEO Guide Article */
.subnet-guide-article {
  font-size: 13px;
  line-height: 1.6;
  color: #333333;
  margin-top: 28px;
  border-top: 1px solid #d8e2ec;
  padding-top: 18px;
}

.subnet-guide-article h2 {
  font-size: 20px;
  font-weight: bold;
  color: #0844a4;
  margin: 0 0 12px 0;
}

.subnet-guide-article h3 {
  font-size: 15px;
  font-weight: bold;
  color: #0844a4;
  margin: 18px 0 8px 0;
}

.subnet-guide-article p {
  margin-bottom: 12px;
}

.subnet-guide-article ul,
.subnet-guide-article ol {
  margin-left: 20px;
  margin-bottom: 14px;
}

.subnet-guide-article li {
  margin-bottom: 5px;
}

.subnet-guide-article code {
  font-family: Consolas, monospace;
  background: #f1f5f9;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #0844a4;
}

/* FAQ Accordion (AEO/GEO) */
.subnet-faq-item {
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  margin-bottom: 8px;
  background: #ffffff;
  overflow: hidden;
}

.subnet-faq-q {
  padding: 10px 14px;
  font-weight: bold;
  color: #0844a4;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  user-select: none;
}

.subnet-faq-q:hover {
  background: #f1f5f9;
}

.subnet-faq-a {
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: #334155;
  border-top: 1px solid #edf2f7;
  display: none;
}

.subnet-faq-item.open .subnet-faq-a {
  display: block;
}

.subnet-faq-item.open .faq-chevron {
  transform: rotate(180deg);
}

.faq-chevron {
  transition: transform 0.2s;
  font-size: 10px;
}

/* Right Sidebar: Search Form & "Other Calculators" Card */
.subnet-sidebar-search {
  margin-bottom: 16px;
}

.subnet-sidebar-search-box {
  display: flex;
  gap: 4px;
}

.subnet-sidebar-search-input {
  width: 100%;
  height: 28px;
  padding: 2px 8px;
  font-size: 12px;
  border: 1px solid #c4cbd3;
  border-radius: 3px;
  box-sizing: border-box;
}

.subnet-sidebar-search-input:focus {
  outline: none;
  border-color: #0844a4;
  box-shadow: 0 0 0 2px rgba(8, 68, 164, 0.15);
}

.subnet-sidebar-search-btn {
  background-color: #2b5a88;
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  padding: 2px 10px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  white-space: nowrap;
}

.subnet-sidebar-search-btn:hover {
  background-color: #1e4265;
}

/* Sidebar "Other Calculators" Card */
.subnet-side-card {
  border: 1px solid #2b5a88;
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 16px;
  background-color: #ffffff;
}

.subnet-side-card-title {
  background-color: #2b5a88;
  color: #ffffff;
  font-size: 13px;
  font-weight: bold;
  padding: 6px 12px;
}

.subnet-side-card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 8px 12px;
  gap: 6px 12px;
  font-size: 12px;
}

.subnet-side-card-grid a {
  color: #0844a4;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.subnet-side-card-grid a:hover {
  text-decoration: underline;
}

.subnet-side-card-grid a.active-calc {
  font-weight: bold;
  color: #1e293b;
  pointer-events: none;
}

/* Sidebar Categories Footer */
.subnet-side-footer-links {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
  padding: 4px 6px;
}

.subnet-side-footer-links a {
  color: #0844a4;
  text-decoration: none;
}

.subnet-side-footer-links a:hover {
  text-decoration: underline;
}

/* Dropdown Search Results */
.subnet-search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  z-index: 1000;
  max-height: 280px;
  overflow-y: auto;
  display: none;
}

.subnet-search-item {
  padding: 7px 10px;
  font-size: 12px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subnet-search-item:last-child {
  border-bottom: none;
}

.subnet-search-item:hover {
  background-color: #f1f5f9;
  color: #0844a4;
}

/* Modals (History & Print) */
.subnet-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.subnet-modal-backdrop.open {
  display: flex;
}

.subnet-modal-dialog {
  background: #ffffff;
  border-radius: 6px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.subnet-modal-header {
  background: #2b5a88;
  color: #ffffff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.subnet-modal-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: bold;
}

.subnet-modal-close {
  background: transparent;
  border: none;
  color: #ffffff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

.subnet-modal-body {
  padding: 16px;
  overflow-y: auto;
  flex: 1;
}

.subnet-modal-footer {
  padding: 10px 16px;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* RTL Support for Arabic */
[dir="rtl"] {
  text-align: right;
}

[dir="rtl"] .subnet-btn-row {
  margin-left: 0;
  margin-right: 120px;
}

[dir="rtl"] .subnet-data-table th,
[dir="rtl"] .subnet-data-table td {
  text-align: right;
}

[dir="rtl"] .subnet-reference-table th,
[dir="rtl"] .subnet-reference-table td {
  text-align: right;
}

[dir="rtl"] .subnet-reference-table tr.class-row td {
  text-align: center;
}

[dir="rtl"] .subnet-guide-article ul,
[dir="rtl"] .subnet-guide-article ol {
  margin-left: 0;
  margin-right: 20px;
}

/* Print Stylesheet (Requirement 3) */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt;
  }

  .site-header,
  .subnet-top-actions,
  .subnet-top-search-wrap,
  .subnet-sidebar-col,
  .subnet-clear-btn,
  .subnet-calc-btn,
  .subnet-modal-backdrop,
  .site-footer {
    display: none !important;
  }

  .subnet-main-layout {
    display: block !important;
  }

  .subnet-calc-col {
    width: 100% !important;
  }

  .subnet-form-card {
    border: 1px solid #666666 !important;
    background: #ffffff !important;
  }

  .subnet-result-card {
    border: 1px solid #000000 !important;
    box-shadow: none !important;
    page-break-inside: avoid;
  }

  .subnet-result-header {
    background: #2b5a88 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .subnet-reference-table {
    page-break-inside: auto;
  }

  .subnet-reference-table tr {
    page-break-inside: avoid;
  }

  /* When printing from print preview modal */
  body.subnet-printing-modal .subnet-modal-backdrop#subnet-print-modal {
    display: block !important;
    position: static !important;
    background: transparent !important;
    padding: 0 !important;
  }
  body.subnet-printing-modal .subnet-modal-dialog {
    max-width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  body.subnet-printing-modal .subnet-modal-header,
  body.subnet-printing-modal .subnet-modal-footer {
    display: none !important;
  }
  body.subnet-printing-modal .site-header,
  body.subnet-printing-modal .site-footer,
  body.subnet-printing-modal .subnet-top-actions,
  body.subnet-printing-modal .subnet-calc-layout,
  body.subnet-printing-modal main {
    display: none !important;
  }
}

/* ==========================================================================
   Print Preview Modal Content Styles
   ========================================================================== */
.subnet-print-sheet {
  background: #ffffff;
  color: #0f172a;
  padding: 4px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.subnet-print-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 2px solid #0844a4;
  padding-bottom: 12px;
  margin-bottom: 16px;
}

.subnet-print-brand {
  font-size: 15px;
  font-weight: 800;
  color: #0844a4;
  letter-spacing: 0.5px;
}

.subnet-print-title {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
  margin: 3px 0 2px;
}

.subnet-print-subtitle {
  font-size: 11.5px;
  color: #64748b;
}

.subnet-print-meta {
  font-size: 11.5px;
  text-align: right;
  color: #475569;
  line-height: 1.5;
}

.subnet-print-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.subnet-print-badge {
  background: #e0e7ff;
  color: #1e3a8a;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: Consolas, monospace;
}

.subnet-print-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 12.5px;
}

.subnet-print-table th {
  background: #f1f5f9;
  text-align: left;
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  color: #1e293b;
}

.subnet-print-table td {
  padding: 6px 10px;
  border: 1px solid #cbd5e1;
  color: #334155;
}

.subnet-print-footer {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
  font-size: 11px;
  color: #94a3b8;
  display: flex;
  justify-content: space-between;
}

