/* General Styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
}

/* Page container to hold sidebar and main content */
.page-container {
    display: flex;
    min-height: 100vh;
}

/* Content Styling */
.content {
    flex: 1;
    margin-left: 250px; /* Adjust for sidebar width */
    padding: 20px;
    padding-bottom: 80px; /* Reserve space for the footer */
    transition: margin-left 0.3s ease;
}


/* Sidebar styling */
.sidebar {
    width: 250px;
    background-color: #333;
    color: #fff;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    height: 100vh;
    transition: width 0.3s ease;
    overflow-y: auto;
}

.sidebar.collapsed {
    width: 60px;
}

#toggleSidebar {
    background: #444;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-size: 20px;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.sidebar ul li {
    padding: 10px;
    text-align: left;
}

.sidebar ul li a {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar ul li a::before {
    content: attr(data-icon);
    font-size: 20px;
    margin-right: 10px;
    transition: margin-right 0.3s ease;
}

.sidebar.collapsed ul li a span {
    display: none;
}

.sidebar.collapsed ul li a::before {
    margin-right: 0;
}

.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: 60px;
}

.sidebar.collapsed ~ .content {
    margin-left: 60px; /* Adjust margin for collapsed sidebar */
}

/* Footer Styles */
.footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: fixed;
    width: 100%;
    bottom: 0;
}

.footer-content p {
    margin: 0;
}

.footer .social-links a {
    color: #1abc9c;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

.footer .social-links a:hover {
    color: #16a085;
}

/* File-info Styles */
.list-clients {
    display: flex;
    flex-direction: column;
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.client-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.file-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.file-name {
    font-weight: bold;
    color: #333;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.ip-address {
    color: #555;
    font-size: 0.9em;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.button {
    padding: 10px 20px;
    font-size: 14px;
    cursor: pointer;
    color: #fff;
    background-color: #4CAF50;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
    white-space: nowrap;
}

.button:hover {
    background-color: #45a049;
}

.button:active {
    background-color: #3e8e41;
    box-shadow: 0 2px #666;
    transform: translateY(2px);
}

.button.suspend {
    background-color: #f44336;
}

.button.suspend:hover {
    background-color: #e53935;
}

.button.suspend:active {
    background-color: #d32f2f;
    box-shadow: 0 2px #666;
    transform: translateY(2px);
}

.certificates-container {
    display: none;
    width: 100%;
    margin-top: 10px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

.certificates-container.active {
    display: block;
}

.script-output {
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 5px;
    background-color: #f9f9f9;
    font-family: monospace;
    font-size: 0.9em;
}


/* Subfolder List Styles */
#subfolderList {
    list-style: none;
    padding: 0;
    margin: 0;
}

#subfolderList .list-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

#subfolderList .list-item:hover {
    background-color: #f0f0f0;
}

#subfolderList .info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#subfolderList .subfolder-name {
    font-weight: bold;
    color: #333;
    font-size: 1rem;
}

#subfolderList .expired {
    color: #e74c3c;
    font-weight: bold;
}

#subfolderList .button-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

#subfolderList .button {
    padding: 8px 15px;
    font-size: 14px;
    color: #fff;
    background-color: #3498db;
    border: none;
    border-radius: 5px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

#subfolderList .button:hover {
    background-color: #2980b9;
}

#subfolderList .button:active {
    transform: scale(0.98);
}

#subfolderList .button.restore {
    background-color: #2ecc71;
}

#subfolderList .button.restore:hover {
    background-color: #27ae60;
}

#subfolderList .button.suspend {
    background-color: #e74c3c;
}

#subfolderList .button.suspend:hover {
    background-color: #c0392b;
}



.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding: 0.5rem; /* Add padding to the container */
    border: 1px solid #ddd; /* Light border for separation */
    border-radius: 5px; /* Rounded corners */
    background-color: #f9f9f9; /* Light background color */
}

.pagination-controls select {
    padding: 0.5rem;
    border: 1px solid #ccc; /* Border for the select box */
    border-radius: 5px; /* Rounded corners */
    font-size: 14px; /* Consistent font size */
    transition: border-color 0.3s; /* Smooth transition */
}

.pagination-controls select:focus {
    border-color: #007bff; /* Highlight border on focus */
    outline: none; /* Remove outline */
}

.pagination-controls button {
    padding: 0.5rem 1rem;
    font-size: 14px;
    color: #fff; /* Text color */
    background-color: #007bff; /* Button color */
    border: none; /* Remove border */
    border-radius: 5px; /* Rounded corners */
    cursor: pointer; /* Pointer cursor on hover */
    transition: background-color 0.3s; /* Smooth transition */
}

.pagination-controls button:hover {
    background-color: #0056b3; /* Darker shade on hover */
}

.pagination-controls button:disabled {
    background-color: #ccc; /* Disabled state color */
    cursor: not-allowed; /* Not-allowed cursor */
}

.search-container {
    margin-top: 1rem; /* Space above the search box */
}

#searchInput {
    padding: 0.5rem;
    border: 1px solid #ccc; /* Border for the search box */
    border-radius: 5px; /* Rounded corners */
    width: 100%; /* Full width */
    max-width: 400px; /* Max width to avoid stretching too wide */
    box-sizing: border-box; /* Include padding in width */
    transition: border-color 0.3s; /* Smooth transition */
}

#searchInput:focus {
    border-color: #007bff; /* Highlight border on focus */
    outline: none; /* Remove outline */
}

.list-item {
    flex-direction: column;
    align-items: flex-start;
}
.list-item .info {
    flex-direction: column;
}

.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgb(0,0,0); /* Fallback color */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 30%; /* Smaller width for smaller modal */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%); /* Center the modal */
    position: absolute;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

table {
    font-family: 'Arial';
    margin: 25px auto;
    border-collapse: collapse;
    border: 1px solid #04f017;
    border-bottom: 2px solid #1ABC9C;
    box-shadow: 0px 0px 20px rgba(0,0,0,0.10),
       0px 10px 20px rgba(0,0,0,0.05),
       0px 20px 20px rgba(0,0,0,0.05),
       0px 30px 20px rgba(0,0,0,0.05);
    tr {
       &:hover {
        background: #07e42c;
        
        td {
          color: #555;
        }
      }
    }
    th, td {
      color: #999;
      border: 1px solid #eee;
      padding: 12px 35px;
      border-collapse: collapse;
    }
    th {
      background: #1ABC9C;
      color: #0817f5;
      text-transform: uppercase;
      font-size: 12px;
      &.last {
        border-right: none;
      }
    }
  }

  #portContainer {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }
  
  #portContainer label {
    display: block;
    font-weight: bold;
  }
  
  #portContainer input[type="text"],
  #portContainer input[type="number"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  #portContainer button {
    padding: 0.5rem 1rem;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  #existingPortsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
  }
  
  #existingPortsTable th,
  #existingPortsTable td {
    border: 1px solid #ddd;
    padding: 0.5rem;
    text-align: left;
  }
  
  #existingPortsTable th {
    background-color: #f2f2f2;
  }