/* 
Main Styling
*/

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f6f8;
    color: #1a1a1a;
}


/*
Main Page
*/
.container {
    width: 100%;
    padding: 32px 20px;
    gap: 10px;
    display: grid;
    grid-template-columns: repeat(2, 50%);
    align-items: start;
}

.no-data {
    font-size: 1.1rem;
    color: #666666;
    text-align: center;
    margin-top: 40px;
}

.row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
}

.search-row {
    grid-column-start: 1;
    grid-column-end: 3;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
    margin-bottom: 8px;
}

.search-row input {
    width: 100%;
    padding: 10px 16px;
    font-size: 0.95rem;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.search-row input::placeholder {
    color: #94a3b8;
}

.search-row input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.search-row button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
    background-color: #7FD301;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.search-row button:hover {
    background-color: #65a702;
}

.search-row button:active {
    transform: scale(0.98);
}


.fileCard {
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 12px;
    border-left: 6px solid #7FD301;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
}

.fileCard.collapsible-header {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
    height: 36px !important;
}

.fileCard.collapsible-header:hover {
    background-color: #f9fafb;
}

.fileCard h2 {
    margin: 0;
    font-size: .8rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    word-break: break-word;
    display: flex;
    align-items: center;
    gap: 7px;
    width: 85%;
}

.fileCard .collapse_arrow {
    display: inline-flex;
    font-size: 1.1rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.ports-container {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    width: 100%;
}

.card {
    width: 170px;
    height: 43px !important;
    flex: 0 0 170px;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    overflow: hidden; 
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}

.cardTop {
    flex: 1; 
    padding: 7px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    position: relative;
}

.cardTop h3 {
    margin: 0;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
    word-break: break-word;
}

.cardTop p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    opacity: 0.92;
    word-break: break-word;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cardTop .status-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
}

.cardTop .timestamp {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}


.cardBottom {
    padding: 6px 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.cardBottom .connected-label {
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

@media (max-width: 770px){
    .container {
            grid-template-columns: 100%;
    }

    .search-row {
        grid-column-start: 1;
        grid-column-end: 2;
    }

    input[type="text"],
    input[type="search"],
    input[type="password"],
    input[type="email"],
    select,
    textarea {
        font-size: 16px !important; /* Must be 16px or larger to prevent iOS auto-zoom */
    }
}

@media (max-width: 500px) {
    .container {
        padding: 10px 5px;
        gap: 5px;
    }

    .row {
        gap: 3px;
    }

    .fileCard {
        padding: 1px 3px;
    }

    .fileCard h2 {
        font-size: .7rem;
    }

    .card {
        flex: 0 0 110px;
        width: 110px;
    }

    .card h3 {
        font-size: .6rem;
        
    }
}

/*
SweetAlert2 Modal Styling
*/
.swal2-modal {
    border-radius: 12px;
    background: #ffffff !important;
}

.swal2-popup .swal2-icon {
    display: none !important;
}

.swal2-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #0f172a;
    margin-bottom: 0 !important;
}

.swal2-html-container {
    color: #1a1a1a;
    padding-top: 0 !important;
}

.modal-info-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 16px 0;
    text-align: left;
}

.modal-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-info-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
    opacity: 0.7;
}

.modal-info-value {
    font-size: 0.9rem;
    line-height: 1.5;
    word-break: break-word;
    opacity: 0.92;
}

.swal2-confirm {
    background-color: #2563eb;
    border-radius: 8px;
}

.modal-buttons {
    display: flex;
    flex-direction: row;
    justify-content: start;
}
.modal-buttons button {
    width: 24%;
    aspect-ratio: 3/1;
    border: none;
    border-radius: 10pt;
    color: black;
}



/*
Login Page
*/
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.auth-card .cardTop {
    padding: 32px 28px;
}

.auth-card h2 {
    margin: 0;
    font-size: 1.9rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-top: 22px;
}

.auth-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.auth-form .form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 12px;
    background: #f8fafc;
    color: #0f172a;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: #7FD301;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    background: #ffffff;
}

.btn {
    padding: 12px 20px;
    background-color: #7FD301;
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.error {
    color: #dc2626;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.4;
}