
:root {

    /* =================================== */
    /* Boxes And Cards */
    /* =================================== */

    --screen-color: linear-gradient(#141e30, #243b55);
    --card-color: #0e1522;

    /* =================================== */
    /* Colors */
    /* =================================== */
    --hover-color: rgba(3, 233, 244, 0.1);
    --active-color: rgba(3, 233, 244, 0.2);
    --interactive-color: #03e9f4;

    /* =================================== */
    /* Box Shadow */
    /* =================================== */
    --shadow-color: rgba(0,0,0,.6);
    --shadow-hover: rgba(0,0,0,.8);

    
    /* =================================== */
    /* Navigation Bar */
    /* =================================== */
    --navbar-divider-color: #ADB1A9;
    --navbar-item-color: #ADB1A9;
    --navbar-item-hover-color: rgba(3, 233, 244, 0.1);
    --navbar-height: 60px;


    /* =================================== */
    /* Button */
    /* =================================== */
    --btn-color: #fff;
    --btn-background: #03e9f4;


    /* =================================== */
    /* Text */
    /* =================================== */
    --normal-text-color: #fff;
    --hint-text-color: #ADB1A9;
    --interactive-text-color: #03e9f4;
    --title-color: #ADB1A9;


    /* =================================== */
    /* Table */
    /* =================================== */
    --table-header-color: #141e30;
    --table-header-background-color: linear-gradient(#141e30, #243b55);

    --table-row-hover-color: rgba(3, 233, 244, 0.1);

    /* =================================== */
    /* States */
    /* =================================== */
    --success-color: #4CAF50;
    --warning-color: #ff9800;
    --danger-color: #f44336;
    --error-color: #f44336;
}

/* Reset margins and padding to prevent unexpected spacing */
* {
    margin: 0;
    box-sizing: border-box;
}

body {
    height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--screen-color);
}

.body-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.body-header .right-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.content {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 100px;
    padding-right: 100px;
    padding-top: 20px;
    padding-bottom: 50px;
    overflow: auto;
    height: calc(100vh - var(--navbar-height));
}




/* =================================== */
/* Navivation Bar */
/* =================================== */

.navbar {
    background: none;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    margin: 20px 100px;
    border-bottom: var(--navbar-divider-color) 1px solid;
    box-sizing: border-box;
    height: var(--navbar-height);
}

.navbar-item {
    color: var(--navbar-item-color);
}

.navbar-logo {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: auto; /* Pushes other links to the right */
    width: 12rem;
}

.navbar-logo-image{
    position: absolute;
    height: 7rem; /* Adjust based on your navbar height */
    width: auto;
    transition: opacity 0.3s ease;
}

.navbar-logo-image:hover {
    opacity: 0.6;
    /* filter: drop-shadow(0 0 15px rgba(3, 233, 244, 0.3)); */
}


/* Add these to your global CSS */
.navbar .right-section,
.navbar .left-section {
    position: relative;
    display: flex;
    align-items: center;
    width: fit-content;
    gap: 0.8rem;

}



/* =================================== */
/* Card */
/* =================================== */
.card {
    display: flex;
    flex-direction: column;
    padding: 10px;
    border-radius: 5px;
    background-color: var(--card-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    margin: 20px 0;
}

.card-title {
    font-size: 1.4rem;
    color: var(--title-color);
    white-space: nowrap;
}

.card-header {
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 0;
    overflow-x: auto;
}


.card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 0;
    gap: 5px;
    overflow-x: auto;
}


/* Add these to your global CSS */
.card .right-section,
.card .left-section {
    position: relative;
    display: flex;
    width: fit-content;
    gap: 10px;
    padding: 10px;
}

.card-row {
    display: flex;
    justify-content: space-between; /* Ensures label and value are spaced out */
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Optional separator */
}

.card-row:hover {
    background: var(--hover-color);
}

.card-row .label {
    color: var(--hint-text-color);
    font-weight: 400;
    font-size: 1rem;
}

.card-row .value {
    color: var(--normal-text-color);
    font-weight: 500;
    text-align: right;
    font-size: 1rem;
}

/* =================================== */
/* overflow menu */
/* =================================== */
.right-section .overflow-menu {
    display: none;
    position: absolute;
    top: 50%;
    right: 50%;
    background: rgb(28, 36, 56);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;

}

.right-section .overflow-toggle {
    display: none;
    background: transparent;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 3rem;
    width: 6rem;
    height: 6rem;
    cursor: pointer;
    text-align: center;
    justify-content: center;

}

.right-section .overflow-toggle:hover {
    background: var(--navbar-item-hover-color);
}


.overflow-menu.show {
    display: block;
}

.overflow-menu .overflow-item {
    padding: 1rem 1.5rem;
    color: var(--normal-text-color);
    text-decoration: none;
    display: block;
    white-space: nowrap;
    
}

.overflow-menu .overflow-item:hover {
    background: rgba(255,255,255,0.05);
}


/* =================================== */
/* DropDown */
/* =================================== */
.dropdown-container {
    position: relative;
    display: inline-block;
  }
  
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 999;
    min-width: 180px;
    padding: 0.5rem 0;
}
  
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
}
  
.dropdown-menu button:hover {
    background-color: #f0f0f0;
}



/* =================================== */
/* Text */
/* =================================== */
.title {
    font-size: 1.8rem;
    color: var(--title-color);
    white-space: nowrap;
}


/* =================================== */
/* Buttons */
/* =================================== */
.text-btn {
    background: none;
    border: none;
    border-radius: 5px;
    padding: 0.7rem 1.4rem;
    color: var(--interactive-color);
    font-size: 1rem;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all 0.3s ease;
    
}

.text-btn:hover {
    color: var(--interactive-text-color);
    background: var(--navbar-item-hover-color);
}

.filled-btn {
    background:  #0297c0;
    color: var(--btn-color);
    font-size: 1rem;
    padding: 0.7rem 1.4rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;


    height: 2.5rem; /* Ensures consistent height */
    box-sizing: border-box;
}

.filled-btn:hover {
    background: #03e9f4;
}

.outline-btn {
    background: none;
    border: 2px solid var(--btn-background);
    color: var(--btn-background);
    font-size: 1rem;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.outline-btn:hover {
    background: var(--btn-background);
    color: var(--btn-color);
}

/* Delete Button Styling */
.delete-btn {
    color: #b71c1c;
    background: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1.5em;
    padding: 0 8px;
    transition: all 0.2s ease;
    line-height: 1;
}

.delete-btn:hover {
    color: white;
    background: #d32f2f;
    transform: scale(1.3);
}


.floating-btn {
    position: fixed;
    bottom: 3rem;
    right: 3rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #0297c0;
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 1000;
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
    background-color: #03e9f4;
}

.plus-icon {
    line-height: 1;
    margin-top: -2px;
}

.icon-btn {
    background: none; /* No background */
    border: none; /* No border */
    color: var(--normal-text-color); /* Icon color */
    font-size: 1.25rem; /* Adjust icon size */
    cursor: pointer;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%; /* Makes it round */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, background 0.3s;
    text-decoration: none;
}

/* Hover effect (optional) */
.icon-btn:hover {
    color: var(--interactive-color); /* Change icon color on hover */
    background-color: rgba(0, 0, 0, 0.1); /* Light background on hover */
}

/* Click effect (optional) */
.icon-btn:active {
    transform: scale(0.9); /* Small scale effect on click */
}


/* =================================== */
/* Input */
/* =================================== */

.outline-input {
    color: var(--hint-text-color);
    background: none;
    padding: 0.7rem 1.4rem;
    border-radius: 5px;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 3rem;
    font-size: 1rem;
    height: 2.5rem; /* Ensures consistent height */
    box-sizing: border-box;

    
}

.outline-input:focus {
    color: var(--interactive-text-color);
    border: 2px solid var(--interactive-text-color);
    outline: none;
}

.outline-input:focus::placeholder {
    color: var(--hint-text-color);
}

.outline-input::placeholder {
    font-size: 1rem;
}



/* Remove Default Color for auto password insert */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #141e30 inset !important;
    -webkit-text-fill-color: white !important;
    caret-color: white;
}

/* Remove default spinner for number inputs */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield; /* Modern browsers */
}

/* =================================== */
/* Select */
/* =================================== */

.outline-select {
    color: var(--normal-text-color);
    background: none;
    padding: 0.7rem 1.4rem;
    border-radius: 5px;
    border: 1px solid #444;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 3rem;
    font-size: 1rem;
    height: 2.5rem; /* Match input height */
    box-sizing: border-box;
    
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.6rem;
    padding-right: 2rem; /* Space for arrow */

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.outline-select option {
    color: black;
}




/* =================================== */
/* Table */
/* =================================== */

.table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 8px;
    color: white;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    
}

/* Table Header */
.table thead tr {
    background: var(--table-header-background-color);
    color: white;
    text-transform: capitalize;
}

.table tbody tr:hover {
    background: var(--screen-color);
}

.table th {
    padding: 0.8rem 1rem;
    text-align: left;
    font-size: 1rem;
    border-bottom: 2px solid #444;
    white-space: nowrap;
}

/* Table Body */
.table td {
    position: relative;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
    
}


.table .table-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    background: green;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    text-decoration: none;
    
}

.table .table-btn:hover {
    background: rgba(0, 128, 0, 0.6);
    transform: translate(-50%, -51%); /* -50% Y minus 1px more */
}





/* =================================== */
/* Form */
/* =================================== */

.field-box {
    position: relative;
    margin-bottom: 1.8rem;
}

.field-box input {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--normal-text-color);
    border: none;
    border-bottom: 1px solid #fff;
    outline: none;
    background: transparent;
}

.field-box label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--normal-text-color);
    pointer-events: none;
    transition: 0.5s;
}

.field-box select {
    width: 100%;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--normal-text-color);
    border: none;
    border-bottom: 1px solid #fff;
    outline: none;
    background: transparent;
}

.field-box select ~ label{
    top: -1.6rem;
    font-size: 0.8rem;
    color: var(--interactive-text-color);
}

.field-box select option {
    color: black;
}


.field-box input:focus ~ label,
.field-box input:valid ~ label {
    top: -1.6rem;
    font-size: 0.8rem;
    color: var(--interactive-text-color);
}

.field-box input:-webkit-autofill ~ label {
    top: -1.6rem;
    font-size: 0.8rem;
    color: var(--interactive-text-color);
}



/* =================================== */
/* Flash Messages */
/* =================================== */
.flash-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Flash Message Box */
.alert {
    width: 100%;
    max-width: 600px;
    padding: 1rem 1.2rem;
    margin: 0.8rem 0;
    border-radius: 5px;
    text-align: left;
    font-size: 1rem;
    font-weight: bold;
    box-shadow: 0 4px 6px var(--shadow-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    animation: fadeIn 0.5s ease-in-out;
}

/* Close Button */
.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    margin-left: 1.4rem;
}
.close-btn:hover {
    opacity: 0.7;
}

/* Flash Message Colors */
.alert-success {
    background-color: var(--card-color);
    color: var(--success-color); 
}

.alert-error { 
    background-color: var(--card-color);
    color: var(--error-color);
}


.alert-danger { 
    background-color: var(--card-color);
    color: var(--danger-color);
}

.alert-warning {
    background-color: var(--card-color);
    color: var(--warning-color);
}

.alert-info {
    background-color: var(--card-color);
    color: var(--normal-text-color);
}

.alert-message {
    background-color: var(--card-color);
    color: var(--normal-text-color);
}

/* =================================== */
/* Dialog */
/* =================================== */
.dialog-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    justify-content: center;
    align-items: center;
}

.dialog.card {
    padding: 2rem;
    border-radius: 8px;
    min-width: 400px;
    position: relative;
    margin: 2rem;
}



.dialog-button-container {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}


/* =================================== */
/* Indicators */
/* =================================== */

.status-indicator {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.status-indicator.connected { background: #4CAF50; }
.status-indicator.disconnected { background: #F44336; }


/* Animation for smooth appearance */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =================================== */
/* Indicators */
/* =================================== */
.loading-window {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6); /* Optional background overlay */

    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000; /* Ensure it's on top of everything */
}

.loading-window .image {
    width: 80%;
    max-width: 600px; /* Prevents it from being too large on big screens */
    height: 300px; /* Set a fixed height (adjust as needed) */
    background: url("/images/logo.png") no-repeat center center;
    background-size: contain; /* Keeps aspect ratio */
}

.loading-window .spinner {
    width: 50px; /* Adjust spinner size */
    height: 50px;
    border: 5px solid #ccc;
    border-top: 5px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================== */
/* Interactive Screen */
/* =================================== */
@media (max-width: 1200px) {
    html {
        font-size: 12px;
    }

    .navbar {
        margin: 20px 20px;
    }

    .content {
        padding-left: 20px;
        padding-right: 20px;
    }


}

@media (max-width: 800px) {
    html {
        font-size: 6px;
    }

    .navbar {
        margin: 10px 10px;
    }

    .content {
        padding-left: 10px;
        padding-right: 10px;
    }



    .field-box input,
    .field-box label{
        font-size: 1.8rem;


    }
    .field-box input:focus ~ label,
    .field-box input:valid ~ label {

        font-size: 1.4rem;

    }
}




    
