/* Dashboard Specific Styles */

/* Login Screen */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
}

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

.login-box h2 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
}

/* Dashboard */
.dashboard {
    display: none;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.stat-card h3 {
    font-size: 0.875rem;
    color: #7f8c8d;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    font-weight: 500;
}

.stat-card .value {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
}

.stat-card.online .value {
    color: #27ae60;
}

/* Device Section */
.devices-section {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: visible;
}

.section-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* Device Table */
.device-table {
    width: 100%;
    border-collapse: collapse;
}

.device-table th {
    background: #f8f9fa;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: #7f8c8d;
    text-transform: uppercase;
}

.device-table td {
    padding: 1rem;
    border-top: 1px solid #ecf0f1;
}

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

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

/* Actions Menu (Hamburger) */
.actions-menu-container {
    position: relative;
}

.btn-icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    color: #7f8c8d;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #ecf0f1;
    color: #2c3e50;
}

.actions-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    margin-top: 0.25rem;
}

.actions-menu.active {
    display: block;
}

.actions-menu.open-upwards {
    top: auto;
    bottom: 100%;
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.actions-menu button {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.875rem;
    color: #2c3e50;
    transition: background 0.2s;
}

.actions-menu button:first-child {
    border-radius: 6px 6px 0 0;
}

.actions-menu button:last-child {
    border-radius: 0 0 6px 6px;
}

.actions-menu button:hover {
    background: #f8f9fa;
}

.actions-menu button svg {
    flex-shrink: 0;
    color: #7f8c8d;
}

/* Admin Quick Actions */
.admin-quick-actions {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-quick-actions h3 {
    margin: 0 0 1rem 0;
    font-size: 1.125rem;
    color: #2c3e50;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.quick-actions-grid .btn {
    width: 100%;
    justify-content: center;
}

.plan-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

.plan-section:last-of-type {
    border-bottom: none;
    margin-bottom: 1rem;
}

.plan-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 1rem;
    color: #34495e;
    font-weight: 600;
}

/* Responsive Table */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .device-table {
        font-size: 0.875rem;
    }

    .device-table th,
    .device-table td {
        padding: 0.5rem;
    }
}
