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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

/* Header */
.header {
    background: #2c3e50;
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}


.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
}

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

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: #c0392b;
}

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

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

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1rem;
}

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

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

.form-group input:focus {
    outline: none;
    border-color: #3498db;
}

.btn {
    background: #3498db;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    width: 100%;
}

.btn:hover {
    background: #2980b9;
}

.alert {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 1rem;
}

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

/* Sidebar Layout */
.main-layout {
    display: flex;
    min-height: calc(100vh - 80px);
}

.sidebar {
    width: 250px;
    background: #34495e;
    color: white;
    padding: 2rem 0;
}


.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #bdc3c7;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: #2c3e50;
    color: white;
    border-left-color: #3498db;
}

.sidebar-menu a.active {
    background: #2c3e50;
    color: white;
    border-left-color: #3498db;
}

.menu-icon {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.main-content {
    flex: 1;
    padding: 2rem;
    background: #f8f9fa;
}

/* Icons */
.icon-box {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #27ae60;
    border: 2px solid #27ae60;
    border-radius: 2px;
    margin-right: 5px;
    vertical-align: middle;
}

.icon-box.no-box {
    background: transparent;
    border-color: #e74c3c;
}

.icon-tower {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #e67e22;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.icon-tower.no-tower {
    background: transparent;
    border: 2px solid #bdc3c7;
}

.icon-optical {
    display: inline-block;
    width: 16px;
    height: 16px;
    background: #3498db;
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    margin-right: 5px;
    vertical-align: middle;
}

.icon-optical.no-optical {
    background: #bdc3c7;
}

/* Devices Table */
.content {
    padding: 2rem 0;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 300;
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: #3498db;
    display: block;
}

.stat-label {
    color: #7f8c8d;
    font-size: 0.9rem;
}

.table-container {
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
}

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

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

/* Compact table */
.data-table.compact th,
.data-table.compact td {
    padding: 8px 12px;
    font-size: 0.9rem;
}

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

.coordinates {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #666;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

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

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

.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.no-data {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

/* Reports specific styles */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.report-section {
    background: white;
    padding: 1.5rem;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.report-section h3 {
    margin-bottom: 1rem;
    color: #2c3e50;
    font-size: 1.2rem;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.report-section .table-container {
    max-height: 400px;
    overflow-y: auto;
}

/* Photos Gallery */
.photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.photo-card {
    background: white;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #e1e8ed;
}

.photo-info {
    padding: 1rem;
}

.photo-description {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.photo-meta {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.photo-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    text-decoration: none;
    border-radius: 4px;
    color: white;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-small:hover {
    opacity: 0.9;
}

/* Scroll for tables */
.table-container::-webkit-scrollbar {
    width: 6px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.table-container::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 1rem 0;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-menu li {
        margin-bottom: 0;
        margin-right: 1rem;
    }
    
    .sidebar-menu a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar-menu a.active {
        border-left: none;
        border-bottom-color: #3498db;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
    
    .photos-grid {
        grid-template-columns: 1fr;
    }
}
