body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: #f0f2f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    background-color: #1FB2EC;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar h2 {
    margin: 0;
}

.topbar-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.topbar button {
    background: white;
    color: #1FB2EC;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s, color 0.3s;
}

.topbar button:hover {
    background: #0575A2;
    color: white;
}

.container {
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    max-width: 1000px;
    width: 95%;
    text-align: center;
}

#loginForm {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#loginForm input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    margin: 10px 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
}

#loginForm button {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    background-color: #1FB2EC;
    color: white;
    border: none;
    font-size: 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    margin-top: 10px;
}

#loginForm button:hover {
    background-color: #0575A2;
    transform: scale(1.05);
}

#addDomainForm {
    margin-bottom: 30px;
}

#addDomainForm input, #addDomainForm button {
    width: 100%;
    max-width: 400px;
    margin: 10px auto;
    padding: 12px;
}

.btn-add {
    background-color: #4CAF50;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: background 0.3s;
}

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

.btn-delete {
    background-color: #b73026;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-delete:hover {
    background-color: #e53935;
}

.user-domains {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.user-domains li {
    background: #f9f9f9;
    padding: 10px 15px;
    margin-bottom: 8px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.message {
    margin-top: 15px;
    padding: 15px;
    border-radius: 8px;
    display: none;
    text-align: center;
}

.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: fixed;
}

th, td {
    padding: 12px;
    border-bottom: 1px solid #ddd;
    text-align: center;
    font-size: 15px;
    word-break: break-word;
}

th {
    background: #f5f5f5;
    font-weight: bold;
}

.valid {
    background-color: #e6ffed; /* Light green */
}

.warning {
    background-color: #fff8e1; /* Light yellow */
}

.expired {
    background-color: #ffebee; /* Light red */
}

#searchInput {
    width: 100%;
    max-width: 400px;
    margin: 20px auto;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
}

.pagination {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.pagination button {
    background: #1FB2EC;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
}

.pagination button:hover {
    background: #0575A2;
}

.pagination button.disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tabs {
    margin: 20px 0;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tabs button {
    padding: 10px 20px;
    border: none;
    background: #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    font-size: 16px;
}

.tabs button.active {
    background: #1FB2EC;
    color: white;
}

.tabs button:hover {
    background: #ccc;
}

.options {
    text-align: center;
    margin: 20px 10px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.options button {
    padding: 10px 20px;
    font-size: 16px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s;
}

.options button:hover {
    background: #1976D2;
}

tr td[colspan] {
    background: #f0f0f0;
    font-weight: bold;
    text-align: left;
    padding: 10px;
}

#notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #4CAF50;
    color: white;
    padding: 15px 30px;
    border-radius: 10px;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 9999;
}

#notification.show {
    opacity: 1;
    pointer-events: auto;
}

#notification.error {
    background: #f44336;
}

#addDomainForm {
    margin-bottom: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

#addDomainForm input, #addDomainForm button {
    padding: 12px;
    font-size: 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    height: 45px;
}

#addDomainForm input {
    width: 200px;
}

#addDomainForm button {
    width: auto;
    padding: 0 20px;
    border: none;
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

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

.controls {
    display: flex;
    justify-content: flex-end;
    margin-right: 20px;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.search-wrapper {
    flex: 1;
}

#searchInput {
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    width: 290px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    margin-left: 110px;
}

.per-page-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.per-page-group label {
    font-size: 15px;
    color: #333;
}

.per-page-group label::after {
    margin-left: 6px;
}

#itemsPerPageSelect {
    padding: 8px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: white;
    cursor: pointer;
}

#itemsPerPageSelect option[value="Show"] {
    font-weight: bold;
}

#searchInput,
#itemsPerPageSelect {
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 999;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 0 15px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.modal-content h3 {
  margin-top: 0;
  text-align: center;
}

.modal-content label {
  font-weight: bold;
  font-size: 14px;
  text-align: left;
}

.modal-content input {
  padding: 10px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 40px;
}

.toggle-eye {
  position: absolute;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  user-select: none;
}

.port-wrapper {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

#portSelector {
  padding: 12px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #ccc;
  height: 45px;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 20px;
    }

    #addDomainForm {
        flex-direction: column;
        align-items: center;
    }

    #addDomainForm input,
    #addDomainForm button {
        width: 100%;
        max-width: 400px;
    }
    
    .per-page-group {
        justify-content: center;
        width: 100%;
    }

    .search-wrapper {
        justify-content: center;
        width: 100%;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }

    .controls input,
    .controls select {
        width: 100%;
        max-width: 400px;
    }
}
