/* OLT2 Monitoring System - Main Styles */

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #2c3e50;
    font-size: 2rem;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info span {
    color: #666;
    font-weight: 500;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #2c3e50;
    font-size: 1.2rem;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-item {
    color: #666;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.navbar-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    transform: translateY(-2px);
}

.navbar-item.active {
    background: #667eea;
    color: white;
}

/* Dropdown */
.navbar-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    min-width: 150px;
    z-index: 9999;
    overflow: hidden;
}

.navbar-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.page-header h2 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 600;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

/* Cards */
.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.device-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.device-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

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

.device-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
}

.device-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.device-status.online {
    background: #d4edda;
    color: #155724;
}

.device-status.offline {
    background: #f8d7da;
    color: #721c24;
}

.device-info p {
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.device-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    justify-content: flex-start;
    align-items: center;
}

.device-actions .btn {
    flex: 0 0 auto;
    min-width: 120px;
    white-space: nowrap;
}

/* Search Results */
.search-results-header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-results-header h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.search-results-header p {
    margin: 0;
    color: #666;
    font-style: italic;
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.search-result-item {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid #007bff;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.status-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    font-size: 14px;
    font-weight: bold;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.result-header h4 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.1rem;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f8f9fa;
}

.detail-row .label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.detail-row .value {
    color: #212529;
    text-align: right;
    word-break: break-all;
}

.result-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.result-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 4px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.result-actions .btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.result-actions .btn-info {
    background-color: #17a2b8;
    color: white;
}

.result-actions .btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.result-actions .btn-success {
    background-color: #28a745;
    color: white;
}

.result-actions .btn-danger {
    background-color: #dc3545;
    color: white;
}

.result-actions .btn-primary {
    background-color: #007bff;
    color: white;
}

.result-actions .btn:hover {
    opacity: 0.8;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.search-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.search-loading i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #007bff;
}

.search-loading .fa-database {
    color: #17a2b8;
}

.search-loading .fa-network-wired {
    color: #28a745;
}

.search-loading .fa-cogs {
    color: #ffc107;
}

.search-loading .fa-check-circle {
    color: #28a745 !important;
}

.search-error {
    text-align: center;
    padding: 40px;
    color: #dc3545;
}

.search-error i {
    font-size: 2rem;
    margin-bottom: 15px;
}

/* Responsive for device actions */
@media (max-width: 768px) {
    .device-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .device-actions .btn {
        width: 100%;
        min-width: auto;
        padding: 10px;
        font-size: 14px;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .detail-row .value {
        text-align: left;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: #2c3e50;
    font-size: 1.3rem;
    font-weight: 600;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal form {
    padding: 30px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

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

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

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-state i {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.empty-state p {
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Search */
.search-section {
    margin-bottom: 30px;
}

.search-form {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input-group {
    display: flex;
    flex: 1;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px 30px;
    margin-top: 20px;
    text-align: center;
    color: #666;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 40px 0;
    margin-bottom: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.welcome-section h1 {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.welcome-section p {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Statistics Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card.online {
    border-left: 4px solid #28a745;
}

.stat-card.offline {
    border-left: 4px solid #dc3545;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.stat-card.online .stat-icon {
    background: #28a745;
}

.stat-card.offline .stat-icon {
    background: #dc3545;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
}

.stat-content p {
    color: #666;
    margin: 5px 0 0 0;
    font-size: 0.9rem;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: 30px;
}

.quick-actions h2 {
    color: #2c3e50;
    font-size: 1.5rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.action-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.action-btn {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-decoration: none;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    border-color: #667eea;
    color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.action-btn i {
    font-size: 2rem;
}

.action-btn span {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    color: #2c3e50;
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.card-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
}

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

.card-content {
    padding: 20px 25px;
}

.no-data {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ONU List */
.onu-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.onu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.onu-info strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 5px;
}

.interface {
    color: #666;
    font-size: 0.9rem;
}

.onu-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.username {
    color: #666;
    font-size: 0.9rem;
}

.status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-online {
    background: #d4edda;
    color: #155724;
}

.status-offline {
    background: #f8d7da;
    color: #721c24;
}

/* Log List */
.log-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.log-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.log-level {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    min-width: 60px;
    text-align: center;
}

.level-info {
    background: #d1ecf1;
    color: #0c5460;
}

.level-warning {
    background: #fff3cd;
    color: #856404;
}

.level-error {
    background: #f8d7da;
    color: #721c24;
}

.log-content {
    flex: 1;
}

.log-message {
    color: #2c3e50;
    margin-bottom: 5px;
}

.log-meta {
    display: flex;
    gap: 15px;
    font-size: 0.8rem;
    color: #666;
}

.device {
    font-weight: 500;
}

/* Users Table */
.users-table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 20px;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
}

.users-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 15px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
}

.users-table td {
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
}

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

.users-table tr:last-child td {
    border-bottom: none;
}

/* Role and Status Badges */
.role-badge, .status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.role-admin {
    background: #d4edda;
    color: #155724;
}

.role-user {
    background: #d1ecf1;
    color: #0c5460;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

/* Action Buttons in Table */

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 12px;
    min-width: auto;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-2px);
}

/* Password Field Styling */
#newPasswordGroup {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

#newPasswordGroup label {
    color: #495057;
    font-weight: 500;
    margin-bottom: 8px;
}

#newPasswordGroup input {
    background: white;
    border: 2px solid #e9ecef;
}

#newPasswordGroup input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

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

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.login-header {
    margin-bottom: 30px;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
    color: white;
}

.login-header h1 {
    color: #2c3e50;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.login-header p {
    color: #666;
    font-size: 1rem;
    margin: 0;
}

.login-form {
    text-align: left;
}

.login-form .form-group {
    margin-bottom: 25px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.login-form label i {
    color: #667eea;
    width: 16px;
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-form input[type="text"]:focus,
.login-form input[type="password"]:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 25px;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
}

.checkbox-group label {
    margin: 0;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.login-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .navbar {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .devices-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* Login responsive */
    .login-page {
        padding: 10px;
        min-height: 100vh;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
    
    .login-container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .login-card {
        padding: 25px 20px;
        margin: 0;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
        background: rgba(255, 255, 255, 0.98);
    }
    
    .login-icon {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
        margin: 0 auto 20px;
    }
    
    .login-header {
        text-align: center;
        margin-bottom: 25px;
    }
    
    .login-header h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .login-header p {
        font-size: 0.9rem;
        margin: 0;
    }
    
    .login-form .form-group {
        margin-bottom: 20px;
    }
    
    .login-form input[type="text"],
    .login-form input[type="password"] {
        padding: 16px 20px;
        font-size: 16px; /* Предотвратява zoom на iOS */
        border-radius: 10px;
        border: 2px solid #e9ecef;
        width: 100%;
        box-sizing: border-box;
    }
    
    .login-form input[type="text"]:focus,
    .login-form input[type="password"]:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        outline: none;
    }
    
    .login-form label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .btn-primary {
        padding: 16px 20px;
        font-size: 16px;
        border-radius: 10px;
        width: 100%;
        box-sizing: border-box;
    }
    
    .checkbox-group {
        margin-bottom: 20px;
    }
    
    .checkbox-label {
        font-size: 0.9rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .login-footer {
        margin-top: 25px;
        padding-top: 15px;
    }
    
    .login-footer p {
        font-size: 0.8rem;
    }
    
    /* Password toggle button */
    .password-toggle {
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #666;
        font-size: 1.1rem;
        cursor: pointer;
        padding: 5px;
        z-index: 10;
    }
    
    .form-group {
        position: relative;
    }
    
    .form-group input[type="password"] {
        padding-right: 50px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Device Details Page */
.page-header {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.page-header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.8rem;
    text-align: left;
}

.header-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
    flex-wrap: wrap;
}

.device-info-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 30px;
    width: 100%;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    margin-bottom: 20px;
}

.info-card h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.info-item {
    margin-bottom: 10px;
    padding: 5px 0;
    border-bottom: 1px solid #ecf0f1;
}

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

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: 500;
}

.status-badge.online {
    background: #d4edda;
    color: #155724;
}

.status-badge.offline {
    background: #f8d7da;
    color: #721c24;
}

.response-time {
    color: #28a745;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.onu-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    margin-bottom: 20px;
}

.section-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

.section-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.search-box {
    margin-bottom: 20px;
}

.search-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.table-container {
    overflow-x: 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 #dee2e6;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.data-table tr:hover {
    background: #f8f9fa;
}

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

.text-danger {
    color: #dc3545;
}

code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 20px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Alert Messages */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

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

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

.alert i {
    font-size: 16px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Loading State */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn .fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Responsive for Device Details */
@media (max-width: 768px) {
    /* Показваме header за мобилни устройства */
    .header {
        display: flex;
        padding: 15px 20px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .user-info {
        font-size: 0.9rem;
    }
    
    /* Показваме навигация за мобилни устройства */
    .navbar {
        display: flex;
        padding: 10px 20px;
        flex-wrap: wrap;
    }
    
    .navbar-brand {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .navbar-menu {
        display: flex;
        flex-direction: column;
        gap: 5px;
        width: 100%;
    }
    
    .navbar-item {
        padding: 8px 12px;
        font-size: 0.9rem;
        text-align: left;
    }
    
    /* Скриваме page-header за мобилни устройства */
    .page-header {
        display: none;
    }
    
    /* Скриваме device-info-grid за мобилни устройства */
    .device-info-grid {
        display: none;
    }
    
    /* Показваме само ONU секцията */
    .onu-section {
        margin-top: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Осигуряваме че контейнерът започва отгоре */
    .container {
        padding: 0;
    }
    
    .main-content {
        margin: 0;
    }
    
    /* Подобряваме таблицата за мобилни устройства */
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px 4px;
    }
    
    /* Скриваме ненужните колони за мобилни устройства */
    .data-table th:nth-child(4),  /* MAC Address */
    .data-table td:nth-child(4),  /* MAC Address */
    .data-table th:nth-child(5),  /* Distance */
    .data-table td:nth-child(5) { /* Distance */
        display: none;
    }
    
    /* Подобряваме показването на останалите колони */
    .data-table th:nth-child(1),  /* Интерфейс */
    .data-table td:nth-child(1),  /* Интерфейс */
    .data-table th:nth-child(2),  /* Потребител */
    .data-table td:nth-child(2),  /* Потребител */
    .data-table th:nth-child(3),  /* Статус */
    .data-table td:nth-child(3),  /* Статус */
    .data-table th:nth-child(6),  /* Софтуер */
    .data-table td:nth-child(6),  /* Софтуер */
    .data-table th:nth-child(7),  /* Действия */
    .data-table td:nth-child(7) { /* Действия */
        padding: 10px 8px;
        font-size: 13px;
    }
    
    /* По-широки колони за по-добро показване */
    .data-table th:nth-child(1),
    .data-table td:nth-child(1) { /* Интерфейс */
        width: 20%;
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) { /* Потребител */
        width: 25%;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) { /* Статус */
        width: 10%;
    }
    
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) { /* Софтуер */
        width: 25%;
    }
    
    .data-table th:nth-child(7),
    .data-table td:nth-child(7) { /* Действия */
        width: 20%;
    }
    
    /* Бутоните в таблицата да са по-малки */
    .action-buttons .btn {
        padding: 4px 8px;
        font-size: 10px;
    }
    
    /* Подобряваме търсачката за мобилни устройства */
    .search-input {
        font-size: 16px; /* Предотвратява zoom на iOS */
        padding: 12px;
    }
    
    /* Подобряваме секцията за ONU */
    .onu-section h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    /* Подобряваме section-header за мобилни устройства */
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .section-actions {
        justify-content: center;
    }
    
    /* Подобряваме action-buttons за мобилни устройства */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-buttons .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}
