:root {
    --bg-primary: #121212;
    --bg-card: #1e1e1e;
    --bg-card-hover: #2a2a2a;
    --bg-input: #333333;
    --accent-gold: #FFD700;
    --accent-gold-dark: #ccaa00;
    --accent-green: #38FF38;
    --accent-red: #dc3545;
    --text-primary: #f0f0f0;
    --text-secondary: #aaaaaa;
    --border-primary: #444444;
    --border-gold: #FFD700;
    --border-radius: 4px;
    --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.5);
    --shadow-gold: 0 0 15px rgba(255, 215, 0, 0.4);
}
* {
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family: 'Roboto Mono', monospace !important;
}
.fa, .fas, .far, .fal, .fad, .fab {
    font-family: 'Font Awesome 6 Free', 'Font Awesome 6 Pro', monospace !important;
    font-weight: 900 !important;
}
body {
    font-family: 'Roboto Mono', monospace;
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 10px;
    min-height: 100vh;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden; 
}
body.modal-open {
    overflow: hidden;
    padding-right: 15px;
}
.container {
    max-width: 1250px;
    margin: 0 auto;
    padding: 0 15px;
}
@media (max-width: 768px) {
    body {
        font-size: 14px;
    }
    .container {
        padding: 0 2px; 
        width: 100%; 
        max-width: none;
    }

    .company-list-table th:nth-child(2),
    .company-list-table td:nth-child(2),
    .company-list-table th:nth-child(3),
    .company-list-table td:nth-child(3) {
        display: none;
    }
    .company-list-table th:last-child,
    .company-list-table td:last-child {
        text-align: center !important;
    }

    #employees-table {
        min-width: 100% !important;
    }
    #employees-table thead {
        display: none;
    }
    #employees-table tbody, #employees-table tr {
        display: block;
        width: 100%;
    }
    #employees-table tr {
        margin-bottom: 10px;
        border: 1px solid var(--border-primary);
        border-radius: var(--border-radius);
        overflow: hidden;
    }
    #employees-table td {
        display: block;
        text-align: right;
        position: relative;
        border: none;
        border-bottom: 1px solid var(--border-primary);
        width: 100%;
        box-sizing: border-box;
    }
    #employees-table tr:hover {
        background-color: transparent;
    }
    #employees-table td:last-child {
        border-bottom: none;
        padding-top: 10px;
        padding-bottom: 10px;
        text-align: center !important;
    }
    
    #employees-table td:nth-child(1) {
        text-align: left;
        font-size: 1.1rem;
        font-weight: 700;
        color: var(--accent-gold);
        border-bottom: 1px solid var(--border-primary);
        padding-left: 15px;
    }
    #employees-table td:nth-child(2) {
        padding-left: 50%;
    }
    #employees-table td:nth-child(3) {
             padding-left: 15px;
    }

    #employees-table td:nth-child(2):before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: calc(50% - 15px);
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: 700;
        color: var(--accent-gold);
    }
    #employees-table td:nth-child(1):before,
    #employees-table td:nth-child(3):before {
        content: none;
    }
    
    #employees-table td:last-child a.visit-profile-link {
        display: inline-block;
        width: 80%;
        padding: 8px 15px;
        border: 1px dashed var(--accent-gold);
        border-radius: var(--border-radius);
        color: var(--accent-gold) !important;
        font-size: 1rem;
        font-weight: 600;
        background: var(--bg-primary);
        text-decoration: none;
        transition: background 0.2s;
    }
    #employees-table td:last-child a.visit-profile-link:hover {
        background: var(--bg-input);
        color: var(--accent-gold) !important;
    }

    #employees-table td:last-child a.visit-profile-link .desktop-only-icon {
        display: inline !important;
        margin-right: 5px;
    }

    #employees-table td:last-child a.visit-profile-link .mobile-only-text {
        display: inline !important;
    }


    .modal.result-modal {
        max-width: 100vw;
        width: 98vw;
    }
    .modal-content-container {
        padding-left: 5px;
        padding-right: 5px;
    }
    .result-header-modal {
        
        align-items: flex-start;
    }
    .info-group-modal {
        margin-top: 10px;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    .filter-controls > .filter-wrapper { 
        margin: 0;
        align-items: flex-start;
        width: 100%;
        max-width: 100%;
    }
    
    .filter-wrapper label {
        text-align: left !important;
        padding-right: 0;
        width: 100%;
        margin-bottom: 5px;
    }
    
    .filter-wrapper:last-child {
        display: flex;
        flex-direction: column; 
    }
    
    .filter-wrapper:last-child label {
        order: 2;
        margin-top: 10px; 
    }
    
    .filter-wrapper:last-child .filter-controls {
        order: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }

    .filter-wrapper:last-child .filter-controls select {
        order: 3;
    }

    .filter-wrapper:last-child .filter-controls button {
        order: 1;
    }
    
    .filter-wrapper .action-filter-select,
    .filter-controls button {
        width: 100%;
        max-width: 100%;
    }
    
}

@media (min-width: 769px) {
    .home-button span {
        display: inline !important;
    }
    .home-button i {
        margin-right: 0 !important;
    }
    
    #employees-table td a.visit-profile-link {
        display: inline-flex;
        width: auto;
        padding: 0;
        border: none;
        background: transparent;
        color: var(--text-primary) !important;
        font-size: 1.1rem;
        font-weight: 400;
    }
    
    #employees-table td a.visit-profile-link .mobile-only-text { 
        display: none !important;
    }
    
    #employees-table td a.visit-profile-link .desktop-only-icon {
        display: inline-block !important;
        font-size: 1.1rem;
    }

    #employees-table td:last-child {
        text-align: center !important;
    }
}


h1 {
    text-align: center;
    margin-bottom: 0px;
    font-weight: 800;
    font-size: 2.2rem;
    color: var(--accent-gold);
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.sub-header-gold {
    text-align: center;
    margin-top: 0px;
    margin-bottom: 35px;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--accent-gold);
    text-shadow: 0 0 3px rgba(255, 215, 0, 0.2);
}


@media (max-width: 768px) {
    h1 {
        font-size: 1.6rem;
        margin-bottom: 0px;
    }
    .sub-header-gold {
        font-size: 0.6rem;
        margin-bottom: 35px;
    }
}
.controls-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}
@media (min-width: 768px) {
    .controls-container {
        //* grid-template-columns: 1fr 1fr; *//
    }
}
.form-wrapper {
    width: 100%;
    margin: 0 auto;
    max-width: 1400px;

}

.form-input-full, .form-button-full {
    width: 100%;
    flex-grow: 1;
}

.add-company-info, .api-key-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-align: left;
    margin-top: 5px;
    padding: 0 0px;
}
input[type=text], input[type=password] {
    flex-grow: 1;
    padding: 12px 15px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    min-width: 100px;
    width: 100%;
}
input[type=text]:focus, input[type=password]:focus {
    outline:none;
    border-color: var(--accent-gold);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}

button {
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    white-space: nowrap;
    transition: background-color 0.3s, box-shadow 0.3s;

    
    background: var(--bg-primary); 
    color: var(--accent-gold);
    
    border: 1px dashed var(--accent-gold);
}

button:hover:not(:disabled) {
    background: var(--bg-input);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

a {
    color: var(--accent-gold);
    
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--accent-gold);
    text-decoration: none; 
}

.link-red {
    color: red;
}
.link-red:hover {
    color: #ff5050;
}

.link-green {
    color: var(--accent-green);
}
.link-green:hover {
    color: #00CC00;
}

.company-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.company-type-item {
    flex: 1 1 auto;
    min-width: 120px;
    border-radius: var(--border-radius);
    padding: 12px 15px;
    font-weight: 600;
    text-align:center;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    
    
    background: var(--bg-primary); 
    color: var(--accent-gold);
    border: 1px dashed var(--accent-gold);
}
.company-type-item.active, .company-type-item:hover, .company-type-item:focus {
    background: var(--accent-gold);
    border-color: var(--accent-gold);
    color: var(--bg-primary);
    outline: none;
}
.company-type-count {
    background: var(--bg-card);
    color: var(--accent-gold);
    border-radius: 50%;
    font-size: 0.8rem;
    padding: 4px 8px;
    margin-left: 8px;
    font-weight: 700;
    min-width: 30px;
}
.company-type-item.active .company-type-count {
    background: var(--bg-primary);
    color: var(--accent-gold);
}

.company-list-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden; 
    box-shadow: var(--shadow-md);
    margin-bottom: 5px;
}
.company-list-table tbody { 
    width: 100%;
    display: table-row-group;
}
.company-list-table thead {
    background: var(--bg-input);
    color: var(--accent-gold);
    border-bottom: 2px solid var(--border-gold);
}
.company-list-table th, .company-list-table td {
    padding: 15px;
    text-align: left;
}
.company-list-table th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
}
.company-list-table tbody tr {
    border-bottom: 1px solid var(--border-primary);
    transition: background-color 0.2s ease;
}
.company-list-table tbody tr:last-child {
    border-bottom: none;
}
.company-list-table tbody tr:hover, .company-list-table tbody tr:focus-within {
    background: var(--bg-card-hover);
}
.company-list-table tbody td {
    color: var(--text-primary);
}
.company-list-table tbody tr:hover td {
    color: var(--text-primary);
}

.table-responsive {
    overflow-x: auto;
    width: 100%;
}

#employee-result {
    display: none !important; 
}


.modal-content-container {
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    padding-top: 15px;
    color: var(--text-primary);
}

.modal.result-modal ::-webkit-scrollbar {
    width: 0px;
    background: transparent;
}
.modal.result-modal {
    scrollbar-width: none;
}


.modal.result-modal {
    position: relative;
    max-width: 95vw;
    width: 900px;
    padding: 30px 25px;
    overflow: hidden;
}

.close-modal-x {
    position: absolute;
    top: 0px;
    right: 5px;
    width: 40px;
    height: 40px;
    padding: 0;
    margin: 0;
    border: none !important;
    background: transparent !important;
    color: #dc3545;
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    z-index: 99999;
}

.close-modal-x:hover {
    color: #ff5050;
    
    box-shadow: none !important;
}


.result-header-modal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-primary);
    flex-wrap: wrap; 
    gap: 0px;
}
.result-title-modal {
    font-size: 1rem;
    font-weight: 700;
    color: var(--accent-gold);
    display: flex;
    align-items: center;
    text-align: left;
    gap: 0px;
}
.info-group-modal {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end; 
}
.company-rating-display {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-gold);
    background: var(--bg-primary);
    padding: 5px 10px;
    border: 1px dashed var(--accent-gold);
    border-radius: var(--border-radius);
    white-space: nowrap;
}


#employees-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    background: var(--bg-card); 
    border-radius: var(--border-radius);
    overflow: hidden;
    min-width: 800px;
}
#employees-table th, #employees-table td {
    border: 1px solid var(--border-primary); 
    padding: 12px 15px;
    font-size: 0.95rem;
    text-align: left;
    width: auto;
}
#employees-table th {
    background: var(--accent-gold); 
    color: var(--bg-primary); 
    font-weight: 800;
    text-transform: uppercase;
}
#employees-table tr:nth-child(even) {
    background: var(--bg-input); 
}
#employees-table tr:hover {
    background-color: var(--bg-card-hover);
    color: var(--accent-gold);
}


.action-filter-select {
    padding: 10px 15px;
    border-radius: var(--border-radius);
    
    border: 1px dashed var(--accent-gold);
    background: var(--bg-primary);
    color: var(--accent-gold);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    appearance: none; 
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%23FFD700' d='M9.293 12.95l.707.707L15.657 8l-1.414-1.414L10 10.828 5.757 6.586 4.343 8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 1em;
}
.action-filter-select:focus {
    outline: none;
    border-color: var(--accent-gold-dark);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.6);
}

.visit-profile-link {
    display: inline-flex;
    
    color: var(--text-primary); 
    font-size: 1.1rem;
    transition: color 0.2s ease;
    text-decoration: none; 
}
.visit-profile-link:hover {
    
    color: var(--accent-gold); 
}

#employees-table a {
    text-decoration: none !important; 
    
    color: var(--text-primary) !important; 
}
.filter-wrapper {
    
    display: flex;
    flex-direction: column;
    width: 100%;
}
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}
.filter-wrapper label {
    text-align: right;
    width: 100%;
    padding-right: 10px; 
    margin-bottom: 5px;
}
.filter-wrapper .action-filter-select {
    
    
}
#clear-found-status {
    padding: 10px 15px;
    border: 1px dashed #dc3545;
    background: var(--bg-primary); 
    color: #dc3545;
    font-weight: 600;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}
#clear-found-status:hover {
    background: var(--bg-input);
    color: #c82333;
    border-color: #c82333;
}
@media (min-width: 768px) {
    .filter-controls:first-of-type { 
        flex-wrap: nowrap;
    }

    .filter-wrapper {
        width: auto;
    }
    .filter-wrapper:last-child {
        margin-left: auto;
    }
    .filter-wrapper .action-filter-select {
        width: 200px; 
        max-width: 200px; 
    }
    .filter-controls .filter-controls {
        width: auto;
        flex-direction: row; 
    }
}
#clear-result-btn {
    display: none; 
}


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 18, 18, 0.95);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}
.modal {
    background: var(--bg-card);
    
    border: 1px dashed var(--accent-gold); 
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 400px;
    padding: 30px 25px;
    box-shadow: var(--shadow-md);
    text-align: center;
    color: var(--text-primary);
    animation: slideUp 0.3s ease forwards;
}
.modal-emoji {
    font-size: 3rem;
    margin-bottom: 16px;
}
.modal-message {
    font-size: 1.1rem;
    font-weight: 600;
}
#modal-close {
    margin-top: 25px;
    padding: 10px 30px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--border-radius);
    
    
    
    display: block; 
    margin-left: auto; 
    margin-right: auto; 
    width: fit-content; 
}
#modal-confirm, #modal-cancel {
    
    padding: 10px 20px;
    font-size: 1rem;
}
#modal-confirm {
    
    width: 70%;
    margin-bottom: 5px;
    color: white;
    border: 1px dashed #dc3545;
}
#modal-confirm:hover {
    
    border-color: #c82333;
    box-shadow: none;
}
#modal-cancel {
    width: 70%;
    
}
#close-results-button {
    display: none !important; 
}


.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
    padding: 20px 0;
    border-top: 1px solid var(--border-primary);
}
.page-link {
    background: var(--bg-primary);
    color: var(--accent-gold);
    padding: 6px 8px;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    border: 1px dashed var(--accent-gold);
}
.page-link:hover:not(.active):not(.disabled) {
    background: var(--bg-input);
}
.page-link.active {
    background: var(--accent-gold);
    color: var(--bg-primary);
    border-color: var(--accent-gold);
}
.page-link.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}


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

.action-view-members.finded {
    
    color: white;
    
    border: 1px dashed #dc3545; 
}
.action-view-members.finded:hover {
    
    box-shadow: none;
}
#main-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-primary);
    padding: 20px 0;
    text-align: center;
    width: 100%;
    
    margin-top: auto; 
}
#main-footer .sub-header-gold {
    margin: 10px 0;
    font-size: 0.9rem;
    font-weight: 400;
}
.tip-box {
    width: 100%;
    max-width: 1250px;
    margin: 0 auto 30px auto;
    padding: 15px;
    border: 1px dashed var(--accent-gold);
    border-radius: var(--border-radius);
    background: var(--bg-card);
    text-align: center;
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}
.tip-box p {
    margin: 5px 0;
}
.tip-box .tip-strong {
    font-weight: 700;
    color: var(--accent-gold);
}
@media (max-width: 768px) {
    .tip-box {
        font-size: 0.85rem;
        padding: 10px;
        margin-bottom: 20px;
    }
    .tip-box p {
        margin: 3px 0;
    }
}
.faq-section {
    margin-bottom: 40px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 1px dashed var(--accent-gold);
    box-shadow: var(--shadow-md);
}
.faq-section h2 {
    color: var(--accent-gold);
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-bottom: 1px dashed var(--border-primary);
    padding-bottom: 10px;
}
.faq-item {
    margin-bottom: 25px;
}
.faq-question {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
}
.faq-answer {
    color: var(--text-secondary);
    padding-left: 30px;
    font-size: 0.95rem;
}
.faq-answer p {
    margin-bottom: 10px;
}
.highlight {
    color: var(--accent-gold);
    font-weight: 600;
}
.code-block {
    background: var(--bg-input);
    padding: 10px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-primary);
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--accent-green);
    margin-top: 10px;
}

@media (max-width: 768px) {
    .faq-question { font-size: 1rem; }
    .faq-answer { padding-left: 15px; font-size: 0.85rem; }
}
.home-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 15px;
    background: var(--bg-card);
    color: var(--accent-gold);
    border: 1px dashed var(--accent-gold);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, box-shadow 0.2s;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}
.home-button:hover {
    background: var(--bg-card-hover);
    box-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
    color: var(--accent-gold);
}
@media (max-width: 768px) {
    .home-button {
        top: 10px;
        right: 10px;
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    .home-button span {
        display: none;
    }
}