/* EmailClear - Admin Panel CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #f8f9fa;
    color: #333;
    line-height: 1.6;
}

/* Admin Layout */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #ffd700;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    max-width: calc(100% - 250px);
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
    gap: 20px;
}

.content-header h1 {
    margin: 0;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

/* Forms */
.form-container {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.email-form {
    max-width: 800px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: white;
    display: block;
    visibility: visible;
    opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.checkbox-label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto !important;
    margin: 0;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-outline:hover {
    background-color: #6c757d;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 20px;
}

.table-header h2 {
    font-size: 20px;
    color: #2c3e50;
}

.table-info {
    color: #666;
    font-size: 14px;
    margin-left: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.data-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.data-table tr:hover {
    background-color: #f8f9fa;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.text-error {
    color: #dc3545;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #d4edda;
    color: #155724;
}

.badge-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.badge-secondary {
    background-color: #e2e3e5;
    color: #383d41;
}

.action-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.action-clean {
    background-color: #fff3cd;
    color: #856404;
}

.action-manual {
    background-color: #cce5ff;
    color: #004085;
}

.action-cron {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Alerts */
.alert {
    padding: 12px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.login-form .form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    color: #666;
    font-size: 14px;
}

.login-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* Login Page Responsive */
@media (max-width: 480px) {
    .login-container {
        padding: 15px;
    }
    
    .login-card {
        padding: 30px 20px;
        max-width: 100%;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
        margin-bottom: 25px;
    }
    
    .login-form .form-group {
        margin-bottom: 15px;
    }
    
    .login-form .form-group input {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .login-btn {
        padding: 16px;
        font-size: 16px;
        margin-top: 5px;
    }
    
    .login-footer {
        margin-top: 25px;
        padding-top: 15px;
        font-size: 13px;
    }
}

@media (max-width: 360px) {
    .login-container {
        padding: 10px;
    }
    
    .login-card {
        padding: 25px 15px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .login-form .form-group input {
        padding: 12px 14px;
    }
    
    .login-btn {
        padding: 14px;
    }
}

/* Landscape Mobile for Login */
@media (max-width: 768px) and (orientation: landscape) {
    .login-container {
        padding: 10px;
        align-items: center;
        min-height: 100vh;
    }
    
    .login-card {
        max-width: 350px;
        padding: 30px 25px;
    }
    
    .login-header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .login-header p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .login-form .form-group {
        margin-bottom: 12px;
    }
    
    .login-btn {
        padding: 12px;
        margin-top: 5px;
    }
}

.login-footer p {
    color: #666;
    font-size: 12px;
}

/* Settings */
.settings-section {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.settings-section h2 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.settings-form {
    max-width: 600px;
}

.system-info {
    display: grid;
    gap: 15px;
}

.info-row {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row label {
    font-weight: 500;
    color: #555;
    min-width: 150px;
}

.cron-instructions {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.cron-instructions p {
    margin-bottom: 15px;
}

.cron-command {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0;
}

.cron-command code {
    flex: 1;
    background-color: #f1f3f4;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    word-break: break-all;
}

.cron-instructions h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.cron-instructions ul {
    margin-left: 20px;
}

.cron-instructions li {
    margin-bottom: 5px;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* Time Info */
.time-info {
    line-height: 1.2;
}

.time-info small {
    color: #666;
    font-size: 11px;
}

/* Message Cell */
.message-cell {
    max-width: 300px;
    word-wrap: break-word;
}

.show-more {
    color: #667eea;
    text-decoration: none;
    font-size: 12px;
}

.show-more:hover {
    text-decoration: underline;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.page-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #667eea;
    transition: all 0.3s ease;
}

.page-link:hover {
    background-color: #667eea;
    color: white;
}

.page-link.active {
    background-color: #667eea;
    color: white;
    border-color: #667eea;
}

/* Cleaning progress indicator */
.cleaning-progress {
    color: #667eea;
    font-size: 12px;
    margin-left: 5px;
}

/* Button states during cleaning */
.btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Enhanced loading for cleaning */
.btn[disabled] {
    position: relative;
}

.btn[disabled]:after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Info Box */
.info-box {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.info-box h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
}

.info-box ul {
    margin: 0;
    padding-left: 20px;
}

.info-box li {
    margin-bottom: 8px;
    color: #6c757d;
    font-size: 14px;
}

.info-box li strong {
    color: #495057;
}

/* Auto Clean Info */
.auto-clean-info {
    line-height: 1.4;
}

.auto-clean-info .badge {
    display: inline-block;
    margin-bottom: 3px;
}

.auto-clean-info small {
    font-size: 11px;
    display: block;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    background: #667eea;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.dropdown-toggle:hover {
    background: #5a6fd8;
}

.dropdown-toggle .caret {
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 5px;
    vertical-align: middle;
    border-top: 4px solid;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    display: none;
    min-width: 160px;
    padding: 5px 0;
    margin: 2px 0 0;
    list-style: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border: 1px solid rgba(0,0,0,.15);
    border-radius: 4px;
    box-shadow: 0 6px 12px rgba(0,0,0,.175);
}

.dropdown.open .dropdown-menu {
    display: block;
}

.dropdown-menu > li > a {
    display: block;
    padding: 8px 20px;
    clear: both;
    font-weight: normal;
    line-height: 1.42857143;
    color: #333;
    white-space: nowrap;
    text-decoration: none;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    color: #262626;
    text-decoration: none;
    background-color: #f5f5f5;
}

/* Manual Clean Input Group */
.manual-clean-group {
    display: flex;
    align-items: center;
    gap: 5px;
}

.clean-hours-input {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    text-align: center;
}

.clean-hours-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.clean-hours-input:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    align-items: center;
    flex-wrap: wrap;
}

/* Enhanced Select Options */
select {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    min-width: 150px;
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding-right: 50px; /* Space for eye button */
}

.password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
}

.password-toggle:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.password-toggle:focus {
    outline: none;
    background-color: rgba(102, 126, 234, 0.2);
}

.eye-icon {
    font-size: 16px;
    line-height: 1;
    user-select: none;
}

/* Profile Form Styles */
.profile-form {
    max-width: 600px;
}

.profile-form input[type="text"],
.profile-form input[type="password"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #333;
}

.form-section {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: #fafbfc;
}

.form-section h3 {
    color: #495057;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.profile-form hr {
    margin: 30px 0;
    border: none;
    border-top: 1px solid #e9ecef;
}

.profile-form p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 2% auto;
    padding: 0;
    border: none;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: opacity 0.3s;
}

.close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
}

.modal-footer {
    background-color: #f8f9fa;
    padding: 20px 30px;
    border-radius: 0 0 12px 12px;
    text-align: right;
    border-top: 1px solid #e9ecef;
}

/* Support Info Styling */
.support-info {
    display: grid;
    gap: 25px;
}

.version-info, .contact-info, .features-info, .purchase-info {
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    background-color: #f8f9fa;
}

.version-info {
    background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
    border-color: #667eea30;
}

.support-info h3 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 18px;
    font-weight: 600;
}

.support-item {
    margin-bottom: 20px;
    padding: 15px;
    background-color: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.support-item:last-child {
    margin-bottom: 0;
}

.support-item strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.support-item p {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #495057;
}

.support-item small {
    color: #6c757d;
    font-size: 13px;
    line-height: 1.4;
}

.features-info ul {
    margin: 0;
    padding-left: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.features-info li {
    margin-bottom: 8px;
    color: #495057;
    font-size: 14px;
}

.purchase-info p {
    margin: 5px 0;
    font-size: 15px;
    color: #495057;
}

.purchase-info em {
    color: #6c757d;
    font-size: 13px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .sidebar {
        width: 220px;
    }
    
    .main-content {
        margin-left: 220px;
        max-width: calc(100% - 220px);
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        max-width: calc(100% - 200px);
        padding: 15px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        margin-left: 0;
        gap: 10px;
    }
    
    .header-actions form,
    .header-actions a {
        margin-bottom: 10px;
    }
}

@media (max-width: 768px) {
    /* Mobile Layout */
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        z-index: 100;
    }
    
    .sidebar-header {
        padding: 15px;
        text-align: center;
    }
    
    .sidebar-header h2 {
        font-size: 20px;
    }
    
    .sidebar-nav {
        display: flex;
        flex-wrap: wrap;
        padding: 10px;
        gap: 5px;
    }
    
    .sidebar-nav .nav-item {
        flex: 1 1 calc(50% - 5px);
        min-width: 120px;
        text-align: center;
        padding: 12px 8px;
        margin: 0;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .sidebar-nav .nav-item:hover {
        background: rgba(255, 255, 255, 0.2);
    }
    
    .sidebar-nav .nav-item.active {
        background: rgba(255, 255, 255, 0.3);
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
        padding: 15px;
    }
    
    .content-header h1 {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .header-actions {
        width: 100%;
        flex-wrap: wrap;
        margin-left: 0;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .header-actions form,
    .header-actions a {
        margin-bottom: 10px;
        margin-right: 10px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        text-align: center;
    }
    
    .stat-value {
        font-size: 28px;
    }
    
    .stat-card h3 {
        font-size: 14px;
    }
    
    /* Table Responsive */
    .table-container {
        overflow-x: auto;
        margin: 0 -15px;
        padding: 0 15px;
    }
    
    .data-table {
        min-width: 700px;
        font-size: 14px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
        white-space: nowrap;
    }
    
    .data-table th {
        font-size: 12px;
    }
    
    /* Action Buttons Responsive */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }
    
    .manual-clean-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .clean-hours-input {
        width: 100%;
        text-align: left;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 14px;
        text-align: center;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Forms Responsive */
    .form-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-group {
        width: 100%;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        width: 100%;
        padding: 12px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .password-input {
        padding-right: 50px !important;
    }
    
    .password-toggle {
        right: 12px;
        min-width: 35px;
        height: 35px;
    }
    
    .eye-icon {
        font-size: 18px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    /* Info Box Responsive */
    .info-box {
        padding: 15px;
        margin: 15px 0;
    }
    
    .info-box h4 {
        font-size: 16px;
        margin-bottom: 10px;
    }
    
    .info-box ul {
        padding-left: 15px;
    }
    
    .info-box li {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    /* Alert Responsive */
    .alert {
        padding: 12px 15px;
        margin: 10px 0;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    /* Small Mobile */
    .main-content {
        padding: 10px;
    }
    
    .content-header h1 {
        font-size: 20px;
    }
    
    .sidebar-nav .nav-item {
        flex: 1 1 100%;
        min-width: auto;
        padding: 15px;
        font-size: 14px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .stat-card h3 {
        font-size: 14px;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 6px;
    }
    
    .btn {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        max-height: 96vh;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 15px 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    .support-info {
        gap: 15px;
    }
    
    .version-info,
    .contact-info,
    .features-info,
    .purchase-info {
        padding: 15px;
    }
    
    .support-item {
        padding: 12px;
        margin-bottom: 15px;
    }
    
    .features-info ul {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .features-info li {
        font-size: 13px;
    }
}

/* Tablet Specific */
@media (min-width: 769px) and (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        max-width: calc(100% - 200px);
        padding: 20px;
    }
    
    .content-header {
        gap: 15px;
    }
    
    .content-header h1 {
        font-size: 24px;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .sidebar-nav .nav-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .sidebar-header h2 {
        font-size: 18px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
}

/* Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        height: auto;
        max-height: 40vh;
        overflow-y: auto;
    }
    
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 5px;
        padding: 10px;
    }
    
    .sidebar-nav .nav-item {
        flex: none;
        min-width: auto;
        padding: 10px 5px;
        font-size: 12px;
        text-align: center;
    }
    
    .main-content {
        margin-top: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
    
    .stat-card {
        padding: 15px 10px;
    }
    
    .stat-value {
        font-size: 20px;
    }
    
    .stat-card h3 {
        font-size: 12px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sidebar-header h2 {
        -webkit-font-smoothing: antialiased;
    }
    
    .stat-value {
        -webkit-font-smoothing: antialiased;
    }
}

/* Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .nav-item {
        min-height: 44px; /* iOS touch target size */
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .clean-hours-input {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .support-item {
        min-height: 44px;
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .header-actions,
    .action-buttons,
    .modal {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        max-width: 100% !important;
    }
    
    .data-table {
        font-size: 12px;
        border: 1px solid #000;
    }
    
    .data-table th,
    .data-table td {
        border: 1px solid #000;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        max-width: calc(100% - 200px);
        padding: 15px;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-actions {
        margin-left: 0;
        justify-content: center;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .filter-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 2px;
    }
    
    .cron-command {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
    
    .login-card {
        margin: 20px;
        padding: 30px 20px;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .header-actions,
    .form-actions,
    .pagination {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        max-width: 100%;
    }
    
    .btn {
        display: none;
    }
}
