/* =================================================================
   LXRemote Consolidated Styles
   ================================================================= */

/* =================================================================
   Base / Reset Styles
   ================================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #2c3e50;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

main {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.content {
    margin-top: 1rem;
}

h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* =================================================================
   Header Styles
   ================================================================= */

header {
    background: white;
    color: #2c3e50;
    padding: 1rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid #ddd;
}

header h1 {
    text-align: center;
    font-size: 2rem;
    margin: 0;
    color: #2c3e50;
}

.disabled-banner {
    background-color: #c53030;
    color: white;
    text-align: center;
    padding: 15px;
    font-weight: bold;
    font-size: 1.1rem;
}

.header-content {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-logo-left {
    flex-shrink: 0;
}

.header-logo-left img {
    max-width: 20vw;
    max-height: 150px;
    width: auto;
    height: auto;
}

.header-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.header-center {
    text-align: center;
}

.nav {
    text-align: center;
}

.nav a {
    color: #2c3e50;
    text-decoration: none;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.nav a:hover {
    background-color: #ecf0f1;
}

.header-tagline {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.nav-logout-form {
    display: inline;
}

.nav-logout-btn {
    background: none;
    border: none;
    color: #2c3e50;
    cursor: pointer;
    margin: 0 1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
    font-size: inherit;
    font-family: inherit;
}

.nav-logout-btn:hover {
    background-color: #ecf0f1;
}

.org-description {
    text-align: center;
    color: #ffffff;
    background-color: rgb(80, 114, 143);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1rem;
    padding: 1rem 1.5rem;
    border: 1px solid #34495e;
}

/* =================================================================
   Footer Styles
   ================================================================= */

footer {
    text-align: center;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #2c3e50;
    color: #ecf0f1;
}

footer a {
    color: #ecf0f1;
    text-decoration: underline;
}

footer a:hover {
    color: white;
}

/* =================================================================
   Login Page Styles
   ================================================================= */

body.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.login-header p {
    color: #666;
    font-size: 0.9rem;
}

.login-button {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.2s;
}

.login-button:hover {
    transform: translateY(-1px);
}

/* Login page specific input styles */
.login-page input[type="text"],
.login-page input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-page input[type="text"]:focus,
.login-page input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
}

.login-page label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.login-page .form-group {
    margin-bottom: 1.5rem;
}

/* =================================================================
   Form Styles - Shared across all forms
   ================================================================= */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.form-group label .required {
    color: red;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c3e50;
}

.form-group input[readonly] {
    background-color: #f5f5f5;
    color: #666;
}

.form-help {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Field validation styles */
.field-invalid {
    border-color: #c53030 !important;
    background-color: #fff5f5 !important;
}

.field-invalid:focus {
    border-color: #c53030 !important;
    box-shadow: 0 0 0 2px rgba(197, 48, 48, 0.2) !important;
}

.field-valid {
    border-color: #2f855a !important;
}

.field-error-message {
    color: #c53030;
    font-size: 12px;
    margin-top: 4px;
    display: none;
}

/* Make help text red when field is invalid */
.form-group:has(.field-invalid) .form-help {
    color: #c53030;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.submit-btn {
    background-color: #2c3e50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.submit-btn:hover {
    background-color: #34495e;
}

.cancel-btn {
    background-color: #f5f5f5;
    color: #333;
    padding: 10px 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
}

.cancel-btn:hover {
    background-color: #e0e0e0;
}

.error-message {
    color: #c53030;
    background-color: #fee;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #c53030;
}

.success-message {
    color: #2f855a;
    background-color: #f0fff4;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 4px solid #2f855a;
}

/* Specific form widths */
.profile-form {
    max-width: 600px;
}

.user-form {
    max-width: 600px;
    margin: 0 auto;
}

.org-form {
    max-width: 800px;
}

.password-note {
    font-size: 12px;
    color: #666;
    margin-top: 10px;
}

/* =================================================================
   Downloads Page Styles
   ================================================================= */

.downloads-section {
    margin-bottom: 30px;
}

.downloads-section h3 {
    color: #2c3e50;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.downloads-list {
    list-style: none;
    padding: 0;
}

.downloads-list li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.downloads-list li::before {
    content: "📎";
    font-size: 16px;
}

.downloads-list li.has-icon::before {
    content: none;
}

.link-icon {
    font-size: 16px;
}

.downloads-list a {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.downloads-list a:hover {
    text-decoration: underline;
}

.downloads-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 5px;
}

.no-links {
    color: #999;
    font-style: italic;
}

/* =================================================================
   FileBox / File Management Styles
   ================================================================= */

.filebox-header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.filebox-icon {
    font-size: 48px;
}

.filebox-info {
    flex: 1;
}

.filebox-title {
    font-size: 24px;
    font-weight: bold;
    margin: 0 0 5px 0;
}

.filebox-stats {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.selection-controls {
    margin-bottom: 15px;
    font-size: 14px;
}

.selection-controls a {
    color: #0066cc;
    text-decoration: none;
    margin-right: 15px;
}

.selection-controls a:hover {
    text-decoration: underline;
}

.file-list {
    border: 1px solid #ddd;
    background: #fff;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    gap: 12px;
}

.file-item:last-child {
    border-bottom: none;
}

.file-item:nth-child(even) {
    background-color: #fafafa;
}

.file-checkbox {
    margin: 0;
}

.file-icon {
    font-size: 20px;
    color: #f4a742;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.file-name:hover {
    text-decoration: underline;
}

.file-subtitle {
    font-size: 12px;
    color: #999;
}

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

.action-icon {
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
}

.key-icon {
    color: #f4a742;
}

.check-icon {
    color: #4caf50;
}

.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 15px;
    gap: 5px;
    font-size: 14px;
}

.page-link {
    padding: 5px 10px;
    color: #0066cc;
    text-decoration: none;
    border: 1px solid #ddd;
    background: #fff;
    min-width: 30px;
    text-align: center;
    display: inline-block;
}

.page-link:hover {
    background: #f0f0f0;
}

.page-link.active {
    background: #0066cc;
    color: white;
    border-color: #0066cc;
}

.delete-button {
    margin-top: 15px;
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
}

.delete-button:hover {
    background: #e0e0e0;
}

/* =================================================================
   Users List and Management Styles
   ================================================================= */

.users-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

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

.users-table-container {
    overflow-x: auto;
    margin-top: 20px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border: 1px solid #ddd;
}

.users-table thead {
    background-color: #2c3e50;
    color: white;
}

.users-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.users-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.users-table tbody tr:hover {
    background-color: #f8f9fa;
}

.users-table tbody tr:nth-child(even) {
    background-color: #fafafa;
}

.users-table tbody tr:nth-child(even):hover {
    background-color: #f0f0f0;
}

.user-link {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
}

.user-link:hover {
    text-decoration: underline;
}

.user-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.badge-tech {
    background-color: #e3f2fd;
    color: #1976d2;
}

.badge-admin {
    background-color: #fce4ec;
    color: #c2185b;
}

.badge-user {
    background-color: #f1f8e9;
    color: #558b2f;
}

.users-count {
    font-size: 14px;
    color: #666;
}

.add-user-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.add-user-button:hover {
    background-color: #34495e;
}

/* =================================================================
   Forgot Password Styles
   ================================================================= */

.forgot-password-link {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password-link a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-password-link a:hover {
    text-decoration: underline;
}

.forgot-password-intro {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* =================================================================
   Password Reset Button (Admin)
   ================================================================= */

.password-reset-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.password-reset-btn {
    background-color: #6c757d;
}

.password-reset-btn:hover {
    background-color: #5a6268;
}
