:root {
    --bg: #0b1020;
    --surface: #121a2f;
    --surface-2: #18223b;
    --card: #ffffff;
    --text: #111827;
    --muted: #64748b;
    --line: #e5e7eb;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --success: #16a34a;
    --error: #dc2626;
    --radius: 18px;
    --shadow: 0 20px 60px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: Inter, Arial, sans-serif;
    background: linear-gradient(180deg, #f8fafc 0%, #eef2ff 100%);
    color: var(--text);
}

a { text-decoration: none; color: inherit; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.8);
    border-bottom: 1px solid rgba(226,232,240,0.9);
}

.site-header-inner,
.site-footer-inner,
.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header-inner {
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 18px;
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.top-nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 14px;
}

.page {
    padding: 28px 0 48px;
}

.hero {
    background: linear-gradient(135deg, #111827, #1e3a8a 55%, #7c3aed);
    color: #fff;
    border-radius: 28px;
    padding: 40px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero h1,
.page-head h1 {
    margin: 0 0 12px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.05;
}

.hero p,
.result-note,
.result-date,
.tool-card p,
small,
.back-link {
    color: var(--muted);
}

.page-head {
    margin-bottom: 18px;
}

.back-link {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 14px;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.tool-card,
.panel,
.result-panel {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.tool-card {
    padding: 22px;
    display: flex;
    min-height: 180px;
    flex-direction: column;
    justify-content: space-between;
    transition: transform .18s ease, box-shadow .18s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(37,99,235,0.14);
}

.tool-card h2 {
    margin: 0 0 10px;
    font-size: 20px;
}

.tool-link {
    color: var(--primary);
    font-weight: 700;
}

.single-tool-wrap {
    max-width: 100%;
}

.steps-fieldset {
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 16px 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fafafa;
}

.text-left {
    text-align: left;
}

.panel {
    padding: 28px;
}

.tool-form {
    display: grid;
    gap: 14px;
}

label {
    font-size: 14px;
    font-weight: 700;
}

input[type="text"],
input[type="number"],
input[type="file"],
select,
textarea {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 13px 14px;
    background: #fff;
    font: inherit;
}

input[type="color"] {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    padding: 6px;
}

input[type="range"] {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 700;
    cursor: pointer;
}

.btn.primary {
    color: #fff;

    background: linear-gradient(135deg, #2563eb, #7c3aed);
}

.btn.primary:hover {
    filter: brightness(1.03);
}

.btn.ghost {
    background: #eef2ff;
    color: #1e3a8a;
}

.flash-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 18px;
}

.alert {
    padding: 14px 16px;
    border-radius: 14px;
    font-weight: 600;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
}

.result-panel {
    display: flex;
    gap: 18px;
    justify-content: space-between;
    align-items: center;
    padding: 20px 22px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.result-label {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
}

.result-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

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

.merge-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    margin-bottom: 10px;
}

.merge-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.merge-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 800;
}

.merge-name {
    overflow-wrap: anywhere;
}

.merge-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.site-footer {
    padding: 26px 0 40px;
    color: var(--muted);
    font-size: 14px;
}

.site-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    border-top: 1px solid rgba(226,232,240,0.9);
    padding-top: 18px;
    flex-wrap: wrap;
}

.tool-form small {
    color: var(--muted);
    line-height: 1.6;
}

.panel + .panel {
    margin-top: 18px;
}

.pdftools-wrap {
    padding: 18px 22px 30px;
}

.pdftools-page-title {
    font-size: 26px;
    margin: 0 0 12px;
    font-weight: 700;
    color: #1f2937;
}

.pdftools-subtitle {
    color: #6b7280;
    margin: 0 0 18px;
}

.pdftools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.pdftools-card,
.pdftools-panel,
.pdftools-result {
    background: #fff;
    border: 1px solid #dfe3ea;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 18px rgba(0,0,0,.05);
    text-decoration: none;
    color: inherit;
}

.pdftools-card h2,
.pdftools-panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.pdftools-card p {
    color: #5f6b7a;
    font-size: 14px;
    line-height: 1.5;
}

.pdftools-link {
    display: inline-block;
    margin-top: 12px;
    font-weight: 700;
    color: #174a8b;
    text-decoration: none;
}

.pdftools-single {
    max-width: 900px;
}

.tool-form {
    display: grid;
    gap: 12px;
}

.tool-form label {
    font-weight: 700;
    color: #1f2937;
}

.tool-form input[type="text"],
.tool-form input[type="number"],
.tool-form input[type="file"],
.tool-form input[type="color"],
.tool-form select,
.tool-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cfd6df;
    border-radius: 8px;
    background: #fff;
}

.tool-form small {
    color: #667085;
    line-height: 1.5;
}

.btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #c9d2df;
    background: #f8fafc;
    color: #1f2937;
    cursor: pointer;
    font-weight: 700;
}

.btn.primary {
    background: #174a8b;
    color: #fff;
    border-color: #174a8b;
}

.btn.ghost {
    background: #fff;
    color: #174a8b;
    border-color: #174a8b;
}

.flash-wrap {
    display: grid;
    gap: 10px;
    margin: 0 0 16px;
}

.alert {
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert.success {
    background: #e8f7ea;
    border-color: #b7e2bf;
    color: #166534;
}

.alert.error {
    background: #fdecec;
    border-color: #f1bcbc;
    color: #991b1b;
}

.pdftools-result {
    margin-bottom: 16px;
}

.pdftools-result-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.pdftools-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

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

.merge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #d7dde6;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 8px;
}

.merge-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.merge-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #dbeafe;
    color: #174a8b;
    font-weight: 700;
}

.merge-controls {
    display: flex;
    gap: 6px;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #174a8b;
    text-decoration: none;
    font-weight: 700;
}

/* ===== Integrare layout intranet / PDF Tools ===== */

body, h1, h2, h3, h4, h5, h6 {
    font-family: Verdana, sans-serif;
    color: #31408c;
}

a:link,
a:visited {
    text-decoration: none;
}

a {
    text-decoration: none;
    color: #31408c;
}

a.tabSelected {
    text-decoration: none;
    color: #ffffff;
}

a.tabSelected:hover {
    text-decoration: none;
    color: #31408c;
}

a.nonSelected {
    text-decoration: none;
    color: #31408c;
}

a.nonSelected:hover {
    text-decoration: none;
    color: #ffffff;
}

li {
    list-style: none;
}

/* ===== containere head.php ===== */

table.h1 {
    height: auto;
    border: 1px solid grey;
    width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

table.h2 {
    width: 1100px;
    border: 1px;
    margin-left: auto;
    margin-right: auto;
}

table.h3 {
    height: auto;
    border: 0px solid grey;
    width: 1108px;
    margin-left: auto;
    margin-right: auto;
}

table.tbl1 {
    width: 1100px;
    margin-left: auto;
    margin-right: auto;
	
}

table.tbl2{
	height:auto;
	border: 1px solid grey;
	width:1108px;
	margin-left:auto; 
    margin-right:auto;
}

table.tbl3 {
    width: 100%;
    table-layout: fixed;
}

table.f1 {
    width:1100px; 
    margin-left:auto; 
    margin-right:auto;
}

/* ===== tabs generale ===== */

ul.tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
    width: 1100px;
    margin: 18px auto 24px;
    border-bottom: 1px solid #DAE0E7;
    background: #F9F9F9;
    list-style: none;
    padding: 12px 12px 0;
    box-sizing: border-box;
}

.tab {
    float: left;
    height: 50px;
    margin: 0 8px -1px 0;
    border: 1px solid #DAE0E7;
    background: #F9F9F9;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
}

.tab,
.tab a {
    transition: all .25s;
}

.tab a {
    display: inline-block;
}

.tab a:first-child {
    padding: 8px;
    white-space: nowrap;
}

.tab:hover {
    background: grey;
    color: blue;
}

.tabSelected {
    height: 45px;
    border-bottom: none;
    background: grey;
    text-decoration: none;
    color: red;
}

/* ===== tabs aplicație (cele care te interesează pentru pdf_tools/menu.php) ===== */

.tab-app {
    display: block;
    margin: 0;
    padding: 0;
    border: 1px solid #DAE0E7;
    background: #e0f0f7;
    border-radius: 8px 8px 0 0;
    overflow: hidden;
    height: 44px;
    box-sizing: border-box;
}

.tab-app:hover {
    background: grey;
}

.tab-app.is-active {
    background: grey;
    height: 44px; /* IMPORTANT: aceeași înălțime */
    border-bottom: 1px solid #DAE0E7;
}

.tab-app a {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 12px;
    white-space: nowrap;
    text-decoration: none;
    box-sizing: border-box;
    transition: all .25s;
    font-weight: bold;
}

.tab-link {
    color: #31408c;
}

.tab-link:hover {
    color: #ffffff;
}

.tab-link-active {
    color: #ffffff;
}

.tab-link-active:hover {
    color: #ffffff;
}

.tab-app,
.tab-app a {
    transition: all .25s;
}

.tab-app a {
    display: inline-block;
}

.tab-app a:first-child {
    padding: 8px;
    white-space: nowrap;
}

.tab-app:hover {
    background: grey;
    color: blue;
}

.tabSelected-app {
    height: 45px;
    border-bottom: none;
    background: grey;
    text-decoration: none;
    border-radius: 8px 8px 0 0;
    color: white;
}

/* ===== util pentru wrapper-ul nostru ===== */

.pdftools-wrap {
    width: 1100px;
    margin: 0 auto;
    padding: 10px 0 30px;
}

.pdftools-page-title {
    font-size: 22px;
    font-weight: bold;
    margin: 0 0 12px;
    color: #31408c;
}

.pdftools-subtitle {
    color: #666;
    margin: 0 0 18px;
}

.pdftools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: start;
}

.pdftools-card,
.pdftools-panel,
.pdftools-result {
    background: #fff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    padding: 24px 28px;
    box-shadow: 0 6px 18px rgba(0,0,0,.06);
    box-sizing: border-box;
}

.pdftools-card h2,
.pdftools-panel h2 {
    margin: 0 0 10px;
}

.pdftools-link {
    display: inline-block;
    margin-top: 12px;
    color: #31408c;
    font-weight: bold;
}

.pdftools-single {
    width: 100%;
    max-width: 1100px;
    box-sizing: border-box;
}

.back-link {
    display: inline-block;
    margin-bottom: 12px;
    color: #31408c;
    font-weight: bold;
}

/* ===== formulare ===== */

.tool-form {
    display: grid;
    gap: 12px;
}

.tool-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: bold;
}

.tool-form input[type="text"],
.tool-form input[type="password"],
.tool-form input[type="number"],
.tool-form input[type="file"],
.tool-form input[type="color"],
.tool-form select,
.tool-form textarea {
    width: 90%;
    padding: 9px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
}

.tool-form small {
    color: #666;
}

/* ===== butoane ===== */

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid #DAE0E7;
    background: #F9F9F9;
    color: #31408c;
    font: bold 14px Verdana, sans-serif;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: grey;
    color: white;
}

.btn.primary {
    background-color: #252c4f;
    color: #f5f5f5;
    border-color: #252c4f;
	text-align: left;
}

.btn.primary:hover {
    background-color: rgba(0,106,140,0.5);
    color: black;
	text-align: left;
}

.btn.ghost {
    background: #fff;
    color: #31408c;
}

/* ===== mesaje ===== */

.flash-wrap {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.alert {
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.alert.success {
    background: #e8f6ee;
    color: #0b6b2e;
    border-color: #bfe8ce;
}

.alert.error {
    background: #ffecec;
    color: #8a1f11;
    border-color: #ffc1b8;
}

.pdftools-result-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.pdftools-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ===== merge list ===== */

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

.merge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #d7dde6;
    border-radius: 8px;
    background: #f8fafc;
    margin-bottom: 8px;
}

.merge-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.merge-pos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #dbeafe;
    color: #174a8b;
    font-weight: bold;
}

.merge-controls {
    display: flex;
    gap: 6px;
}
/* cercul cu număr sup*/
.step-row-sup {
  display: flex;
  align-items: center; /* aliniază textul frumos sus */
  gap: 2px;
}
.step-number-sup {
  width: 50px;
  height: 50px;
  flex-shrink: 0;        /* NU lasă cercul să se micșoreze */

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: #4f46e5;
  color: #fff;
  line-height: 1.2;
  text-align: center;
  
  font-size: 10px;
  font-weight: 600;

  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.step-number-sup-info {
  width: 50px;
  height: 50px;
  flex-shrink: 0;        /* NU lasă cercul să se micșoreze */

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 50%;
  background: orange;
  color: #fff;
  line-height: 1.2;
  text-align: center;
  
  font-size: 12px;
  font-weight: 600;

  box-shadow: 0 6px 14px rgba(79, 70, 229, 0.35);
}

.step-content-sup {
  background: #fff;
  border-radius: 10px;
  padding: 1px 18px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  flex: 1;
}

.step-content-sup h4 {
  margin: 0 0 6px;
  font-size: 16px;
  color: #111;
}

.step-content-sup p {
  margin: 0;
  color: #555;
  line-height: 1.5;
}
.custom-file-upload {
    display: inline-block;
    padding: 10px 16px;
    cursor: pointer;
    background: #e8ff47;
    color: #000;
    font-weight: 600;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.custom-file-upload:hover {
    background: #f4ff70;
}

.custom-file-upload input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 6px;
    font-size: 0.85rem;
    color: #777;
}