/* Dark theme for Guacamole - Remote Bastion */

/* Login page background */
.login-ui {
    background: #1a1a2e !important;
}

/* Login dialog box */
.login-ui .login-dialog {
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
}

.login-ui .login-dialog .header {
    background: #ffffff !important;
    border-bottom: none !important;
}

.login-ui .login-dialog .footer {
    background: #ffffff !important;
}

/* Override the Guacamole logo with our custom logo on white background */
.login-ui .logo {
    background-image: url("images/logo.png") !important;
    background-size: contain !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    background-color: transparent !important;
    border: none !important;
}

/* App name / title text on login page */
.login-ui .login-dialog .header,
.login-ui .login-dialog .header h1,
.login-ui .login-dialog .header .title,
.login-ui .login-dialog .header span {
    color: #1a1a1a !important;
}

/* Input fields */
.login-ui .login-dialog .login-form input[type="text"],
.login-ui .login-dialog .login-form input[type="password"] {
    background: #f5f5f5 !important;
    border: 1px solid #cccccc !important;
    color: #1a1a1a !important;
    border-radius: 4px !important;
}

.login-ui .login-dialog .login-form input[type="text"]::placeholder,
.login-ui .login-dialog .login-form input[type="password"]::placeholder {
    color: #888888 !important;
}

/* Labels */
.login-ui .login-dialog label {
    color: #1a1a1a !important;
    font-weight: 500 !important;
}

/* All text inside login dialog */
.login-ui .login-dialog,
.login-ui .login-dialog p,
.login-ui .login-dialog span,
.login-ui .login-dialog div,
.login-ui .login-dialog a {
    color: #1a1a1a !important;
}

/* Login button */
.login-ui .login-dialog .login-form input[type="submit"],
.login-ui .login-dialog .buttons button {
    background: #1a1a1a !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
}

.login-ui .login-dialog .login-form input[type="submit"]:hover,
.login-ui .login-dialog .buttons button:hover {
    background: #333333 !important;
}

/* Error/notification messages */
.login-ui .login-dialog .notification,
.login-ui .login-dialog .error {
    color: #cc0000 !important;
}

/* Main application - scoped to .home and .settings to avoid affecting client overlay */
.home .header {
    background: #16213e !important;
    border-bottom: 2px solid #0f3460 !important;
}

.home .content {
    background: #1a1a2e !important;
    color: #e0e0e0 !important;
}

/* Only set dark background on login and home pages, not the client view */
.login-ui,
.home {
    background: #1a1a2e !important;
}

/* Navigation */
.home .navigation,
.settings .navigation {
    background: #16213e !important;
}

.home .navigation .header,
.settings .navigation .header {
    background: #0f3460 !important;
}

/* Connection list */
.home .recent-connections,
.home .all-connections {
    background: #16213e !important;
    border-radius: 8px !important;
}

.home .connection,
.home .connection-group {
    background: #1a1a2e !important;
    border: 1px solid #0f3460 !important;
    border-radius: 4px !important;
    color: #e0e0e0 !important;
}

.home .connection:hover,
.home .connection-group:hover {
    background: #0f3460 !important;
}

.home .connection .name,
.home .connection-group .name {
    color: #ffffff !important;
}

/* Settings pages */
.settings {
    background: #1a1a2e !important;
}

.settings .section {
    background: #16213e !important;
    border-radius: 8px !important;
}

.settings .section .header {
    background: #0f3460 !important;
}

/* Tables - scoped to home and settings */
.home table,
.settings table {
    background: #16213e !important;
    color: #e0e0e0 !important;
}

.home table th,
.settings table th {
    background: #0f3460 !important;
    color: #ffffff !important;
}

.home table td,
.settings table td {
    border-color: #0f3460 !important;
    color: #e0e0e0 !important;
}

/* Text and links - scoped to home, settings, login */
.home a,
.settings a {
    color: #e94560 !important;
}

.home h1, .home h2, .home h3,
.settings h1, .settings h2, .settings h3 {
    color: #ffffff !important;
}

.home p, .home span, .home div,
.settings p, .settings span, .settings div {
    color: #e0e0e0;
}

/* Buttons - scoped to home and settings */
.home button, .home .button,
.settings button, .settings .button {
    background: #0f3460 !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
}

.home button:hover, .home .button:hover,
.settings button:hover, .settings .button:hover {
    background: #e94560 !important;
}

/* Form elements - scoped to home and settings */
.home input, .home select, .home textarea,
.settings input, .settings select, .settings textarea {
    background: #0d1b2a !important;
    color: #ffffff !important;
    border: 1px solid #4a6fa5 !important;
}
