/* General page styling */
body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #2b2b2b; /* dark gray background */
    color: #e0e0e0; /* light gray text */
}

/* Container for content */
.container {
    width: 95%;
    max-width: 800px; /* makes it look good on desktop, tablet, mobile */
    margin: 30px auto;
    padding: 20px;
    background: #3a3a3a; /* slightly lighter gray panel */
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.5);
}

/* Headings */
h1, h2, h3 {
    color: #ffffff;
    text-align: center;
    font-weight: bold;
    border-bottom: 2px solid #4a6075; /* blue-gray underline */
    padding-bottom: 5px;
    margin-bottom: 15px;
}

/* === NAVBAR LAYOUT =================================================== */

.rtr-navbar {
    background: #333;
    color: #fff;
    padding: 8px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-family: 'Calibri', sans-serif;
    border-bottom: 2px solid #1866e1;
}

/* Left and right groups */
.rtr-nav-left,
.rtr-nav-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Logo */
.rtr-logo-link {
    display: flex;
    align-items: center;
    margin-right: 10px;
}

.rtr-logo {
    height: 36px;
    width: auto;
}

/* Basic links */
.rtr-nav-link {
    color: #fff;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.rtr-nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Username / logout */
.rtr-username {
    margin-right: 8px;
    font-weight: 600;
}

.rtr-logout {
    font-weight: 600;
}

/* === DROPDOWNS ======================================================= */

.rtr-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.rtr-drop-toggle {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
    font: inherit;
}

.rtr-drop-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

.rtr-drop-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #2b2b2b;
    border-radius: 4px;
    min-width: 180px;
    padding: 4px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 1000;
}

.rtr-dropdown:hover .rtr-drop-menu {
    display: block;
}

.rtr-drop-item {
    display: block;
    padding: 6px 12px;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
}

.rtr-drop-item:hover {
    background: #1866e1;
}

/* Small screens: stack a bit nicer */
@media (max-width: 900px) {
    .rtr-navbar {
        flex-wrap: wrap;
        row-gap: 8px;
    }
    .rtr-nav-left {
        flex-wrap: wrap;
    }
}


/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

label {
    font-weight: bold;
    color: #ddd;
}

input, select, textarea, button {
    padding: 10px;
    font-size: 15px;
    border: 1px solid #555;
    border-radius: 6px;
    background-color: #2e2e2e;
    color: #fff;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #4a6075;
    box-shadow: 0 0 6px rgba(74,96,117,0.6);
}

/* Buttons */
button {
    background-color: #4a6075; /* blue-gray */
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 6px;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #3a4d61;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #3a3a3a;
}

table, th, td {
    border: 1px solid #444;
}

th, td {
    padding: 12px;
    text-align: left;
}

th {
    background-color: #2a333e; /* blue-gray header */
    color: white;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #333;
}

tr:hover {
    background-color: #444;
}

/* Responsive tweaks */
/* Form container */
.form-container {
    background-color: #2a2a2a; /* dark gray background */
    padding: 20px;
    margin: 20px auto; /* center on page */
    border-radius: 8px;
    max-width: 600px; /* limit width on desktop */
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Form labels & inputs */
form label {
    font-weight: bold;
    display: block;
    margin-bottom: 6px;
    color: #ffffff;
}

form input, form select, form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #444;
    border-radius: 4px;
    background-color: #3a3a3a;
    color: #fff;
}

/* Responsive tweak for mobile */
@media (max-width: 768px) {
    .form-container {
        max-width: 95%;
        padding: 15px;
    }
}


/* General button styling */
.btn {
    display: inline-block;
    padding: 8px 14px;
    margin: 3px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 6px;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.3s;
}

/* Specific types */
.btn-add {
    background-color: #4a6075; /* blue-gray */
}
.btn-add:hover {
    background-color: #3a4d61;
}

.btn-edit {
    background-color: #2d8659; /* greenish */
}
.btn-edit:hover {
    background-color: #246b47;
}

.btn-delete {
    background-color: #a94442; /* red */
}
.btn-delete:hover {
    background-color: #8a3736;
}

/* Status colors */
.status {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    color: white;
}

.status-good {
    background-color: #113711;
}

.status-bad {
    background-color: #5c0000;
}

.status-degraded {
    background-color: #54421e;
}

.status-new {
    background-color: #173f59;
}

/* === LOGIN PAGE LAYOUT ======================================= */

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-card {
    background-color: #3a3a3a;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
    padding: 24px 32px;
    max-width: 420px;
    width: 100%;
}

/* Logo + title */
.login-card .header {
    text-align: center;
    margin-bottom: 16px;
}

.login-card .header img {
    max-width: 160px;
    height: auto;
    display: block;
    margin: 0 auto 10px;
}

.login-card .header h1 {
    margin: 0;
    border: none;          /* override global h1 underline */
    font-size: 24px;
}

/* Form body */
.login-card .form-body {
    margin-top: 8px;
}

.login-card .form-title {
    text-align: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #4a6075;
    padding-bottom: 4px;
}

/* Error message */
.login-card .error-message {
    background: #5c0000;
    border-radius: 4px;
    padding: 8px 10px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

/* Make the button full width on this form */
.login-card form button {
    width: 100%;
}
