/* =========================
   FONTS – MINDIG LEGELŐL
   ========================= */

@font-face {
    font-family: 'NotoSans SemiCondensed';
    src: url('fonts/NotoSans-SemiCondensed-Regular.woff2') format('woff2');

    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'NotoSans SemiCondensed';
    src: url('fonts/NotoSans-SemiCondensed-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* =========================
   BASE / RESET
   ========================= */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fefefe;
    margin: 0;
    padding: 0;
}


    .container {
        max-width: 1600px;
        margin: 40px auto;
        background: #fefefe;
        padding: 24px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }

    h2 {
        margin: 0 0 20px;
        font-size: 22px;
        color: #2c3e50;
    }

    /* Hónapválasztó */
    .toolbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 20px;
        flex-wrap: wrap;
        gap: 10px;
    }

    .toolbar > .btn-group {
        flex-shrink: 0;
    }

    select {
        padding: 8px 12px;
        font-size: 14px;
        border-radius: 2px;
        border: 1px solid #ccc;
        background: #fefefe;
    }

    /* =========================
       INFO SUCCESS MESSAGE (ZÖLD)
    ========================= */

    .info.success {
        position: relative;
        top: -6px;                       /* feljebb emeli az üzit */
        padding: 14px;                    /* feljebb emeli az üzit */
        background: #e6f4ea;              /* világos zöld */
        border-left: 5px solid #2e7d32;   /* sötétebb zöld */
        border-radius: 6px;
        color: #1b5e20;                   /* szöveg */
    }

    /* =========================
       INFO WARNING MESSAGE (SÁRGA)
    ========================= */

        .info.warning {
            position: relative;
            top: -6px;
            padding: 14px;
            background: #fff8e1;
            border-left: 5px solid #f1c40f;
            border-radius: 6px;
            color: #7a5d00;
        }

    /* =========================
       INFO ERROR MESSAGE (PIROS)
       ========================= */

    .info.error {
        position: relative;
        top: -6px;
        padding: 14px;
        background: #fdecea;              /* világos piros */
        border-left: 5px solid #c62828;   /* sötét piros */
        border-radius: 6px;
        color: #8a1c1c;                   /* szöveg */
    }


/* Tábla */
    table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    }

/* ===== TABLE COLUMN ALIGNMENT ===== */

    /* ID */
    th:nth-child(1),
    td:nth-child(1) {
        text-align: center;
        width: 60px;
    }

    /* Név */
    th:nth-child(2),
    td:nth-child(2) {
        text-align: left;
    }

    /* Bank */
    th:nth-child(3),
    td:nth-child(3) {
        text-align: left;
        white-space: nowrap;
    }

    /* Összeg */
    th:nth-child(4),
    td:nth-child(4) {
        text-align: right;
        white-space: nowrap;
    }

    /* Státusz */
    th:nth-child(5),
    td:nth-child(5) {
        text-align: center;
    }

    /* Művelet */
    th:nth-child(6),
    td:nth-child(6) {
        text-align: center;
        white-space: nowrap;
        width: 180px;
    }


    thead th {
        background: #34495e;
        color: #fff;
        text-align: left;
        padding: 10px;
        font-weight: 600;
    }

    tbody td {
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

    tbody tr:nth-child(even) {
        background: #f9fafb;
    }

    tbody tr:hover {
        background: #eef4ff;
    }

/* Üzenetek kinttartása */
    .flash-message {
        animation: fadeOut 1s ease-in-out forwards;
        animation-delay: 3s;
        }

        @keyframes fadeOut {
            from {
                opacity: 1;
                transform: translateY(0);
            }
            to {
                opacity: 0;
                transform: translateY(-10px);
            }
        }

/* Státusz badge */
    .status {
        display: inline-block;
        padding: 4px 10px;
        font-size: 12px;
        border-radius: 2px;
        font-weight: 600;
    }

    .status.active {
        background: #e6f4ea;
        color: #2e7d32;
    }

    .status.inactive {
        background: #fdecea;
        color: #c62828;
    }

    .info-card {
        background: #f8fafc;
        border-left: 4px solid #3498db;
        padding: 14px 18px;
        margin-bottom: 20px;
        border-radius: 6px;
        }

     .info-card-green {
        background: #fcfcee;
        border-left: 4px solid #fffa6a;
        padding: 14px 18px;
        margin-bottom: 20px;
        border-radius: 6px;
        }

    .deadline {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 6px;
        color: #2c3e50;
    }

    .company {
        font-size: 15px;
        color: #555;
    }

   /* =========================
   BUTTON SYSTEM
   ========================= */

    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;

        padding: 8px 14px;
        font-size: 13px;
        font-weight: 500;

        border-radius: 0px;
        border: 2px solid transparent;

        background: transparent;
        color: #1f2937;

        cursor: pointer;
        text-decoration: none;

        transition: background-color 0.15s ease,
                    color 0.15s ease,
                    border-color 0.15s ease;
    }

/* focus reset */
    .btn:focus,
    .btn:focus-visible {
        outline: none;
    }

/* =========================
   COLOR VARIANTS
   ========================= */

/* SUCCESS */
    .btn.success {
        background: #55be64;
        border: 1px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.success:hover {
        background: #68e37a;
    }

    /* BLUE */
    .btn.primary {
        background: #2563eb;
        border: 1px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.primary:hover {
        background: #1d4ed8;
    }

    /* STATUS */
    .btn.status {
        background: #177ba9;
        border: 1px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.status:hover {
        background: #32ade7;
    }

    /* GO DASHBOARD */
    .btn.go {
        background: #10b5b3;
        border: 1px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.go:hover {
        background: #31e1df;
    }

    /* NEUTRAL */
    .btn.neutral {
        background: #d2d2d2;
        border: 0px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.neutral:hover {
        background: #686868;
    }

    /* BACK */
    .btn.back {
        background: #78b8e1;
        border: 1px solid #0080d2;
        color: #fefefe;
    }

    .btn.back:hover {
        background: #99c6e2;
    }

    /* EDIT */
    .btn.edit {
        background: #f6c458;
        border: 1px solid #eda200;
        color: #fefefe;
        height: 28px;
        padding: 0 8px;
        font-size: 12px;
    }

    .btn.edit:hover {
        background: #f6ac0c;
    }

    /* Interactive útmutató */
    .btn.interactive {
        background: #ff77af;
        border: 0px solid #e56e9e;
        color: #fefefe;
    }

    .btn.interactive:hover {
        background: #e56e9e;
    }

    /* Excel */
    .btn.excel {
        background: #4694cc;
        border: 0px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.excel:hover {
        background: #1672b2;
    }

    /* PDF */
    .btn.pdf {
        background: #fcb7b4;
        border: 0px solid #7f7f7f;
        color: #fefefe;
    }

    .btn.pdf:hover {
        background: #e6736c;
    }

    /* Message */
    .btn.message {
        background: #66a0a2;
        border: 0px solid #4a8486;
        color: #fefefe;
    }

    .btn.message:hover {
        background: #4a8486;
    }

    /* Kilépés */
    .btn.kilepes {
        background: #eb5555;
        border: 0px solid #931616;
        color: #fefefe;
    }

    .btn.kilepes:hover {
        background: #931616;
    }

    /* Standard */
    .btn.standard {
        background: #52708d;
        border: 0px solid #34495e;
        color: #fefefe;
    }

    .btn.standard:hover {
        background: #34495e;
    }

    /* RED */
    .btn.danger {
        background: #fa5353;
        border: 1px solid #df0808;
        color: #fefefe;
        height: 28px;
        padding: 0 10px;
        font-size: 12px;
    }

    .btn.danger:hover {
        background: #b91c1c;
    }

/* =========================
   BUTTON GROUP
   ========================= */
    .btn-group {
        display: flex;
        gap: 2px;
        flex-wrap: wrap;
        align-items: center;
    }

    .btn-group > form {
        display: inline-flex;
    }

/* =========================
   BUTTON ANIM
   ========================= */
    .btn {
        transition:
            transform 0.08s ease,
            box-shadow 0.08s ease,
            background-color 0.15s ease,
            border-color 0.15s ease;
            flex-shrink: 0;

            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 10px 16px;
            font-size: 14px;
            line-height: 1;
            border-radius: 2px;
            text-decoration: none;
            cursor: pointer;
    }

    .btn:active {
        transform: scale(0.96);
        box-shadow: inset 0 2px 4px rgba(0,0,0,0.15);
    }

    .countdown-red {
        color: #d93025;
        font-weight: 600;
    }

/* ===== MOBIL: KÁRTYA NÉZET ===== */
@media (max-width: 768px) {

  .container {
    margin: 16px auto !important;
    padding: 16px !important;
    max-width: 100%;
    box-sizing: border-box;
  }

  table {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  table, thead, tbody, tr, th, td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  thead { display: none; }

  tbody tr {
    margin: 0 auto 14px auto;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    padding: 12px;
    background: #fff;
    box-shadow: 0 6px 16px rgba(0,0,0,0.06);
    max-width: 100%;
  }

  tbody td {
    border: 1 !important; /* kártyák sorainak vonalai */
    padding: 10px 0 !important;
    text-align: left !important;
    width: 100% !important;
    white-space: normal !important;
  }

  tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
  }

  /* label */
  tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.2;
    min-width: 90px;
    flex: 0 0 90px;
  }

  tbody td {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  tbody td[data-label="Státusz"] {
    align-items: center;
  }

  tbody td[data-label="Művelet"] {
    padding-top: 12px !important;
    margin-top: 6px;
    border-top: 1px dashed #e5e7eb;
    align-items: flex-start;
  }

  tbody td[data-label="Művelet"] .btn-group {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
  }

  tbody td[data-label="Művelet"] .btn {
    width: auto;
    flex: 0 0 auto;
  }

  tbody td[data-label="Művelet"] .btn {
    min-width: 120px;
  }
}

 /* MENU TOOLBAR GOMBOK – egységes szélesség */
@media (max-width: 768px) {

  .toolbar .btn-group {
    width: 80%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  /* Minden gomb */
  .toolbar .btn-group .btn {
    width: 100%;
    border-radius: 2px;
    box-sizing: border-box;
    justify-content: center;
    text-align: center;
    display: flex; /* EZ HIÁNYZOTT a status gombnál */
  }

  /* A form elem is legyen teljes szélesség */
  .toolbar .btn-group form {
    width: 100%;
    display: flex;
  }

  /* A formhoz kötött status gomb kényszerítése */
  .toolbar .btn-group .btn.status {
    width: 100%;
  }


  /* ===== TÁBLA MŰVELET GOMBOK MARADJANAK VÍZSZINTESEN ===== */
  tbody td[data-label="Művelet"] .btn-group {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    width: 100%;
  }

  tbody td[data-label="Művelet"] .btn-group .btn {
    width: auto;
    flex: 0 0 auto;
  }

  body { overflow-x: hidden; }
}

/* LOGIN SYSTEM */
.login-options {
    margin-top: 14px;
    font-size: 12px;
    text-align: center;
}

.login-terms {
    display: inline-flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
    text-align: left;
}

/* natív checkbox elrejtve */
.login-terms input {
    position: absolute;
    opacity: 0;
}

/* doboz */
.checkmark {
    width: 18px;
    height: 18px;
    border: 1px solid #9ca3af;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    position: relative;
    flex-shrink: 0;
}

.login-terms input:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

/* pipa */
.login-terms input:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.login-terms-text {
    max-width: 280px;
}

.login-terms a {
    color: #2563eb;
    text-decoration: none;
}

.login-terms a:hover {
    text-decoration: underline;
}


/* LOGIN OPTIONS */
    .login-options label{
        display: inline-flex;
        align-items: center;
        gap: 6px;
        line-height: 1.4;
    }

    .login-options input[type="checkbox"]{
        margin: 0;
    }

    .login-options a{
        color: #2563eb;
        text-decoration: none;
    }

    .login-options a:hover{
        text-decoration: underline;
    }

    .login-forgot{
        margin-top: 15px;
        text-align: center;
    }

    .login-forgot a{
        font-size: 14px;
        color: #b6b6b6;
        text-decoration: none;
    }

    .login-forgot a:hover{
        color: #5e5e5e;
    }

    /* FOOTER */
    .login-footer {
        position: fixed;
        bottom: 10px;
        width: 100%;
        text-align: center;
        font-size: 12px;
        color: #6b7280;
    }

    .login-footer {
        left: 0;
        right: 0;
    }

    .login-footer a {
        color: #272727;
        text-decoration: none;
    }

    .login-footer a:hover {
        color: #1f2937;
        text-decoration: none;
    }

    .login-form.disabled {
        opacity: 0.35;
        pointer-events: none;
        filter: grayscale(1);
    }

   /* ERROR */
    .login-error {
        margin-bottom: 16px;
    }

/* ===== TABLE SEARCH ===== */
.table-filters {
    display: flex;
    gap: 10px;
    align-items: center;
}

.table-filters input[type="text"] {
    height: 34px;
    padding: 0 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
    min-width: 200px;
}

.table-filters input:focus {
    outline: none;
    border-color: #2563eb;
}

/* MOBILON TABLE SEARCH */
@media (max-width: 768px) {
   .table-filters {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .table-filters input {
    width: 74%;
    max-width: 320px;
  }

  .table-filters .month-select {
    width: 100%;
    margin: 0 auto;
    display: block;
  }
}

/* MOBILON FOOTER */
    @media (max-width: 768px) {
    .login-footer {
        position: static;
        margin-top: 40px;
        padding-bottom: env(safe-area-inset-bottom);
    }
  }

    /* ===== LOGIN PAGE===== */
    .login-page {
        max-width: 420px;
        margin: 80px auto 0;
        text-align: center;
    }

    /* BRAND */
    .login-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;

        opacity: 0;
        transform: translateY(-30px);
        transition: all 0.6s ease;
    }

    .login-company {
        font-size: 14px;
        color: #1f2937;
        margin-top: 4px;
    }

    .brand-text {
        font-family: 'Noto Sans SemiCondensed', system-ui, sans-serif;
    }

    .brand-bold {
        font-weight: 700; /* Bold font-face */
    }

    .login-brand.animate {
        opacity: 1;
        transform: translateY(0);
    }

    .login-logo {
        max-width: 90px;
        margin-bottom: 8px;
    }

    .login-company {
        font-size: 14px;
        color: #1f2937;
    }

    /* TITLE */
    .login-title {
        margin: 0 0 6px;
        font-size: 32px;
        font-weight: 500;
        color: #1f2937;

        opacity: 0;
        transform: translateX(40px);
        transition: all 0.6s ease;
    }

    .login-title.animate {
        opacity: 1;
        transform: translateX(0);
    }

    .login-version {
        font-size: 12px;
        color: #6b7280;
        margin-bottom: 24px;

        opacity: 0;
        transform: translateX(-40px);
        transition: all 0.6s ease;
    }

    .login-version.animate {
        opacity: 1;
        transform: translateX(0);
    }

    /* FORM */
    .login-form input {
        width: 55%;
        padding: 12px 14px;
        margin-bottom: 14px;
        font-size: 15px;

        border-radius: 1px;
        border: 1px solid #d1d5db;
    }

    .login-form input:focus {
        outline: none;
        border-color: #2563eb;
    }

    /* BUTTON */
    .login-btn {
        width: 40%;
        padding: 10px 12px;
        margin-top: 6px;

        background: #2563eb;
        color: #fefefe;
        font-size: 15px;
        font-weight: 500;

        border: none;
        border-radius: 1px;
        cursor: pointer;
    }

    .login-btn:hover {
        background: #1d4ed8;
    }


 /* ===== LOGIN BUTTON ANIMÁCIÓ ===== */

    .login-btn {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }

    .login-btn.animate {
        opacity: 1;
        transform: translateX(0);
    }

/* ===== LOGIN INPUT ANIMÁCIÓ ===== */

.login-input {
    opacity: 0;
    transform: translateX(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* balról */
.login-input-left {
    transform: translateX(-30px);
}

/* jobbról */
.login-input-right {
    transform: translateX(30px);
}

/* animate állapot */
.login-input.animate {
    opacity: 1;
    transform: translateX(0);
}

/* ===== FORGOT PANEL ===== */

.forgot-panel {
    display: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-6px);
}


/* aktív állapot */
.forgot-panel.active {
    display: block;
    max-height: 300px;
    opacity: 1;
    transform: translateY(0);
}

/* szöveg */
.forgot-text {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

/* inputok */
.forgot-panel input {
    width: 55%;
    padding: 12px 14px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

/* gomb */
.forgot-btn {
    width: 40%;
    padding: 12px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    cursor: pointer;
}

.forgot-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.forgot-btn:hover {
    background: #111;
}


/* =========================
   FLASH POPUP DATA TABLE MESSAGE
========================= */

.flash-popup {
    position: relative;
    margin-bottom: 16px;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;

    opacity: 0;
    transform: translateY(-10px);
    animation: flashInOut 4.5s ease forwards; /* üzenet idejének kintartása 4mp*/
}

.flash-popup.success {
    background: #e6f4ea;
    border-left: 5px solid #2e7d32;
    color: #1b5e20;
}

.flash-popup.error {
    background: #fdecea;
    border-left: 5px solid #c62828;
    color: #8a1c1c;
}

@keyframes flashInOut {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    15% {
        opacity: 1;
        transform: translateY(0);
    }
    80% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-6px);
    }
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal {
    background: #fefefe;
    width: 500px;
    max-width: 90%;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* ===== FORM ===== */
.modal form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modal label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* ===== INPUTOK ===== */
.modal input,
.modal select,
.modal textarea {
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px 10px;
    background: #fefefe;
}

.modal input,
.modal select {
    height: 36px;
}

.modal textarea {
    resize: vertical;
    min-height: 120px;
}

.modal input:disabled {
    background: #f3f4f6;
    color: #6b7280;
}

/* ===== GOMBOK ===== */
.modal .btn-group {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
    gap: 2px;
}

/* ===== CÉGLISTA ===== */
.company-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 16px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
    background: #fafafa;
}

/* egy cég sor */
.company-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 400;
    color: #111827;
    cursor: pointer;
}

/* checkbox */
.company-item input {
    margin: 0;
}

/* Összes cég – teljes sor */
.company-all {
    grid-column: 1 / -1;
    font-weight: 400;
    padding-bottom: 6px;
    margin-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
}
.company-search {
    width: 97%;
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 2px;
}

.modal input.company-search {
    height: 30px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1;
}


/* ===== DESKTOP TABLE SCROLL (10 SOR) ===== */
@media (min-width: 769px) {

  .table-scroll {
    max-height: 520px;       /* kb. 10 sor */
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 2px;
  }

  .table-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
  }
}

/* ===== DESKTOP TOOLBAR FIX (NE UGORJON A GOMBSOR) ===== */
@media (min-width: 769px) {

  .toolbar-fixed {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .toolbar-fixed > div:first-child {
    justify-self: start;
    white-space: nowrap;
  }

  .toolbar-fixed > .btn-group {
    justify-self: center;
  }

  .toolbar-fixed > .table-filters {
    justify-self: end;
  }
}

